aboutsummaryrefslogtreecommitdiffstats
path: root/ONAP-PAP-REST/src/test
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2019-11-08 16:11:50 +0000
committerliamfallon <liam.fallon@est.tech>2019-11-12 09:20:22 +0000
commit0c20d1c294fe146e1018f14b07a8d861c29fe527 (patch)
tree04d82d897c7ecf69771a5810443109e17749eae5 /ONAP-PAP-REST/src/test
parent2ee068fed59becbd3327937125264bdcf651f7b8 (diff)
JUnit/SONAR/Checkstyle in ONAP-REST
Third batch of JPA pojos (E-M), 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: I4fee1e9fb9c8a69dd6f2f15d3e3a8844473b857b Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'ONAP-PAP-REST/src/test')
-rw-r--r--ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/components/PolicyDBDaoTest.java8
-rw-r--r--ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/controller/FirewallDictionaryControllerTest.java24
2 files changed, 16 insertions, 16 deletions
diff --git a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/components/PolicyDBDaoTest.java b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/components/PolicyDBDaoTest.java
index 05f633099..99cc47c23 100644
--- a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/components/PolicyDBDaoTest.java
+++ b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/components/PolicyDBDaoTest.java
@@ -312,7 +312,7 @@ public class PolicyDBDaoTest {
getGroup.setParameter("deleted", false);
List<?> groups = getGroup.list();
GroupEntity groupEntity = (GroupEntity) groups.get(0);
- Assert.assertEquals(groupName, groupEntity.getgroupName());
+ Assert.assertEquals(groupName, groupEntity.getGroupName());
Assert.assertEquals("this is a test group", groupEntity.getDescription());
session.getTransaction().commit();
session.close();
@@ -375,7 +375,7 @@ public class PolicyDBDaoTest {
Assert.fail();
}
PdpEntity pdp = (PdpEntity) pdps.get(0);
- Assert.assertEquals(groupName, pdp.getGroup().getgroupName());
+ Assert.assertEquals(groupName, pdp.getGroup().getGroupName());
Assert.assertEquals(pdp.getPdpName(), "primary");
session3.getTransaction().commit();
session3.close();
@@ -451,7 +451,7 @@ public class PolicyDBDaoTest {
getPdp3.setParameter("deleted", false);
List<?> pdps3 = getPdp3.list();
for (Object obj : pdps3) {
- Assert.assertEquals("testgroup1", ((PdpEntity) obj).getGroup().getgroupName());
+ Assert.assertEquals("testgroup1", ((PdpEntity) obj).getGroup().getGroupName());
}
session5.getTransaction().commit();
@@ -490,7 +490,7 @@ public class PolicyDBDaoTest {
getPdp4.setParameter("deleted", false);
List<?> pdps4 = getPdp4.list();
for (Object obj : pdps4) {
- Assert.assertEquals("testgroup2", ((PdpEntity) obj).getGroup().getgroupName());
+ Assert.assertEquals("testgroup2", ((PdpEntity) obj).getGroup().getGroupName());
}
session7.getTransaction().commit();
diff --git a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/controller/FirewallDictionaryControllerTest.java b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/controller/FirewallDictionaryControllerTest.java
index b94e8d338..3359a7aed 100644
--- a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/controller/FirewallDictionaryControllerTest.java
+++ b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/controller/FirewallDictionaryControllerTest.java
@@ -47,8 +47,8 @@ import org.onap.policy.rest.adapter.Term;
import org.onap.policy.rest.dao.CommonClassDao;
import org.onap.policy.rest.jpa.ActionList;
import org.onap.policy.rest.jpa.AddressGroup;
-import org.onap.policy.rest.jpa.FWTag;
-import org.onap.policy.rest.jpa.FWTagPicker;
+import org.onap.policy.rest.jpa.FwTag;
+import org.onap.policy.rest.jpa.FwTagPicker;
import org.onap.policy.rest.jpa.FirewallDictionaryList;
import org.onap.policy.rest.jpa.GroupServiceList;
import org.onap.policy.rest.jpa.PortList;
@@ -228,25 +228,25 @@ public class FirewallDictionaryControllerTest {
@Test
public void testGetTagPickerNameEntityDataByName() {
- test_WithGetDataByColumn(FWTagPicker.class, "fwTagPickerDictionaryDatas", "tagPickerName",
+ test_WithGetDataByColumn(FwTagPicker.class, "fwTagPickerDictionaryDatas", "tagPickerName",
() -> controller.getTagPickerNameEntityDataByName(response));
}
@Test
public void testGetTagPickerDictionaryEntityData() {
- test_WithGetData(FWTagPicker.class, "fwTagPickerDictionaryDatas",
+ test_WithGetData(FwTagPicker.class, "fwTagPickerDictionaryDatas",
() -> controller.getTagPickerDictionaryEntityData(response));
}
@Test
public void testGetTagNameEntityDataByName() {
- test_WithGetDataByColumn(FWTag.class, "fwTagDictionaryDatas", "fwTagName",
+ test_WithGetDataByColumn(FwTag.class, "fwTagDictionaryDatas", "fwTagName",
() -> controller.getTagNameEntityDataByName(response));
}
@Test
public void testGetTagDictionaryEntityData() {
- test_WithGetData(FWTag.class, "fwTagDictionaryDatas", () -> controller.getTagDictionaryEntityData(response));
+ test_WithGetData(FwTag.class, "fwTagDictionaryDatas", () -> controller.getTagDictionaryEntityData(response));
}
@Test
@@ -563,7 +563,7 @@ public class FirewallDictionaryControllerTest {
"{\"fwTagPickerDictionaryData\":{\"description\":\"test\",\"networkRole\":\"test\",\"tagPickerName\":"
+ "\"Test\",\"tags\":[{\"$$hashKey\":\"object:1855\",\"id\":\"choice1\",\"number\":\"test\",\"option\":"
+ "\"Test\"}]},\"userid\":\"demo\"}";
- testSave(FWTagPicker.class, "fwTagPickerDictionaryDatas", "tagPickerName",
+ testSave(FwTagPicker.class, "fwTagPickerDictionaryDatas", "tagPickerName",
() -> controller.saveFirewallTagPickerDictionary(request, response));
}
@@ -573,14 +573,14 @@ public class FirewallDictionaryControllerTest {
"{\"fwTagPickerDictionaryData\":{\"id\":1,\"description\":\"test\",\"networkRole\":"
+ "\"test\",\"tagPickerName\":\"Test\",\"tags\":[{\"$$hashKey\":\"object:1855\",\"id\":"
+ "\"choice1\",\"number\":\"test\",\"option\":\"Test\"}]},\"userid\":\"demo\"}";
- testUpdate(FWTagPicker.class, "fwTagPickerDictionaryDatas", "tagPickerName",
+ testUpdate(FwTagPicker.class, "fwTagPickerDictionaryDatas", "tagPickerName",
() -> controller.saveFirewallTagPickerDictionary(request, response));
}
@Test
public void testRemoveFirewallTagPickerDictionary() {
jsonString = "{\"userid\":\"demo\",\"data\":{\"id\":1,\"description\":\"test\",\"tagPickerName\":\"Test\"}}";
- testRemove(FWTagPicker.class, "fwTagPickerDictionaryDatas",
+ testRemove(FwTagPicker.class, "fwTagPickerDictionaryDatas",
() -> controller.removeFirewallTagPickerDictionary(request, response));
}
@@ -589,7 +589,7 @@ public class FirewallDictionaryControllerTest {
jsonString =
"{\"fwTagDictionaryData\":{\"description\":\"test\",\"fwTagName\":\"Test\",\"tags\":[{\"$$hashKey\":"
+ "\"object:1690\",\"id\":\"choice1\",\"tags\":\"test\"}]},\"userid\":\"demo\"}";
- testSave(FWTag.class, "fwTagDictionaryDatas", "fwTagName",
+ testSave(FwTag.class, "fwTagDictionaryDatas", "fwTagName",
() -> controller.saveFirewallTagDictionary(request, response));
}
@@ -598,14 +598,14 @@ public class FirewallDictionaryControllerTest {
jsonString =
"{\"fwTagDictionaryData\":{\"id\":1,\"description\":\"test\",\"fwTagName\":\"Test\",\"tags\":"
+ "[{\"$$hashKey\":\"object:1690\",\"id\":\"choice1\",\"tags\":\"test\"}]},\"userid\":\"demo\"}";
- testUpdate(FWTag.class, "fwTagDictionaryDatas", "fwTagName",
+ testUpdate(FwTag.class, "fwTagDictionaryDatas", "fwTagName",
() -> controller.saveFirewallTagDictionary(request, response));
}
@Test
public void testRemoveFirewallTagDictionary() {
jsonString = "{\"userid\":\"demo\",\"data\":{\"id\":1,\"description\":\"test\",\"fwTagName\":\"Test\"}}";
- testRemove(FWTag.class, "fwTagDictionaryDatas",
+ testRemove(FwTag.class, "fwTagDictionaryDatas",
() -> controller.removeFirewallTagDictionary(request, response));
}