aboutsummaryrefslogtreecommitdiffstats
path: root/ECOMP-PAP-REST/src/test/java/org/openecomp/policy/pap/xacml/rest/jpa/PolicyEntityTest.java
diff options
context:
space:
mode:
authorITSERVICES\rb7147 <rb7147@att.com>2017-04-25 11:46:00 -0400
committerITSERVICES\rb7147 <rb7147@att.com>2017-05-03 09:58:17 -0400
commite0addf5b588a1244f9679becd90999dfcb4c3a94 (patch)
tree1212772d6366730266ff0e093c874b07aa716c29 /ECOMP-PAP-REST/src/test/java/org/openecomp/policy/pap/xacml/rest/jpa/PolicyEntityTest.java
parent39fb0f30472777e4b60d6a7ac8aa4eb9773961ff (diff)
Policy 1707 commit to LF
Change-Id: Ibe6f01d92f9a434c040abb05d5386e89d675ae65 Signed-off-by: ITSERVICES\rb7147 <rb7147@att.com>
Diffstat (limited to 'ECOMP-PAP-REST/src/test/java/org/openecomp/policy/pap/xacml/rest/jpa/PolicyEntityTest.java')
-rw-r--r--ECOMP-PAP-REST/src/test/java/org/openecomp/policy/pap/xacml/rest/jpa/PolicyEntityTest.java27
1 files changed, 14 insertions, 13 deletions
diff --git a/ECOMP-PAP-REST/src/test/java/org/openecomp/policy/pap/xacml/rest/jpa/PolicyEntityTest.java b/ECOMP-PAP-REST/src/test/java/org/openecomp/policy/pap/xacml/rest/jpa/PolicyEntityTest.java
index f71026c39..046164013 100644
--- a/ECOMP-PAP-REST/src/test/java/org/openecomp/policy/pap/xacml/rest/jpa/PolicyEntityTest.java
+++ b/ECOMP-PAP-REST/src/test/java/org/openecomp/policy/pap/xacml/rest/jpa/PolicyEntityTest.java
@@ -48,7 +48,6 @@ public class PolicyEntityTest {
private static Logger logger = FlexLogger.getLogger(PolicyEntityTest.class);
-// @Ignore
@Test
public void testAllOps(){
Properties properties = new Properties();
@@ -125,18 +124,18 @@ public class PolicyEntityTest {
//We will NOT set the ConfigurationDataEntity or ActionBodyEntity object just to test that it is optional
//set createdBy
- p1.setCreatedBy("super-admin");
+ p1.setCreatedBy("kevin");
//createdDate will be set when it is persisted
//set scope
- p1.setScope("com.test");
+ p1.setScope("mckiou.kevin");
//set description
p1.setDescription("PolicyEntity Description");
//set modifiedBy
- p1.setModifiedBy("super-admin");
+ p1.setModifiedBy("kevin");
//modifiedDate will be set when it is persisted
@@ -202,7 +201,9 @@ public class PolicyEntityTest {
c1.setDescription("ConfigurationDataEntity Description");
- c1.setCreatedBy("super-admin");
+ c1.setCreatedBy("kevin");
+
+ //c1.setModifiedBy("kevin");
c1.setDeleted(true);
@@ -214,9 +215,9 @@ public class PolicyEntityTest {
a1.setActionBodyName("myActionBodyName");
- a1.setCreatedBy("super-admin");
+ a1.setCreatedBy("kevin");
- a1.setModifiedBy("super-admin");
+ a1.setModifiedBy("kevin");
a1.setDeleted(false);
@@ -274,7 +275,7 @@ public class PolicyEntityTest {
Query queryscope = em.createQuery("Select p from PolicyEntity p where p.scope=:s");
query.setParameter("pid", p1.getPolicyId());
- queryscope.setParameter("s", "com.user");
+ queryscope.setParameter("s", "mckiou.kevin.kim");
//Just test that we are retrieving the right object
@SuppressWarnings("rawtypes")
@@ -669,7 +670,7 @@ public class PolicyEntityTest {
pe1.setDescription("This is pe1");
- pe1.setPolicyDBDaoUrl("http://10.11.12.13:2345");
+ pe1.setPolicyDBDaoUrl("http://123.45.2.456:2345");
//push it to the DB
em.flush();
@@ -680,7 +681,7 @@ public class PolicyEntityTest {
pe2.setDescription("This is pe2");
- pe2.setPolicyDBDaoUrl("http://10.11.12.13:2345");
+ pe2.setPolicyDBDaoUrl("http://789.01.2.345:2345");
//Print them to the log before flushing
logger.debug("\n\n***********PolicyEntityTest: PolicyDBDaoEntity objects before flush********"
@@ -711,9 +712,9 @@ public class PolicyEntityTest {
}
for(Object policyDBDaoEntity: resultList){
PolicyDBDaoEntity pdbdao = (PolicyDBDaoEntity)policyDBDaoEntity;
- if(pdbdao.getPolicyDBDaoUrl().equals("http://10.11.12.13:2345")){
+ if(pdbdao.getPolicyDBDaoUrl().equals("http://123.45.2.456:2345")){
pex = pdbdao;
- }else if(pdbdao.getPolicyDBDaoUrl().equals("http://10.11.12.13:2345")){
+ }else if(pdbdao.getPolicyDBDaoUrl().equals("http://789.01.2.345:2345")){
pey = pdbdao;
}
}
@@ -731,7 +732,7 @@ public class PolicyEntityTest {
+ "\n modifiedDate-y " + pey.getModifiedDate()
);
//Verify the retrieved objects are the same as the ones we stored in the DB
- if(pex.getPolicyDBDaoUrl().equals("http://10.11.12.13:2345")){
+ if(pex.getPolicyDBDaoUrl().equals("http://123.45.2.456:2345")){
assertSame(pe1,pex);
assertSame(pe2,pey);
}else{