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%2FDecisionPolicyTest.java;h=e16dd98896a5cd512df22ec081911ad8009f962f;hb=9bf8e18042746f52b96155bb2654dfb472f09e14;hp=caa5707cc0e476cf2db25bb2e13202b8da6c9377;hpb=b2c2186295866511b3c989279599388aaacd0ba2;p=policy%2Fengine.git diff --git a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/components/DecisionPolicyTest.java b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/components/DecisionPolicyTest.java index caa5707cc..e16dd9889 100644 --- a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/components/DecisionPolicyTest.java +++ b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/components/DecisionPolicyTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP-PAP-REST * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,6 @@ */ package org.onap.policy.pap.xacml.rest.components; -import static org.junit.Assert.*; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.when; @@ -30,7 +29,6 @@ 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.mockito.Mockito; @@ -101,18 +99,11 @@ public class DecisionPolicyTest { policyAdapter.setRainydayMap(treatmentMap); policyAdapter.setRainyday(rainyday); - component = new DecisionPolicy(policyAdapter); + component = new DecisionPolicy(policyAdapter, null); 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.DecisionPolicy#savePolicies()}. */ @@ -140,25 +131,7 @@ public class DecisionPolicyTest { public void testPrepareToSaveRainyDay() { logger.debug("test PrepareToSave Policy: enter"); policyAdapter.setRuleProvider("Rainy_Day"); - component = new DecisionPolicy(policyAdapter); - boolean response = false; - - try { - response = component.prepareToSave(); - } catch (Exception e) { - logger.error("Exception Occured"+e); - } - assertTrue(response); - } - - /** - * Test method for {@link org.openecomp.policy.pap.xacml.rest.components.DecisionPolicy#prepareToSave()}. - */ - @Test - public void testPrepareToSaveCustom() { - logger.debug("test PrepareToSave Policy: enter"); - policyAdapter.setRuleProvider("Custom"); - component = new DecisionPolicy(policyAdapter); + component = new DecisionPolicy(policyAdapter, null); boolean response = false; try { @@ -168,6 +141,4 @@ public class DecisionPolicyTest { } assertTrue(response); } - - } \ No newline at end of file