X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ONAP-PAP-REST%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fpolicy%2Fpap%2Fxacml%2Frest%2Fcomponents%2FPolicyDBDaoTest.java;h=546c5c0c3c7a3fac21403c6faaa9ccab6363e21f;hb=61e228f56bc39ce291ed8dc7a3401bee7a47e95d;hp=01e4a9b6112db3d649f11910b845f4e40456717e;hpb=073cc188efe9abb4c010cf674e34e2cf46ef1c52;p=policy%2Fengine.git 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 01e4a9b61..546c5c0c3 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 @@ -46,6 +46,7 @@ import org.onap.policy.common.logging.flexlogger.Logger; import org.onap.policy.pap.xacml.rest.components.PolicyDBDao.PolicyDBDaoTestClass; import org.onap.policy.rest.XACMLRestProperties; import org.onap.policy.rest.adapter.PolicyRestAdapter; +import org.onap.policy.rest.dao.PolicyDBException; import org.onap.policy.rest.jpa.GroupEntity; import org.onap.policy.rest.jpa.PdpEntity; import org.onap.policy.rest.jpa.PolicyEntity; @@ -53,7 +54,6 @@ import org.onap.policy.xacml.api.pap.OnapPDPGroup; import org.onap.policy.xacml.std.pap.StdPDPGroup; import org.onap.policy.xacml.util.XACMLPolicyWriter; -import com.att.research.xacml.api.pap.PAPException; import com.att.research.xacml.util.XACMLProperties; import oasis.names.tc.xacml._3_0.core.schema.wd_17.PolicyType; @@ -68,7 +68,7 @@ public class PolicyDBDaoTest { EntityManagerFactory emf; @Before public void init(){ - System.setProperty(XACMLProperties.XACML_PROPERTIES_NAME,"xacml.pap.properties"); + System.setProperty(XACMLProperties.XACML_PROPERTIES_NAME,"src/test/resources/xacml.pap.properties"); emf = Persistence.createEntityManagerFactory("testPapPU"); EntityManager em = emf.createEntityManager(); em.getTransaction().begin(); @@ -396,7 +396,7 @@ public class PolicyDBDaoTest { group.deleteGroup(groupToDelete, groupToMoveTo,"testuser"); group.commitTransaction(); Assert.fail(); - } catch(PAPException pe){ + } catch(PolicyDBException pe){ //good, can't delete group with pdps group.rollbackTransaction(); } catch(Exception e){ @@ -441,21 +441,6 @@ public class PolicyDBDaoTest { em.close(); } - @Test - public void encryptionTest(){ - try { - String encr = d.encryptPassword("testpassword"); - System.out.println("original password: "+"testpassword"); - System.out.println("Encrypted password: "+encr); - String decr = d.decryptPassword(encr); - System.out.println("Decrypted password: "+decr); - Assert.assertEquals("testpassword", decr); - } catch (Exception e) { - logger.error("Exception Occured"+e); - Assert.fail(); - } - - } @Test public void getDescriptionFromXacmlTest(){ String myTestDesc = "hello this is a test";