diff options
author | Wojciech Sliwka <wojciech.sliwka@nokia.com> | 2019-07-22 09:53:17 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-07-22 09:53:17 +0000 |
commit | b491faf8b57779addeb41def6be4c8977d0d5acd (patch) | |
tree | 01e24443898a4786310ca835e0b6a36b7e50b707 /vid-app-common/src/test/java/org/onap/vid/controller | |
parent | 7777af2d57f3461b06f8c787cfb6e33c3b01e8a6 (diff) | |
parent | 25245136c711cb4b1ed3c8e351a79e3572512434 (diff) |
Merge "Pnf pojo improvements"
Diffstat (limited to 'vid-app-common/src/test/java/org/onap/vid/controller')
-rw-r--r-- | vid-app-common/src/test/java/org/onap/vid/controller/AaiControllerTest.java | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/vid-app-common/src/test/java/org/onap/vid/controller/AaiControllerTest.java b/vid-app-common/src/test/java/org/onap/vid/controller/AaiControllerTest.java index 2df28d973..a60aa7ea6 100644 --- a/vid-app-common/src/test/java/org/onap/vid/controller/AaiControllerTest.java +++ b/vid-app-common/src/test/java/org/onap/vid/controller/AaiControllerTest.java @@ -173,7 +173,15 @@ public class AaiControllerTest { @Test public void getSpecificPnf_shouldReturnPnfObjectForPnfId() throws Exception { String pnfId = "MyPnfId"; - Pnf pnf = createPnf(pnfId); + Pnf pnf = Pnf.builder() + .withPnfId(pnfId) + .withPnfName("TestPnf") + .withPnfName2("pnfName2") + .withPnfName2Source("pnfNameSource") + .withEquipModel("model") + .withEquipType("type") + .withEquipVendor("vendor") + .build(); AaiResponse<Pnf> aaiResponse = new AaiResponse<>(pnf, "", HttpStatus.OK.value()); given(aaiService.getSpecificPnf(pnfId)).willReturn(aaiResponse); @@ -197,13 +205,6 @@ public class AaiControllerTest { .andExpect(content().string(expectedErrorMessage)); } - private Pnf createPnf(String pnfId) { - Pnf pnf = new Pnf(); - pnf.setPnfId(pnfId); - pnf.setPnfName("TestPnf"); - return pnf; - } - public void getPNFInstances_shouldReturnOKResponseFromAAIService() throws Exception { String globalCustomerId = "testCustomerId"; String serviceType = "testServiceType"; |