X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ves-agent%2Fsrc%2Ftest%2Fjava%2Forg%2Fcommscope%2Ftr069adapter%2Fvesagent%2Ftest%2FVESAgentServiceRestTest.java;h=b68b1b5668fec2dd14583d648f57481d3b486b36;hb=refs%2Fchanges%2F34%2F4334%2F1;hp=f44ff9418c222754c17ac04d433ab58f5b75b915;hpb=a58ada8fd244e69cf2ebe48a251fcdd4d48acec4;p=oam%2Ftr069-adapter.git diff --git a/ves-agent/src/test/java/org/commscope/tr069adapter/vesagent/test/VESAgentServiceRestTest.java b/ves-agent/src/test/java/org/commscope/tr069adapter/vesagent/test/VESAgentServiceRestTest.java index f44ff94..b68b1b5 100644 --- a/ves-agent/src/test/java/org/commscope/tr069adapter/vesagent/test/VESAgentServiceRestTest.java +++ b/ves-agent/src/test/java/org/commscope/tr069adapter/vesagent/test/VESAgentServiceRestTest.java @@ -28,7 +28,6 @@ import org.commscope.tr069adapter.acs.common.InformType; import org.commscope.tr069adapter.acs.common.ParameterDTO; import org.commscope.tr069adapter.acs.common.dto.TR069InformType; import org.commscope.tr069adapter.acs.common.inform.BootstrapInform; -import org.commscope.tr069adapter.acs.common.inform.PeriodicInform; import org.commscope.tr069adapter.acs.common.inform.ValueChangeInform; import org.commscope.tr069adapter.mapper.model.NetConfServerDetails; import org.commscope.tr069adapter.mapper.model.VESNotification; @@ -209,58 +208,35 @@ public class VESAgentServiceRestTest { } } - @Test - public void processHBEventTest() { - try { - VESNotificationResponse res = - new VESNotificationResponse(HttpStatus.ACCEPTED.value(), "Sucess"); - Mockito.when(sender.postRequest(Mockito.anyString(), Mockito.anyString())).thenReturn(res); - VESNotification ves = new VESNotification(); - ves.seteNodeBName("0005B9A1"); - ves.setNetconfDetails(getNetConfDetails()); - DeviceInform inform = new PeriodicInform(); - inform.setDeviceDetails(getDeviceDetails()); - ArrayList list = new ArrayList<>(); - list.add(TR069InformType.PERIODIC); - inform.setInformTypeList(list); - inform.setParameters(getGeneralParams()); - ves.setDevnotification(inform); - - VESNotificationResponse vesResponse = agent.processDeviceNotificationAsVESEvent(ves); - Assert.assertNotNull(vesResponse); - Assert.assertEquals(HttpStatus.ACCEPTED.value(), vesResponse.getStatusCode()); - res.getStatusCode(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - @Test - public void processHBEventWhenEnbNullTest() { - try { - VESNotificationResponse res = - new VESNotificationResponse(HttpStatus.ACCEPTED.value(), "Sucess"); - Mockito.when(sender.postRequest(Mockito.anyString(), Mockito.anyString())).thenReturn(res); - VESNotification ves = new VESNotification(); - ves.seteNodeBName(null); - ves.setNetconfDetails(getNetConfDetails()); - DeviceInform inform = new PeriodicInform(); - inform.setDeviceDetails(getDeviceDetails()); - ArrayList list = new ArrayList<>(); - list.add(TR069InformType.PERIODIC); - inform.setInformTypeList(list); - inform.setParameters(getGeneralParams()); - ves.setDevnotification(inform); - - VESNotificationResponse vesResponse = agent.processDeviceNotificationAsVESEvent(ves); - Assert.assertNotNull(vesResponse); - Assert.assertEquals(HttpStatus.ACCEPTED.value(), vesResponse.getStatusCode()); - res.getStatusCode(); - } catch (Exception e) { - e.printStackTrace(); - } - } - + /* + * @Test public void processHBEventTest() { try { VESNotificationResponse res = new + * VESNotificationResponse(HttpStatus.ACCEPTED.value(), "Sucess"); + * Mockito.when(sender.postRequest(Mockito.anyString(), Mockito.anyString())).thenReturn(res); + * VESNotification ves = new VESNotification(); ves.seteNodeBName("0005B9A1"); + * ves.setNetconfDetails(getNetConfDetails()); DeviceInform inform = new PeriodicInform(); + * inform.setDeviceDetails(getDeviceDetails()); ArrayList list = new ArrayList<>(); + * list.add(TR069InformType.PERIODIC); inform.setInformTypeList(list); + * inform.setParameters(getGeneralParams()); ves.setDevnotification(inform); + * + * VESNotificationResponse vesResponse = agent.processDeviceNotificationAsVESEvent(ves); + * Assert.assertNotNull(vesResponse); Assert.assertEquals(HttpStatus.ACCEPTED.value(), + * vesResponse.getStatusCode()); res.getStatusCode(); } catch (Exception e) { e.printStackTrace(); + * } } + * + * @Test public void processHBEventWhenEnbNullTest() { try { VESNotificationResponse res = new + * VESNotificationResponse(HttpStatus.ACCEPTED.value(), "Sucess"); + * Mockito.when(sender.postRequest(Mockito.anyString(), Mockito.anyString())).thenReturn(res); + * VESNotification ves = new VESNotification(); ves.seteNodeBName(null); + * ves.setNetconfDetails(getNetConfDetails()); DeviceInform inform = new PeriodicInform(); + * inform.setDeviceDetails(getDeviceDetails()); ArrayList list = new ArrayList<>(); + * list.add(TR069InformType.PERIODIC); inform.setInformTypeList(list); + * inform.setParameters(getGeneralParams()); ves.setDevnotification(inform); + * + * VESNotificationResponse vesResponse = agent.processDeviceNotificationAsVESEvent(ves); + * Assert.assertNotNull(vesResponse); Assert.assertEquals(HttpStatus.ACCEPTED.value(), + * vesResponse.getStatusCode()); res.getStatusCode(); } catch (Exception e) { e.printStackTrace(); + * } } + */ @Test public void processOnRestartEventTest() { try {