Consolidate PolicyRestAdapter setup
[policy/engine.git] / ONAP-PAP-REST / src / test / java / org / onap / policy / pap / xacml / rest / components / ActionPolicyTest.java
index b80eaed..6f4e097 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * ONAP-PAP-REST
  * ================================================================================
  * ============LICENSE_START=======================================================
  * ONAP-PAP-REST
  * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017, 2019 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Modifications Copyright (C) 2019 Samsung
  * ================================================================================
  * ================================================================================
  * Modifications Copyright (C) 2019 Samsung
  * ================================================================================
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
+
 package org.onap.policy.pap.xacml.rest.components;
 
 import static org.junit.Assert.*;
 import static org.mockito.Mockito.when;
 package org.onap.policy.pap.xacml.rest.components;
 
 import static org.junit.Assert.*;
 import static org.mockito.Mockito.when;
+
+import com.att.research.xacml.util.XACMLProperties;
+
 import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import java.util.UUID;
+
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -35,8 +40,6 @@ import org.mockito.Mockito;
 import org.onap.policy.common.logging.flexlogger.FlexLogger;
 import org.onap.policy.common.logging.flexlogger.Logger;
 import org.onap.policy.rest.adapter.PolicyRestAdapter;
 import org.onap.policy.common.logging.flexlogger.FlexLogger;
 import org.onap.policy.common.logging.flexlogger.Logger;
 import org.onap.policy.rest.adapter.PolicyRestAdapter;
-import com.att.research.xacml.util.XACMLProperties;
-
 
 public class ActionPolicyTest {
 
 
 public class ActionPolicyTest {
 
@@ -55,8 +58,7 @@ public class ActionPolicyTest {
     @Before
     public void setUp() throws Exception {
         logger.info("setUp: Entering");
     @Before
     public void setUp() throws Exception {
         logger.info("setUp: Entering");
-        System.setProperty(XACMLProperties.XACML_PROPERTIES_NAME,
-                "src/test/resources/xacml.pap.properties");
+        System.setProperty(XACMLProperties.XACML_PROPERTIES_NAME, "src/test/resources/xacml.pap.properties");
 
         dynamicRuleAlgorithmLabels.add("test");
         dynamicRuleAlgorithmField1.add("testField1");
 
         dynamicRuleAlgorithmLabels.add("test");
         dynamicRuleAlgorithmField1.add("testField1");
@@ -65,8 +67,7 @@ public class ActionPolicyTest {
 
         policyAdapter.setPolicyName("Test.Action_junitTest");
         policyAdapter.setPolicyDescription("test");
 
         policyAdapter.setPolicyName("Test.Action_junitTest");
         policyAdapter.setPolicyDescription("test");
-        policyAdapter.setRuleCombiningAlgId(
-                "urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:permit-overrides");
+        policyAdapter.setRuleCombiningAlgId("urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:permit-overrides");
         policyAdapter.setPolicyType("Action");
         policyAdapter.setEditPolicy(false);
         policyAdapter.setDomainDir("Test");
         policyAdapter.setPolicyType("Action");
         policyAdapter.setEditPolicy(false);
         policyAdapter.setDomainDir("Test");
@@ -94,12 +95,6 @@ public class ActionPolicyTest {
         logger.info("setUp: exit");
     }
 
         logger.info("setUp: exit");
     }
 
-    /**
-     * @throws java.lang.Exception
-     */
-    @After
-    public void tearDown() throws Exception {}
-
     /**
      * Test method for
      * {@link org.openecomp.policy.pap.xacml.rest.components.ActionPolicy#savePolicies()}.
     /**
      * Test method for
      * {@link org.openecomp.policy.pap.xacml.rest.components.ActionPolicy#savePolicies()}.