From d4e3a1b394715c6386f963130e4e081d421ecd1b Mon Sep 17 00:00:00 2001 From: liamfallon Date: Fri, 15 Nov 2019 13:35:42 +0000 Subject: Unit/SONAR/Checkstyle in ONAP-REST Fifth and final batch of JPA pojos (Q-Z), with JUnit added and SONAR/Checkstyle issues addressed. In cases where a class name change caused an update in another package, the license header on files for those knock on changes are not updated. Issue-ID: POLICY-2131 Change-Id: I1cc536a5b8a0cd3c6beff068dd72381f7ae10d12 Signed-off-by: liamfallon --- .../test/java/org/onap/policy/pap/test/XACMLPAPTest.java | 2 +- .../controller/ClosedLoopDictionaryControllerTest.java | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'ONAP-PAP-REST/src/test/java') diff --git a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/test/XACMLPAPTest.java b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/test/XACMLPAPTest.java index f978d7464..f9faa2928 100644 --- a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/test/XACMLPAPTest.java +++ b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/test/XACMLPAPTest.java @@ -488,7 +488,7 @@ public class XACMLPAPTest { // Verify Mockito.verify(httpServletResponse).setStatus(HttpServletResponse.SC_OK); // - // Check VNFType + // Check VnfType // httpServletRequest = Mockito.mock(HttpServletRequest.class); httpServletResponse = Mockito.mock(MockHttpServletResponse.class); diff --git a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/controller/ClosedLoopDictionaryControllerTest.java b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/controller/ClosedLoopDictionaryControllerTest.java index fab361118..8f0d52b21 100644 --- a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/controller/ClosedLoopDictionaryControllerTest.java +++ b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/controller/ClosedLoopDictionaryControllerTest.java @@ -44,8 +44,8 @@ import org.onap.policy.rest.jpa.ClosedLoopD2Services; import org.onap.policy.rest.jpa.ClosedLoopSite; import org.onap.policy.rest.jpa.PepOptions; import org.onap.policy.rest.jpa.UserInfo; -import org.onap.policy.rest.jpa.VNFType; -import org.onap.policy.rest.jpa.VSCLAction; +import org.onap.policy.rest.jpa.VnfType; +import org.onap.policy.rest.jpa.VsclAction; import org.onap.policy.rest.jpa.VarbindDictionary; import org.springframework.mock.web.MockHttpServletResponse; @@ -72,8 +72,8 @@ public class ClosedLoopDictionaryControllerTest { userInfo.setUserLoginId("Test"); userInfo.setUserName("Test"); - doNothing().when(commonClassDao).delete(new VSCLAction()); - doNothing().when(commonClassDao).save(new VSCLAction()); + doNothing().when(commonClassDao).delete(new VsclAction()); + doNothing().when(commonClassDao).save(new VsclAction()); controller = new ClosedLoopDictionaryController(); controller.setCommonClassDao(commonClassDao); @@ -88,7 +88,7 @@ public class ClosedLoopDictionaryControllerTest { @Test public void testGetVSCLActionDictionaryByNameEntityData() { - when(commonClassDao.getDataByColumn(VSCLAction.class, "vsclaction")).thenReturn(data); + when(commonClassDao.getDataByColumn(VsclAction.class, "vsclaction")).thenReturn(data); controller.getVSCLActionDictionaryByNameEntityData(response); try { assertTrue(response.getContentAsString() != null @@ -101,7 +101,7 @@ public class ClosedLoopDictionaryControllerTest { @Test public void testGetVSCLActionDictionaryEntityData() { - when(commonClassDao.getData(VSCLAction.class)).thenReturn(new ArrayList<>()); + when(commonClassDao.getData(VsclAction.class)).thenReturn(new ArrayList<>()); controller.getVSCLActionDictionaryEntityData(response); try { assertTrue(response.getContentAsString() != null @@ -114,7 +114,7 @@ public class ClosedLoopDictionaryControllerTest { @Test public void testGetVNFTypeDictionaryByNameEntityData() { - when(commonClassDao.getDataByColumn(VNFType.class, "vnftype")).thenReturn(data); + when(commonClassDao.getDataByColumn(VnfType.class, "vnftype")).thenReturn(data); controller.getVNFTypeDictionaryByNameEntityData(response); try { assertTrue(response.getContentAsString() != null @@ -127,7 +127,7 @@ public class ClosedLoopDictionaryControllerTest { @Test public void testGetVNFTypeDictionaryEntityData() { - when(commonClassDao.getData(VNFType.class)).thenReturn(new ArrayList<>()); + when(commonClassDao.getData(VnfType.class)).thenReturn(new ArrayList<>()); controller.getVNFTypeDictionaryEntityData(response); try { assertTrue(response.getContentAsString() != null -- cgit 1.2.3-korg