aboutsummaryrefslogtreecommitdiffstats
path: root/PolicyEngineAPI/src/test/java/org/openecomp
diff options
context:
space:
mode:
authorGuo Ruijing <ruijing.guo@intel.com>2017-07-31 08:47:35 +0000
committerPamela Dragosh <pdragosh@research.att.com>2017-07-31 15:51:10 -0400
commit073cc188efe9abb4c010cf674e34e2cf46ef1c52 (patch)
tree155c23fbdf3a838ecb5f4183fc3bb6b09aac41eb /PolicyEngineAPI/src/test/java/org/openecomp
parent4ca818fdfb9b807562166800a086b413593d6894 (diff)
[POLICY-73] replace openecomp for policy-engine
Change-Id: I54072f6bcd388c0e05562614ee89b4ae7ad67004 Signed-off-by: Guo Ruijing <ruijing.guo@intel.com> Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'PolicyEngineAPI/src/test/java/org/openecomp')
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/AutoClientEndTest.java228
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/AutoClientUEBTest.java567
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/Handler.java126
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/ManualClientEndTest.java126
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/ManualClientEndUEBTest.java119
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/MatchStoreTest.java776
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/MatchesTest.java216
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/NotificationStoreTest.java359
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/NotificationUnMarshalTest.java256
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/StdLoadedPolicyTest.java314
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/StdPDPNotificationTest.java311
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/StdPolicyChangeResponseTest.java166
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/StdPolicyConfigTest.java821
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/StdPolicyResponseTest.java348
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/StdRemovedPolicyTest.java206
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/StdStatusTest.java1433
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/package-info.java27
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/ActionPolicyApiTest.java239
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/AttributeTypeTest.java81
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/ConfigBasePolicyTest.java325
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/ConfigFirewallPolicyTest.java254
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/ConfigRequestParametersTest.java362
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/DecisionPolicyApiTest.java219
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/DecisionRequestParametersTest.java232
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/DeletePolicyConditionTest.java91
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/DeletePolicyParametersTest.java314
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/EventRequestParametersTest.java193
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/GetConfigByPolicyNameTest.java63
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/GetConfigStringStringMapTest.java259
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/GetConfigStringStringTest.java213
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/GetConfigStringTest.java170
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/ImportParametersTest.java403
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/LoadedPolicyTest.java72
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/NotificationHandlerTest.java72
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/NotificationSchemeTest.java91
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/NotificationTypeTest.java91
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PDPNotificationTest.java72
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyChangeResponseTest.java72
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyClassTest.java91
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyConfigExceptionTest.java183
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyConfigStatusTest.java133
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyConfigTest.java72
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyConfigTypeTest.java91
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyDecisionExceptionTest.java183
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyDecisionTest.java91
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyEngineExceptionTest.java183
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyEngineInterfaceTest.java670
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyEngineTest.java170
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyEventExceptionTest.java183
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyParametersTest.java1409
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyResponseStatusTest.java154
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyResponseTest.java72
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyTypeTest.java91
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PushPolicyParametersTest.java269
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/RemovedPolicyTest.java72
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/SendEventTest.java155
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/TestRunner.java49
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/UpdateTypeTest.java91
-rw-r--r--PolicyEngineAPI/src/test/java/org/openecomp/policy/test/package-info.java24
59 files changed, 0 insertions, 14723 deletions
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/AutoClientEndTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/AutoClientEndTest.java
deleted file mode 100644
index 86f15992a..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/AutoClientEndTest.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.std.test;
-
-import static org.junit.Assert.assertNotNull;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.openecomp.policy.api.NotificationHandler;
-import org.openecomp.policy.api.NotificationScheme;
-import org.openecomp.policy.std.AutoClientEnd;
-import org.openecomp.policy.std.StdPolicyEngine;
-
-/**
- * The class <code>AutoClientEndTest</code> contains tests for the class <code>{@link AutoClientEnd}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- * @version $Revision: 1.0 $
- */
-public class AutoClientEndTest {
- /**
- * Run the AutoClientEnd() constructor test.
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testAutoClientEnd_1()
- throws Exception {
- AutoClientEnd result = new AutoClientEnd();
- assertNotNull(result);
- // add additional test code here
- }
-
- /**
- * Run the boolean getStatus() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetStatus_1()
- throws Exception {
-
- boolean result = AutoClientEnd.getStatus();
-
- assertNotNull(result);
- }
-
- /**
- * Run the String getURL() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetURL_1()
- throws Exception {
-
- String result = AutoClientEnd.getURL();
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.AutoClientEnd
- assertNotNull(result);
- }
-
-
- /**
- * Run the void setAuto(NotificationScheme,NotificationHandler) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetAuto()
- throws Exception {
- NotificationScheme scheme = NotificationScheme.AUTO_ALL_NOTIFICATIONS;
- NotificationHandler handler = null;
-
- AutoClientEnd.setAuto(scheme, handler);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.ExceptionInInitializerError
- // at org.apache.log4j.Logger.getLogger(Logger.java:104)
- // at org.openecomp.policy.std.AutoClientEnd.<clinit>(AutoClientEnd.java:39)
- }
-
- /**
- * Run the void setScheme(NotificationScheme) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetScheme()
- throws Exception {
-
- NotificationScheme scheme = NotificationScheme.AUTO_ALL_NOTIFICATIONS;
- AutoClientEnd.setScheme(scheme);
-
- }
-
- /**
- * Run the void start(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testStart()
- throws Exception {
- String url = "http://test.com";
-
- AutoClientEnd.start(url);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.AutoClientEnd
- }
-
-
- /**
- * Run the void start(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testStart_2()
- throws Exception {
- String url = null;
-
- AutoClientEnd.start(url);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.AutoClientEnd
- }
-
- /**
- * Run the void stop() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testStop_1()
- throws Exception {
-
- AutoClientEnd.stop();
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.AutoClientEnd
- }
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add set up code here
- StdPolicyEngine policyEngine = new StdPolicyEngine("Test/config_pass.properties", (String) null);
-
- NotificationHandler handler = policyEngine.getNotificationHandler();
- AutoClientEnd.setAuto(NotificationScheme.AUTO_ALL_NOTIFICATIONS, handler);
- AutoClientEnd.start("http://testurl.com");
-
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(AutoClientEndTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/AutoClientUEBTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/AutoClientUEBTest.java
deleted file mode 100644
index 28889677b..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/AutoClientUEBTest.java
+++ /dev/null
@@ -1,567 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.std.test;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import org.junit.*;
-import org.openecomp.policy.api.NotificationHandler;
-import org.openecomp.policy.api.NotificationScheme;
-import org.openecomp.policy.std.AutoClientUEB;
-
-import static org.junit.Assert.*;
-
-/**
- * The class <code>AutoClientUEBTest</code> contains tests for the class <code>{@link AutoClientUEB}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- * @version $Revision: 1.0 $
- */
-public class AutoClientUEBTest {
- /**
- * Run the AutoClientUEB(String,List<String>) constructor test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testAutoClientUEB_1()
- throws Exception {
- String url = "";
- String apiKey = "";
- String apiSecret = "";
- List<String> uebURLList = new LinkedList<String>();
-
- AutoClientUEB result = new AutoClientUEB(url, uebURLList, apiKey, apiSecret);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.ExceptionInInitializerError
- // at org.apache.log4j.Logger.getLogger(Logger.java:104)
- // at org.openecomp.policy.std.AutoClientUEB.<clinit>(AutoClientUEB.java:39)
- assertNotNull(result);
- }
-
- /**
- * Run the String getNotficationType() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetNotficationType_1()
- throws Exception {
-
- String result = AutoClientUEB.getNotficationType();
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.AutoClientUEB
- assertNull(result);
- }
-
- /**
- * Run the boolean getStatus() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetStatus_1()
- throws Exception {
-
- boolean result = AutoClientUEB.getStatus();
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.AutoClientUEB
- assertFalse(result);
- }
-
- /**
- * Run the String getURL() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetURL_1()
- throws Exception {
-
- String result = AutoClientUEB.getURL();
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.AutoClientUEB
- assertNotNull(result);
- }
-
- /**
- * Run the boolean isRunning() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testIsRunning_1()
- throws Exception {
- AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(), "", "");
- fixture.isRunning = true;
-
- boolean result = fixture.isRunning();
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.AutoClientUEB
- assertTrue(result);
- }
-
- /**
- * Run the void run() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testRun_1()
- throws Exception {
- AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(), "", "");
- fixture.isRunning = true;
-
- fixture.run();
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.AutoClientUEB
- }
-
- /**
- * Run the void run() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testRun_2()
- throws Exception {
- AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(), "", "");
- fixture.isRunning = true;
-
- fixture.run();
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.AutoClientUEB
- }
-
- /**
- * Run the void run() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testRun_3()
- throws Exception {
- AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(), "", "");
- fixture.isRunning = true;
-
- fixture.run();
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.AutoClientUEB
- }
-
- /**
- * Run the void run() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testRun_4()
- throws Exception {
- AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(), "", "");
- fixture.isRunning = true;
-
- fixture.run();
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.AutoClientUEB
- }
-
- /**
- * Run the void run() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testRun_5()
- throws Exception {
- AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
- fixture.isRunning = true;
-
- fixture.run();
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.AutoClientUEB
- }
-
- /**
- * Run the void run() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testRun_6()
- throws Exception {
- AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
- fixture.isRunning = true;
-
- fixture.run();
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.AutoClientUEB
- }
-
- /**
- * Run the void run() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testRun_7()
- throws Exception {
- AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
- fixture.isRunning = true;
-
- fixture.run();
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.AutoClientUEB
- }
-
- /**
- * Run the void run() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testRun_8()
- throws Exception {
- AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
- fixture.isRunning = true;
-
- fixture.run();
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.AutoClientUEB
- }
-
- /**
- * Run the void run() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testRun_9()
- throws Exception {
- AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
- fixture.isRunning = true;
-
- fixture.run();
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.AutoClientUEB
- }
-
- /**
- * Run the void run() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testRun_10()
- throws Exception {
- AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
- fixture.isRunning = true;
-
- fixture.run();
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.AutoClientUEB
- }
-
- /**
- * Run the void run() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testRun_11()
- throws Exception {
- AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
- fixture.isRunning = true;
-
- fixture.run();
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.AutoClientUEB
- }
-
- /**
- * Run the void run() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testRun_12()
- throws Exception {
- AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
- fixture.isRunning = true;
-
- fixture.run();
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.AutoClientUEB
- }
-
- /**
- * Run the void run() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testRun_13()
- throws Exception {
- AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
- fixture.isRunning = true;
-
- fixture.run();
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.AutoClientUEB
- }
-
- /**
- * Run the void run() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testRun_14()
- throws Exception {
- AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
- fixture.isRunning = true;
-
- fixture.run();
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.AutoClientUEB
- }
-
- /**
- * Run the void run() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testRun_15()
- throws Exception {
- AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
- fixture.isRunning = true;
-
- fixture.run();
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.AutoClientUEB
- }
-
- /**
- * Run the void run() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testRun_16()
- throws Exception {
- AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
- fixture.isRunning = true;
-
- fixture.run();
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.AutoClientUEB
- }
-
- /**
- * Run the void setAuto(NotificationScheme,NotificationHandler) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetAuto_1()
- throws Exception {
- AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
- fixture.isRunning = true;
- NotificationScheme scheme = NotificationScheme.AUTO_ALL_NOTIFICATIONS;
- NotificationHandler handler = null;
-
- fixture.setAuto(scheme, handler);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.AutoClientUEB
- }
-
- /**
- * Run the void setScheme(NotificationScheme) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetScheme_1()
- throws Exception {
- NotificationScheme scheme = NotificationScheme.AUTO_ALL_NOTIFICATIONS;
-
- AutoClientUEB.setScheme(scheme);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.AutoClientUEB
- }
-
- /**
- * Run the void terminate() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testTerminate_1()
- throws Exception {
- AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
- fixture.isRunning = true;
-
- fixture.terminate();
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.AutoClientUEB
- }
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add set up code here
- List<String> urlList = new LinkedList<String>();
- urlList.add("test2.com");
- AutoClientUEB client = new AutoClientUEB("test.com", urlList, "testKey", "testSecret");
- NotificationHandler handler = null;
- client.setAuto(NotificationScheme.AUTO_ALL_NOTIFICATIONS, handler);
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(AutoClientUEBTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/Handler.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/Handler.java
deleted file mode 100644
index 9879174cb..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/Handler.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.std.test;
-
-import java.util.Collection;
-
-import org.openecomp.policy.api.LoadedPolicy;
-import org.openecomp.policy.api.NotificationHandler;
-import org.openecomp.policy.api.NotificationType;
-import org.openecomp.policy.api.PDPNotification;
-import org.openecomp.policy.api.PolicyConfig;
-import org.openecomp.policy.api.PolicyConfigException;
-import org.openecomp.policy.api.PolicyConfigStatus;
-import org.openecomp.policy.api.PolicyEngine;
-import org.openecomp.policy.api.PolicyEngineException;
-import org.openecomp.policy.api.RemovedPolicy;
-import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
-import org.openecomp.policy.common.logging.flexlogger.Logger;
-
-public class Handler implements NotificationHandler{
-
- private static final Logger LOGGER = FlexLogger.getLogger(Handler.class);
-
- @Override
- public void notificationReceived(PDPNotification notification) {
- System.out.println("Notification Received...");
- System.out.println(notification.getNotificationType());
- if(notification.getNotificationType().equals(NotificationType.REMOVE)){
- System.out.println("Removed Policies: \n");
- for(RemovedPolicy removedPolicy: notification.getRemovedPolicies()){
- System.out.println(removedPolicy.getPolicyName());
- System.out.println(removedPolicy.getVersionNo());
- }
- }else if(notification.getNotificationType().equals(NotificationType.UPDATE)){
- System.out.println("Updated Policies: \n");
- for(LoadedPolicy updatedPolicy: notification.getLoadedPolicies()){
- System.out.println("policyName : " + updatedPolicy.getPolicyName());
- System.out.println("policyVersion :" + updatedPolicy.getVersionNo());
- if(updatedPolicy.getPolicyName().contains(".Config_")){
- System.out.println("Matches: " + updatedPolicy.getMatches());
- System.out.println("UpdateType: "+ updatedPolicy.getUpdateType());
- // Checking the Name is correct or not.
- try {
- PolicyEngine policyEngine = new PolicyEngine("config.properties");
- @SuppressWarnings("deprecation")
- Collection<PolicyConfig> policyConfigs = policyEngine.getConfigByPolicyName(updatedPolicy.getPolicyName());
- for(PolicyConfig policyConfig: policyConfigs){
- if(policyConfig.getPolicyConfigStatus().equals(PolicyConfigStatus.CONFIG_RETRIEVED)){
- System.out.println("Policy Retrieved with this Name notified. ");
- }else{
- System.err.println("\n\n Fail to retrieve policy !!!!\n\n");
- }
- // Also Test this case.
- if(policyConfig.getPolicyName().equals(updatedPolicy.getPolicyName())){
- System.out.println("Policy Name is good. ");
- }else{
- System.err.println("\n\n Fail to check Name \n\n");
- }
- }
- } catch (PolicyEngineException e) {
- LOGGER.error("Exception Occured"+e);
- } catch (PolicyConfigException e) {
- LOGGER.error("Exception Occured"+e);
- }
- }
- }
- }else if(notification.getNotificationType().equals(NotificationType.BOTH)){
- System.out.println("Both updated and Removed Notification: \n");
- System.out.println("Removed Policies: \n");
- for(RemovedPolicy removedPolicy: notification.getRemovedPolicies()){
- System.out.println(removedPolicy.getPolicyName());
- System.out.println(removedPolicy.getVersionNo());
- }
- System.out.println("Updated Policies: \n");
- for(LoadedPolicy updatedPolicy: notification.getLoadedPolicies()){
- System.out.println("policyName : " + updatedPolicy.getPolicyName());
- System.out.println("policyVersion :" + updatedPolicy.getVersionNo());
- System.out.println("Matches: " + updatedPolicy.getMatches());
- System.out.println("UpdateType: "+ updatedPolicy.getUpdateType());
- // Checking the Name is correct or not.
- try {
- PolicyEngine policyEngine = new PolicyEngine("config.properties");
- @SuppressWarnings("deprecation")
- Collection<PolicyConfig> policyConfigs = policyEngine.getConfigByPolicyName(updatedPolicy.getPolicyName());
- for(PolicyConfig policyConfig: policyConfigs){
- if(policyConfig.getPolicyConfigStatus().equals(PolicyConfigStatus.CONFIG_RETRIEVED)){
- System.out.println("Policy Retrieved with this Name notified. ");
- }else{
- System.err.println("\n\n Fail to retrieve policy !!!!\n\n");
- }
- // Also Test this case.
- if(policyConfig.getPolicyName().equals(updatedPolicy.getPolicyName())){
- System.out.println("Policy Name is good. ");
- }else{
- System.err.println("\n\n Fail to check Name \n\n");
- }
- }
- } catch (PolicyEngineException e) {
- LOGGER.error("Exception Occured"+e);
- } catch (PolicyConfigException e) {
- LOGGER.error("Exception Occured"+e);
- }
- }
- }
- }
-
-
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/ManualClientEndTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/ManualClientEndTest.java
deleted file mode 100644
index c44dac606..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/ManualClientEndTest.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.std.test;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.openecomp.policy.api.NotificationScheme;
-import org.openecomp.policy.api.PDPNotification;
-import org.openecomp.policy.std.ManualClientEnd;
-
-/**
- * The class <code>ManualClientEndTest</code> contains tests for the class <code>{@link ManualClientEnd}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- * @version $Revision: 1.0 $
- */
-public class ManualClientEndTest {
- /**
- * Run the ManualClientEnd() constructor test.
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testManualClientEnd_1()
- throws Exception {
- ManualClientEnd result = new ManualClientEnd();
- assertNotNull(result);
- // add additional test code here
- }
-
-
- /**
- * Run the PDPNotification result(NotificationScheme) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testResult_1()
- throws Exception {
- NotificationScheme scheme = NotificationScheme.AUTO_ALL_NOTIFICATIONS;
-
- PDPNotification result = ManualClientEnd.result(scheme);
-
- assertNull(result);
- }
-
-
- /**
- * Run the void start(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testStart_1()
- throws Exception {
- String url = "";
-
- ManualClientEnd.start(url);
-
- }
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(ManualClientEndTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/ManualClientEndUEBTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/ManualClientEndUEBTest.java
deleted file mode 100644
index f19697597..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/ManualClientEndUEBTest.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.std.test;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.openecomp.policy.api.NotificationScheme;
-import org.openecomp.policy.api.PDPNotification;
-import org.openecomp.policy.std.ManualClientEndUEB;
-import org.openecomp.policy.std.StdPDPNotification;
-
-/**
- * The class <code>ManualClientEndUEBTest</code> contains tests for the class <code>{@link ManualClientEndUEB}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- * @version $Revision: 1.0 $
- */
-public class ManualClientEndUEBTest {
-
- String resultJson = "{'test':'testing'}";
- String json = "{\"test\":\"testing\"}";
- StdPDPNotification notification = new StdPDPNotification();
- ManualClientEndUEB mockManualClient = null;
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Before
- public void setUp()
- throws Exception {
- String url = "http://test.com";
- List<String> uebURLList = new LinkedList<String>();
- uebURLList.add(url);
-
- }
- /**
- * Run the ManualClientEndUEB() constructor test.
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testManualClientEndUEB_1()
- throws Exception {
- ManualClientEndUEB result = new ManualClientEndUEB();
- assertNotNull(result);
- // add additional test code here
- }
-
- /**
- * Run the PDPNotification result(NotificationScheme) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testResult_1()
- throws Exception {
- NotificationScheme scheme = NotificationScheme.AUTO_ALL_NOTIFICATIONS;
-
- PDPNotification result = ManualClientEndUEB.result(scheme);
-
- assertNull(result);
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(ManualClientEndUEBTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/MatchStoreTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/MatchStoreTest.java
deleted file mode 100644
index ab8946c60..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/MatchStoreTest.java
+++ /dev/null
@@ -1,776 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.std.test;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-
-import java.util.HashSet;
-import java.util.Hashtable;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.openecomp.policy.api.PDPNotification;
-import org.openecomp.policy.std.MatchStore;
-import org.openecomp.policy.std.Matches;
-import org.openecomp.policy.std.StdPDPNotification;
-
-/**
- * The class <code>MatchStoreTest</code> contains tests for the class <code>{@link MatchStore}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- * @version $Revision: 1.0 $
- */
-public class MatchStoreTest {
- /**
- * Run the MatchStore() constructor test.
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testMatchStore_1()
- throws Exception {
- MatchStore result = new MatchStore();
- assertNotNull(result);
- // add additional test code here
- }
-
- /**
- * Run the PDPNotification checkMatch(PDPNotification) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testCheckMatch_1()
- throws Exception {
- PDPNotification oldNotification = null;
-
- PDPNotification result = MatchStore.checkMatch(oldNotification);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.MatchStore
- assertNull(result);
- }
-
- /**
- * Run the PDPNotification checkMatch(PDPNotification) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testCheckMatch_2()
- throws Exception {
- PDPNotification oldNotification = new StdPDPNotification();
-
- PDPNotification result = MatchStore.checkMatch(oldNotification);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.MatchStore
- assertNotNull(result);
- }
-
- /**
- * Run the PDPNotification checkMatch(PDPNotification) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testCheckMatch_3()
- throws Exception {
- PDPNotification oldNotification = new StdPDPNotification();
-
- PDPNotification result = MatchStore.checkMatch(oldNotification);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.MatchStore
- assertNotNull(result);
- }
-
- /**
- * Run the PDPNotification checkMatch(PDPNotification) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testCheckMatch_4()
- throws Exception {
- PDPNotification oldNotification = new StdPDPNotification();
-
- PDPNotification result = MatchStore.checkMatch(oldNotification);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.MatchStore
- assertNotNull(result);
- }
-
- /**
- * Run the PDPNotification checkMatch(PDPNotification) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testCheckMatch_5()
- throws Exception {
- PDPNotification oldNotification = new StdPDPNotification();
-
- PDPNotification result = MatchStore.checkMatch(oldNotification);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.MatchStore
- assertNotNull(result);
- }
-
- /**
- * Run the PDPNotification checkMatch(PDPNotification) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testCheckMatch_6()
- throws Exception {
- PDPNotification oldNotification = new StdPDPNotification();
-
- PDPNotification result = MatchStore.checkMatch(oldNotification);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.MatchStore
- assertNotNull(result);
- }
-
- /**
- * Run the PDPNotification checkMatch(PDPNotification) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testCheckMatch_7()
- throws Exception {
- PDPNotification oldNotification = new StdPDPNotification();
-
- PDPNotification result = MatchStore.checkMatch(oldNotification);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.MatchStore
- assertNotNull(result);
- }
-
- /**
- * Run the PDPNotification checkMatch(PDPNotification) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testCheckMatch_8()
- throws Exception {
- PDPNotification oldNotification = new StdPDPNotification();
-
- PDPNotification result = MatchStore.checkMatch(oldNotification);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.MatchStore
- assertNotNull(result);
- }
-
- /**
- * Run the PDPNotification checkMatch(PDPNotification) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testCheckMatch_9()
- throws Exception {
- PDPNotification oldNotification = new StdPDPNotification();
-
- PDPNotification result = MatchStore.checkMatch(oldNotification);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.MatchStore
- assertNotNull(result);
- }
-
- /**
- * Run the PDPNotification checkMatch(PDPNotification) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testCheckMatch_10()
- throws Exception {
- PDPNotification oldNotification = new StdPDPNotification();
-
- PDPNotification result = MatchStore.checkMatch(oldNotification);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.MatchStore
- assertNotNull(result);
- }
-
- /**
- * Run the PDPNotification checkMatch(PDPNotification) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testCheckMatch_11()
- throws Exception {
- PDPNotification oldNotification = new StdPDPNotification();
-
- PDPNotification result = MatchStore.checkMatch(oldNotification);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.MatchStore
- assertNotNull(result);
- }
-
- /**
- * Run the PDPNotification checkMatch(PDPNotification) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testCheckMatch_12()
- throws Exception {
- PDPNotification oldNotification = new StdPDPNotification();
-
- PDPNotification result = MatchStore.checkMatch(oldNotification);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.MatchStore
- assertNotNull(result);
- }
-
- /**
- * Run the PDPNotification checkMatch(PDPNotification) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testCheckMatch_13()
- throws Exception {
- PDPNotification oldNotification = new StdPDPNotification();
-
- PDPNotification result = MatchStore.checkMatch(oldNotification);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.MatchStore
- assertNotNull(result);
- }
-
- /**
- * Run the PDPNotification checkMatch(PDPNotification) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testCheckMatch_14()
- throws Exception {
- PDPNotification oldNotification = new StdPDPNotification();
-
- PDPNotification result = MatchStore.checkMatch(oldNotification);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.MatchStore
- assertNotNull(result);
- }
-
- /**
- * Run the PDPNotification checkMatch(PDPNotification) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testCheckMatch_15()
- throws Exception {
- PDPNotification oldNotification = new StdPDPNotification();
-
- PDPNotification result = MatchStore.checkMatch(oldNotification);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.MatchStore
- assertNotNull(result);
- }
-
- /**
- * Run the PDPNotification checkMatch(PDPNotification) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testCheckMatch_16()
- throws Exception {
- PDPNotification oldNotification = new StdPDPNotification();
-
- PDPNotification result = MatchStore.checkMatch(oldNotification);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.MatchStore
- assertNotNull(result);
- }
-
- /**
- * Run the HashSet<Matches> getMatchStore() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetMatchStore_1()
- throws Exception {
-
- HashSet<Matches> result = MatchStore.getMatchStore();
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.ExceptionInInitializerError
- // at org.apache.log4j.Logger.getLogger(Logger.java:104)
- // at org.openecomp.policy.std.MatchStore.<clinit>(MatchStore.java:15)
- assertNotNull(result);
- }
-
- /**
- * Run the void storeMatch(Matches) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testStoreMatch_1()
- throws Exception {
- Matches newMatch = new Matches();
- newMatch.setConfigName("");
- newMatch.setEcompName("");
-
- MatchStore.storeMatch(newMatch);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.MatchStore
- }
-
- /**
- * Run the void storeMatch(Matches) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testStoreMatch_2()
- throws Exception {
- Matches newMatch = new Matches();
- newMatch.setConfigName("");
- newMatch.setEcompName("");
-
- MatchStore.storeMatch(newMatch);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.MatchStore
- }
-
- /**
- * Run the void storeMatch(Matches) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testStoreMatch_3()
- throws Exception {
- Matches newMatch = new Matches();
- newMatch.setConfigName("");
- newMatch.setEcompName("");
-
- MatchStore.storeMatch(newMatch);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.MatchStore
- }
-
- /**
- * Run the void storeMatch(Matches) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testStoreMatch_4()
- throws Exception {
- Matches newMatch = new Matches();
- newMatch.setConfigAttributes(new Hashtable<String, String>());
- newMatch.setConfigName("");
- newMatch.setEcompName("");
-
- MatchStore.storeMatch(newMatch);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.MatchStore
- }
-
- /**
- * Run the void storeMatch(Matches) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testStoreMatch_5()
- throws Exception {
- Matches newMatch = new Matches();
- newMatch.setConfigAttributes(new Hashtable<String, String>());
- newMatch.setConfigName("");
- newMatch.setEcompName("");
-
- MatchStore.storeMatch(newMatch);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.MatchStore
- }
-
- /**
- * Run the void storeMatch(Matches) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testStoreMatch_6()
- throws Exception {
- Matches newMatch = new Matches();
- newMatch.setConfigAttributes(new Hashtable<String, String>());
- newMatch.setConfigName("");
- newMatch.setEcompName("");
-
- MatchStore.storeMatch(newMatch);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.MatchStore
- }
-
- /**
- * Run the void storeMatch(Matches) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testStoreMatch_7()
- throws Exception {
- Matches newMatch = new Matches();
- newMatch.setConfigAttributes(new Hashtable<String, String>());
- newMatch.setConfigName("");
- newMatch.setEcompName("");
-
- MatchStore.storeMatch(newMatch);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.MatchStore
- }
-
- /**
- * Run the void storeMatch(Matches) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testStoreMatch_8()
- throws Exception {
- Matches newMatch = new Matches();
- newMatch.setConfigName("");
- newMatch.setEcompName("");
-
- MatchStore.storeMatch(newMatch);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.MatchStore
- }
-
- /**
- * Run the void storeMatch(Matches) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testStoreMatch_9()
- throws Exception {
- Matches newMatch = new Matches();
- newMatch.setEcompName("");
-
- MatchStore.storeMatch(newMatch);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.MatchStore
- }
-
- /**
- * Run the void storeMatch(Matches) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testStoreMatch_10()
- throws Exception {
- Matches newMatch = new Matches();
- newMatch.setConfigAttributes(new Hashtable<String, String>());
- newMatch.setConfigName("");
- newMatch.setEcompName("");
-
- MatchStore.storeMatch(newMatch);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.MatchStore
- }
-
- /**
- * Run the void storeMatch(Matches) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testStoreMatch_11()
- throws Exception {
- Matches newMatch = new Matches();
- newMatch.setConfigAttributes(new Hashtable<String, String>());
- newMatch.setConfigName("");
- newMatch.setEcompName("");
-
- MatchStore.storeMatch(newMatch);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.MatchStore
- }
-
- /**
- * Run the void storeMatch(Matches) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testStoreMatch_12()
- throws Exception {
- Matches newMatch = new Matches();
- newMatch.setConfigAttributes(new Hashtable<String, String>());
- newMatch.setConfigName("");
- newMatch.setEcompName("");
-
- MatchStore.storeMatch(newMatch);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.MatchStore
- }
-
- /**
- * Run the void storeMatch(Matches) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testStoreMatch_13()
- throws Exception {
- Matches newMatch = new Matches();
- newMatch.setConfigAttributes(new Hashtable<String, String>());
- newMatch.setConfigName("");
- newMatch.setEcompName("");
-
- MatchStore.storeMatch(newMatch);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.MatchStore
- }
-
- /**
- * Run the void storeMatch(Matches) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testStoreMatch_14()
- throws Exception {
- Matches newMatch = new Matches();
- newMatch.setConfigAttributes(new Hashtable<String, String>());
- newMatch.setConfigName("");
- newMatch.setEcompName("");
-
- MatchStore.storeMatch(newMatch);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.MatchStore
- }
-
- /**
- * Run the void storeMatch(Matches) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testStoreMatch_15()
- throws Exception {
- Matches newMatch = new Matches();
-
- MatchStore.storeMatch(newMatch);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.MatchStore
- }
-
- /**
- * Run the void storeMatch(Matches) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testStoreMatch_16()
- throws Exception {
- Matches newMatch = null;
-
- MatchStore.storeMatch(newMatch);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.MatchStore
- }
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(MatchStoreTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/MatchesTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/MatchesTest.java
deleted file mode 100644
index cdc9b5595..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/MatchesTest.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.std.test;
-
-import java.util.Hashtable;
-import java.util.Map;
-
-import org.junit.*;
-import org.openecomp.policy.std.Matches;
-
-import static org.junit.Assert.*;
-
-/**
- * The class <code>MatchesTest</code> contains tests for the class <code>{@link Matches}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- * @version $Revision: 1.0 $
- */
-public class MatchesTest {
- /**
- * Run the Matches() constructor test.
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testMatches_1()
- throws Exception {
- Matches result = new Matches();
- assertNotNull(result);
- // add additional test code here
- }
-
- /**
- * Run the Map<String, String> getConfigAttributes() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetConfigAttributes_1()
- throws Exception {
- Matches fixture = new Matches();
- fixture.setEcompName("");
- fixture.setConfigAttributes(new Hashtable<String, String>());
- fixture.setConfigName("");
-
- Map<String, String> result = fixture.getConfigAttributes();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(0, result.size());
- }
-
- /**
- * Run the String getConfigName() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetConfigName_1()
- throws Exception {
- Matches fixture = new Matches();
- fixture.setEcompName("");
- fixture.setConfigAttributes(new Hashtable<String, String>());
- fixture.setConfigName("");
-
- String result = fixture.getConfigName();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the String getEcompName() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetEcompName_1()
- throws Exception {
- Matches fixture = new Matches();
- fixture.setEcompName("");
- fixture.setConfigAttributes(new Hashtable<String, String>());
- fixture.setConfigName("");
-
- String result = fixture.getEcompName();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the void setConfigAttributes(Map<String,String>) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetConfigAttributes_1()
- throws Exception {
- Matches fixture = new Matches();
- fixture.setEcompName("");
- fixture.setConfigAttributes(new Hashtable<String, String>());
- fixture.setConfigName("");
- Map<String, String> configAttributes = new Hashtable<String, String>();
-
- fixture.setConfigAttributes(configAttributes);
-
- // add additional test code here
- }
-
- /**
- * Run the void setConfigName(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetConfigName_1()
- throws Exception {
- Matches fixture = new Matches();
- fixture.setEcompName("");
- fixture.setConfigAttributes(new Hashtable<String, String>());
- fixture.setConfigName("");
- String configName = "";
-
- fixture.setConfigName(configName);
-
- // add additional test code here
- }
-
- /**
- * Run the void setEcompName(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetEcompName_1()
- throws Exception {
- Matches fixture = new Matches();
- fixture.setEcompName("");
- fixture.setConfigAttributes(new Hashtable<String, String>());
- fixture.setConfigName("");
- String ecompName = "";
-
- fixture.setEcompName(ecompName);
-
- // add additional test code here
- }
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(MatchesTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/NotificationStoreTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/NotificationStoreTest.java
deleted file mode 100644
index d54c4f4cb..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/NotificationStoreTest.java
+++ /dev/null
@@ -1,359 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.std.test;
-
-import org.junit.*;
-import org.openecomp.policy.std.NotificationStore;
-import org.openecomp.policy.std.StdPDPNotification;
-
-import static org.junit.Assert.*;
-
-/**
- * The class <code>NotificationStoreTest</code> contains tests for the class <code>{@link NotificationStore}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- * @version $Revision: 1.0 $
- */
-public class NotificationStoreTest {
- /**
- * Run the NotificationStore() constructor test.
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testNotificationStore_1()
- throws Exception {
- NotificationStore result = new NotificationStore();
- assertNotNull(result);
- // add additional test code here
- }
-
- /**
- * Run the void recordNotification(StdPDPNotification) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testRecordNotification_1()
- throws Exception {
- StdPDPNotification notification = new StdPDPNotification();
-
- NotificationStore.recordNotification(notification);
-
- // add additional test code here
- }
-
- /**
- * Run the void recordNotification(StdPDPNotification) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testRecordNotification_2()
- throws Exception {
- StdPDPNotification notification = new StdPDPNotification();
-
- NotificationStore.recordNotification(notification);
-
- // add additional test code here
- }
-
- /**
- * Run the void recordNotification(StdPDPNotification) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testRecordNotification_3()
- throws Exception {
- StdPDPNotification notification = new StdPDPNotification();
-
- NotificationStore.recordNotification(notification);
-
- // add additional test code here
- }
-
- /**
- * Run the void recordNotification(StdPDPNotification) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testRecordNotification_4()
- throws Exception {
- StdPDPNotification notification = new StdPDPNotification();
-
- NotificationStore.recordNotification(notification);
-
- // add additional test code here
- }
-
- /**
- * Run the void recordNotification(StdPDPNotification) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testRecordNotification_5()
- throws Exception {
- StdPDPNotification notification = new StdPDPNotification();
-
- NotificationStore.recordNotification(notification);
-
- // add additional test code here
- }
-
- /**
- * Run the void recordNotification(StdPDPNotification) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testRecordNotification_6()
- throws Exception {
- StdPDPNotification notification = new StdPDPNotification();
-
- NotificationStore.recordNotification(notification);
-
- // add additional test code here
- }
-
- /**
- * Run the void recordNotification(StdPDPNotification) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testRecordNotification_7()
- throws Exception {
- StdPDPNotification notification = new StdPDPNotification();
-
- NotificationStore.recordNotification(notification);
-
- // add additional test code here
- }
-
- /**
- * Run the void recordNotification(StdPDPNotification) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testRecordNotification_8()
- throws Exception {
- StdPDPNotification notification = new StdPDPNotification();
-
- NotificationStore.recordNotification(notification);
-
- // add additional test code here
- }
-
- /**
- * Run the void recordNotification(StdPDPNotification) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testRecordNotification_9()
- throws Exception {
- StdPDPNotification notification = new StdPDPNotification();
-
- NotificationStore.recordNotification(notification);
-
- // add additional test code here
- }
-
- /**
- * Run the void recordNotification(StdPDPNotification) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testRecordNotification_10()
- throws Exception {
- StdPDPNotification notification = new StdPDPNotification();
-
- NotificationStore.recordNotification(notification);
-
- // add additional test code here
- }
-
- /**
- * Run the void recordNotification(StdPDPNotification) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testRecordNotification_11()
- throws Exception {
- StdPDPNotification notification = new StdPDPNotification();
-
- NotificationStore.recordNotification(notification);
-
- // add additional test code here
- }
-
- /**
- * Run the void recordNotification(StdPDPNotification) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testRecordNotification_12()
- throws Exception {
- StdPDPNotification notification = new StdPDPNotification();
-
- NotificationStore.recordNotification(notification);
-
- // add additional test code here
- }
-
- /**
- * Run the void recordNotification(StdPDPNotification) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testRecordNotification_13()
- throws Exception {
- StdPDPNotification notification = new StdPDPNotification();
-
- NotificationStore.recordNotification(notification);
-
- // add additional test code here
- }
-
- /**
- * Run the void recordNotification(StdPDPNotification) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testRecordNotification_14()
- throws Exception {
- StdPDPNotification notification = new StdPDPNotification();
-
- NotificationStore.recordNotification(notification);
-
- // add additional test code here
- }
-
- /**
- * Run the void recordNotification(StdPDPNotification) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testRecordNotification_15()
- throws Exception {
- StdPDPNotification notification = new StdPDPNotification();
-
- NotificationStore.recordNotification(notification);
-
- // add additional test code here
- }
-
- /**
- * Run the void recordNotification(StdPDPNotification) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testRecordNotification_16()
- throws Exception {
- StdPDPNotification notification = null;
-
- NotificationStore.recordNotification(notification);
-
- // add additional test code here
- }
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(NotificationStoreTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/NotificationUnMarshalTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/NotificationUnMarshalTest.java
deleted file mode 100644
index 674c58a00..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/NotificationUnMarshalTest.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.std.test;
-
-import static org.junit.Assert.assertNotNull;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.openecomp.policy.std.NotificationUnMarshal;
-import org.openecomp.policy.std.StdPDPNotification;
-
-/**
- * The class <code>NotificationUnMarshalTest</code> contains tests for the class <code>{@link NotificationUnMarshal}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- * @version $Revision: 1.0 $
- */
-public class NotificationUnMarshalTest {
- /**
- * Run the StdPDPNotification notificationJSON(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test(expected = com.fasterxml.jackson.databind.JsonMappingException.class)
- public void testNotificationJSON_1()
- throws Exception {
- String json = "";
-
- StdPDPNotification result = NotificationUnMarshal.notificationJSON(json);
-
- // add additional test code here
- assertNotNull(result);
- }
-
- /**
- * Run the StdPDPNotification notificationJSON(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test(expected = com.fasterxml.jackson.databind.JsonMappingException.class)
- public void testNotificationJSON_2()
- throws Exception {
- String json = "";
-
- StdPDPNotification result = NotificationUnMarshal.notificationJSON(json);
-
- // add additional test code here
- assertNotNull(result);
- }
-
- /**
- * Run the StdPDPNotification notificationJSON(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test(expected = com.fasterxml.jackson.databind.JsonMappingException.class)
- public void testNotificationJSON_3()
- throws Exception {
- String json = "";
-
- StdPDPNotification result = NotificationUnMarshal.notificationJSON(json);
-
- // add additional test code here
- assertNotNull(result);
- }
-
- /**
- * Run the StdPDPNotification notificationJSON(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test(expected = com.fasterxml.jackson.databind.JsonMappingException.class)
- public void testNotificationJSON_4()
- throws Exception {
- String json = "";
-
- StdPDPNotification result = NotificationUnMarshal.notificationJSON(json);
-
- // add additional test code here
- assertNotNull(result);
- }
-
- /**
- * Run the StdPDPNotification notificationJSON(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test(expected = com.fasterxml.jackson.databind.JsonMappingException.class)
- public void testNotificationJSON_5()
- throws Exception {
- String json = "";
-
- StdPDPNotification result = NotificationUnMarshal.notificationJSON(json);
-
- // add additional test code here
- assertNotNull(result);
- }
-
- /**
- * Run the StdPDPNotification notificationJSON(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test(expected = com.fasterxml.jackson.databind.JsonMappingException.class)
- public void testNotificationJSON_6()
- throws Exception {
- String json = "";
-
- StdPDPNotification result = NotificationUnMarshal.notificationJSON(json);
-
- // add additional test code here
- assertNotNull(result);
- }
-
- /**
- * Run the StdPDPNotification notificationJSON(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test(expected = com.fasterxml.jackson.databind.JsonMappingException.class)
- public void testNotificationJSON_7()
- throws Exception {
- String json = "";
-
- StdPDPNotification result = NotificationUnMarshal.notificationJSON(json);
-
- // add additional test code here
- assertNotNull(result);
- }
-
- /**
- * Run the StdPDPNotification notificationJSON(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test(expected = com.fasterxml.jackson.databind.JsonMappingException.class)
- public void testNotificationJSON_8()
- throws Exception {
- String json = "";
-
- StdPDPNotification result = NotificationUnMarshal.notificationJSON(json);
-
- // add additional test code here
- assertNotNull(result);
- }
-
- /**
- * Run the StdPDPNotification notificationJSON(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test(expected = com.fasterxml.jackson.databind.JsonMappingException.class)
- public void testNotificationJSON_9()
- throws Exception {
- String json = "";
-
- StdPDPNotification result = NotificationUnMarshal.notificationJSON(json);
-
- // add additional test code here
- assertNotNull(result);
- }
-
- /**
- * Run the StdPDPNotification notificationJSON(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test(expected = com.fasterxml.jackson.databind.JsonMappingException.class)
- public void testNotificationJSON_10()
- throws Exception {
- String json = "";
-
- StdPDPNotification result = NotificationUnMarshal.notificationJSON(json);
-
- // add additional test code here
- assertNotNull(result);
- }
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(NotificationUnMarshalTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/StdLoadedPolicyTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/StdLoadedPolicyTest.java
deleted file mode 100644
index de8a6a7ad..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/StdLoadedPolicyTest.java
+++ /dev/null
@@ -1,314 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.std.test;
-
-import java.util.Hashtable;
-import java.util.Map;
-
-import org.junit.*;
-import org.openecomp.policy.api.UpdateType;
-import org.openecomp.policy.std.StdLoadedPolicy;
-
-import static org.junit.Assert.*;
-
-/**
- * The class <code>StdLoadedPolicyTest</code> contains tests for the class <code>{@link StdLoadedPolicy}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- * @version $Revision: 1.0 $
- */
-public class StdLoadedPolicyTest {
- /**
- * Run the StdLoadedPolicy() constructor test.
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testStdLoadedPolicy_1()
- throws Exception {
- StdLoadedPolicy result = new StdLoadedPolicy();
- assertNotNull(result);
- // add additional test code here
- }
-
- /**
- * Run the Map<String, String> getMatches() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetMatches_1()
- throws Exception {
- StdLoadedPolicy fixture = new StdLoadedPolicy();
- fixture.setPolicyName("");
- fixture.setVersionNo("");
- fixture.setUpdateType(UpdateType.NEW);
- fixture.setMatches(new Hashtable<String, String>());
-
- Map<String, String> result = fixture.getMatches();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(0, result.size());
- }
-
- /**
- * Run the String getPolicyName() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetPolicyName_1()
- throws Exception {
- StdLoadedPolicy fixture = new StdLoadedPolicy();
- fixture.setPolicyName("");
- fixture.setVersionNo("");
- fixture.setUpdateType(UpdateType.NEW);
- fixture.setMatches(new Hashtable<String, String>());
-
- String result = fixture.getPolicyName();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the String getPolicyName() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetPolicyName_2()
- throws Exception {
- StdLoadedPolicy fixture = new StdLoadedPolicy();
- fixture.setPolicyName((String) null);
- fixture.setVersionNo("");
- fixture.setUpdateType(UpdateType.NEW);
- fixture.setMatches(new Hashtable<String, String>());
-
- String result = fixture.getPolicyName();
-
- // add additional test code here
- assertEquals(null, result);
- }
-
- /**
- * Run the String getPolicyName() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetPolicyName_3()
- throws Exception {
- StdLoadedPolicy fixture = new StdLoadedPolicy();
- fixture.setPolicyName("");
- fixture.setVersionNo("");
- fixture.setUpdateType(UpdateType.NEW);
- fixture.setMatches(new Hashtable<String, String>());
-
- String result = fixture.getPolicyName();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the UpdateType getUpdateType() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetUpdateType_1()
- throws Exception {
- StdLoadedPolicy fixture = new StdLoadedPolicy();
- fixture.setPolicyName("");
- fixture.setVersionNo("");
- fixture.setUpdateType(UpdateType.NEW);
- fixture.setMatches(new Hashtable<String, String>());
-
- UpdateType result = fixture.getUpdateType();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("new", result.toString());
- assertEquals("NEW", result.name());
- assertEquals(1, result.ordinal());
- }
-
- /**
- * Run the String getVersionNo() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetVersionNo_1()
- throws Exception {
- StdLoadedPolicy fixture = new StdLoadedPolicy();
- fixture.setPolicyName("");
- fixture.setVersionNo("");
- fixture.setUpdateType(UpdateType.NEW);
- fixture.setMatches(new Hashtable<String, String>());
-
- String result = fixture.getVersionNo();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the void setMatches(Map<String,String>) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetMatches_1()
- throws Exception {
- StdLoadedPolicy fixture = new StdLoadedPolicy();
- fixture.setPolicyName("");
- fixture.setVersionNo("");
- fixture.setUpdateType(UpdateType.NEW);
- fixture.setMatches(new Hashtable<String, String>());
- Map<String, String> matches = new Hashtable<String, String>();
-
- fixture.setMatches(matches);
-
- // add additional test code here
- }
-
- /**
- * Run the void setPolicyName(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetPolicyName_1()
- throws Exception {
- StdLoadedPolicy fixture = new StdLoadedPolicy();
- fixture.setPolicyName("");
- fixture.setVersionNo("");
- fixture.setUpdateType(UpdateType.NEW);
- fixture.setMatches(new Hashtable<String, String>());
- String policyName = "";
-
- fixture.setPolicyName(policyName);
-
- // add additional test code here
- }
-
- /**
- * Run the void setUpdateType(UpdateType) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetUpdateType_1()
- throws Exception {
- StdLoadedPolicy fixture = new StdLoadedPolicy();
- fixture.setPolicyName("");
- fixture.setVersionNo("");
- fixture.setUpdateType(UpdateType.NEW);
- fixture.setMatches(new Hashtable<String, String>());
- UpdateType updateType = UpdateType.NEW;
-
- fixture.setUpdateType(updateType);
-
- // add additional test code here
- }
-
- /**
- * Run the void setVersionNo(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetVersionNo_1()
- throws Exception {
- StdLoadedPolicy fixture = new StdLoadedPolicy();
- fixture.setPolicyName("");
- fixture.setVersionNo("");
- fixture.setUpdateType(UpdateType.NEW);
- fixture.setMatches(new Hashtable<String, String>());
- String versionNo = "";
-
- fixture.setVersionNo(versionNo);
-
- // add additional test code here
- }
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(StdLoadedPolicyTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/StdPDPNotificationTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/StdPDPNotificationTest.java
deleted file mode 100644
index 1bda0e59f..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/StdPDPNotificationTest.java
+++ /dev/null
@@ -1,311 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.std.test;
-
-import java.util.Collection;
-import java.util.LinkedList;
-
-import org.junit.*;
-import org.openecomp.policy.api.LoadedPolicy;
-import org.openecomp.policy.api.NotificationType;
-import org.openecomp.policy.api.RemovedPolicy;
-import org.openecomp.policy.std.StdLoadedPolicy;
-import org.openecomp.policy.std.StdPDPNotification;
-import org.openecomp.policy.std.StdRemovedPolicy;
-
-import static org.junit.Assert.*;
-
-/**
- * The class <code>StdPDPNotificationTest</code> contains tests for the class <code>{@link StdPDPNotification}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- * @version $Revision: 1.0 $
- */
-public class StdPDPNotificationTest {
- /**
- * Run the StdPDPNotification() constructor test.
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testStdPDPNotification_1()
- throws Exception {
- StdPDPNotification result = new StdPDPNotification();
- assertNotNull(result);
- // add additional test code here
- }
-
- /**
- * Run the Collection<LoadedPolicy> getLoadedPolicies() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetLoadedPolicies_1()
- throws Exception {
- StdPDPNotification fixture = new StdPDPNotification();
- fixture.setRemovedPolicies(new LinkedList<StdRemovedPolicy>());
- fixture.setNotificationType(NotificationType.BOTH);
- fixture.setLoadedPolicies(new LinkedList<StdLoadedPolicy>());
-
- Collection<LoadedPolicy> result = fixture.getLoadedPolicies();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(0, result.size());
- }
-
- /**
- * Run the Collection<LoadedPolicy> getLoadedPolicies() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetLoadedPolicies_2()
- throws Exception {
- StdPDPNotification fixture = new StdPDPNotification();
- fixture.setRemovedPolicies(new LinkedList<StdRemovedPolicy>());
- fixture.setNotificationType(NotificationType.BOTH);
- fixture.setLoadedPolicies(new LinkedList<StdLoadedPolicy>());
-
- Collection<LoadedPolicy> result = fixture.getLoadedPolicies();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(0, result.size());
- }
-
- /**
- * Run the Collection<LoadedPolicy> getLoadedPolicies() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetLoadedPolicies_3()
- throws Exception {
- StdPDPNotification fixture = new StdPDPNotification();
- fixture.setRemovedPolicies(new LinkedList<StdRemovedPolicy>());
- fixture.setNotificationType(NotificationType.BOTH);
- fixture.setLoadedPolicies(null);
-
- Collection<LoadedPolicy> result = fixture.getLoadedPolicies();
-
- // add additional test code here
- assertEquals(null, result);
- }
-
- /**
- * Run the NotificationType getNotificationType() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetNotificationType_1()
- throws Exception {
- StdPDPNotification fixture = new StdPDPNotification();
- fixture.setRemovedPolicies(new LinkedList<StdRemovedPolicy>());
- fixture.setNotificationType(NotificationType.BOTH);
- fixture.setLoadedPolicies(new LinkedList<StdLoadedPolicy>());
-
- NotificationType result = fixture.getNotificationType();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("both", result.toString());
- assertEquals("BOTH", result.name());
- assertEquals(2, result.ordinal());
- }
-
- /**
- * Run the Collection<RemovedPolicy> getRemovedPolicies() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetRemovedPolicies_1()
- throws Exception {
- StdPDPNotification fixture = new StdPDPNotification();
- fixture.setRemovedPolicies(new LinkedList<StdRemovedPolicy>());
- fixture.setNotificationType(NotificationType.BOTH);
- fixture.setLoadedPolicies(new LinkedList<StdLoadedPolicy>());
-
- Collection<RemovedPolicy> result = fixture.getRemovedPolicies();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(0, result.size());
- }
-
- /**
- * Run the Collection<RemovedPolicy> getRemovedPolicies() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetRemovedPolicies_2()
- throws Exception {
- StdPDPNotification fixture = new StdPDPNotification();
- fixture.setRemovedPolicies(new LinkedList<StdRemovedPolicy>());
- fixture.setNotificationType(NotificationType.BOTH);
- fixture.setLoadedPolicies(new LinkedList<StdLoadedPolicy>());
-
- Collection<RemovedPolicy> result = fixture.getRemovedPolicies();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(0, result.size());
- }
-
- /**
- * Run the Collection<RemovedPolicy> getRemovedPolicies() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetRemovedPolicies_3()
- throws Exception {
- StdPDPNotification fixture = new StdPDPNotification();
- fixture.setRemovedPolicies(null);
- fixture.setNotificationType(NotificationType.BOTH);
- fixture.setLoadedPolicies(new LinkedList<StdLoadedPolicy>());
-
- Collection<RemovedPolicy> result = fixture.getRemovedPolicies();
-
- // add additional test code here
- assertEquals(null, result);
- }
-
- /**
- * Run the void setNotificationType(NotificationType) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetNotificationType_1()
- throws Exception {
- StdPDPNotification fixture = new StdPDPNotification();
- fixture.setRemovedPolicies(new LinkedList<StdRemovedPolicy>());
- fixture.setNotificationType(NotificationType.BOTH);
- fixture.setLoadedPolicies(new LinkedList<StdLoadedPolicy>());
- NotificationType notificationType = NotificationType.BOTH;
-
- fixture.setNotificationType(notificationType);
-
- // add additional test code here
- }
-
- /**
- * Run the void setRemovedPolicies(Collection<StdRemovedPolicy>) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetRemovedPolicies_1()
- throws Exception {
- StdPDPNotification fixture = new StdPDPNotification();
- fixture.setRemovedPolicies(new LinkedList<StdRemovedPolicy>());
- fixture.setNotificationType(NotificationType.BOTH);
- fixture.setLoadedPolicies(new LinkedList<StdLoadedPolicy>());
- Collection<StdRemovedPolicy> removedPolicies = new LinkedList<StdRemovedPolicy>();
-
- fixture.setRemovedPolicies(removedPolicies);
-
- // add additional test code here
- }
-
- /**
- * Run the void setUpdatedPolicies(Collection<StdLoadedPolicy>) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetUpdatedPolicies_1()
- throws Exception {
- StdPDPNotification fixture = new StdPDPNotification();
- fixture.setRemovedPolicies(new LinkedList<StdRemovedPolicy>());
- fixture.setNotificationType(NotificationType.BOTH);
- fixture.setLoadedPolicies(new LinkedList<StdLoadedPolicy>());
- Collection<StdLoadedPolicy> updatedPolicies = new LinkedList<StdLoadedPolicy>();
-
- fixture.setLoadedPolicies(updatedPolicies);
-
- // add additional test code here
- }
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(StdPDPNotificationTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/StdPolicyChangeResponseTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/StdPolicyChangeResponseTest.java
deleted file mode 100644
index 45c70187d..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/StdPolicyChangeResponseTest.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.std.test;
-
-import org.junit.*;
-import org.openecomp.policy.std.StdPolicyChangeResponse;
-
-import static org.junit.Assert.*;
-
-/**
- * The class <code>StdPolicyChangeResponseTest</code> contains tests for the class <code>{@link StdPolicyChangeResponse}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- * @version $Revision: 1.0 $
- */
-public class StdPolicyChangeResponseTest {
- /**
- * Run the StdPolicyChangeResponse() constructor test.
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testStdPolicyChangeResponse_1()
- throws Exception {
- StdPolicyChangeResponse result = new StdPolicyChangeResponse();
- assertNotNull(result);
- // add additional test code here
- }
-
- /**
- * Run the int getResponseCode() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetResponseCode_1()
- throws Exception {
- StdPolicyChangeResponse fixture = new StdPolicyChangeResponse();
- fixture.setResponseMessage("");
- fixture.setResponseCode(1);
-
- int result = fixture.getResponseCode();
-
- // add additional test code here
- assertEquals(1, result);
- }
-
- /**
- * Run the String getResponseMessage() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetResponseMessage_1()
- throws Exception {
- StdPolicyChangeResponse fixture = new StdPolicyChangeResponse();
- fixture.setResponseMessage("");
- fixture.setResponseCode(1);
-
- String result = fixture.getResponseMessage();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the void setResponseCode(int) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetResponseCode_1()
- throws Exception {
- StdPolicyChangeResponse fixture = new StdPolicyChangeResponse();
- fixture.setResponseMessage("");
- fixture.setResponseCode(1);
- int responseCode = 1;
-
- fixture.setResponseCode(responseCode);
-
- // add additional test code here
- }
-
- /**
- * Run the void setResponseMessage(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetResponseMessage_1()
- throws Exception {
- StdPolicyChangeResponse fixture = new StdPolicyChangeResponse();
- fixture.setResponseMessage("");
- fixture.setResponseCode(1);
- String responseMessage = "";
-
- fixture.setResponseMessage(responseMessage);
-
- // add additional test code here
- }
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(StdPolicyChangeResponseTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/StdPolicyConfigTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/StdPolicyConfigTest.java
deleted file mode 100644
index a34737477..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/StdPolicyConfigTest.java
+++ /dev/null
@@ -1,821 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.std.test;
-
-import java.util.Hashtable;
-import java.util.Map;
-import java.util.Properties;
-
-import javax.json.JsonObject;
-
-import org.junit.*;
-import org.openecomp.policy.api.PolicyConfigStatus;
-import org.openecomp.policy.api.PolicyType;
-import org.openecomp.policy.std.StdPolicyConfig;
-
-import static org.junit.Assert.*;
-
-import org.w3c.dom.Document;
-
-/**
- * The class <code>StdPolicyConfigTest</code> contains tests for the class <code>{@link StdPolicyConfig}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- * @version $Revision: 1.0 $
- */
-public class StdPolicyConfigTest {
- /**
- * Run the Map<String, String> getMatchingConditions() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetMatchingConditions_1()
- throws Exception {
- StdPolicyConfig fixture = new StdPolicyConfig();
- fixture.setConfigStatus("", PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setDocument((Document) null);
- fixture.setResponseAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setOther("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setPolicyName("");
- fixture.setProperties(new Properties());
- fixture.setJsonObject((JsonObject) null);
- fixture.setMatchingConditions(new Hashtable<String, String>());
-
- Map<String, String> result = fixture.getMatchingConditions();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(0, result.size());
- }
-
- /**
- * Run the String getPolicyConfigMessage() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetPolicyConfigMessage_1()
- throws Exception {
- StdPolicyConfig fixture = new StdPolicyConfig();
- fixture.setConfigStatus("", PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setDocument((Document) null);
- fixture.setResponseAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setOther("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setPolicyName("");
- fixture.setProperties(new Properties());
- fixture.setJsonObject((JsonObject) null);
- fixture.setMatchingConditions(new Hashtable<String, String>());
-
- String result = fixture.getPolicyConfigMessage();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the PolicyConfigStatus getPolicyConfigStatus() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetPolicyConfigStatus_1()
- throws Exception {
- StdPolicyConfig fixture = new StdPolicyConfig();
- fixture.setConfigStatus("", PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setDocument((Document) null);
- fixture.setResponseAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setOther("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setPolicyName("");
- fixture.setProperties(new Properties());
- fixture.setJsonObject((JsonObject) null);
- fixture.setMatchingConditions(new Hashtable<String, String>());
-
- PolicyConfigStatus result = fixture.getPolicyConfigStatus();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("not_found", result.toString());
- assertEquals("CONFIG_NOT_FOUND", result.name());
- assertEquals(1, result.ordinal());
- }
-
- /**
- * Run the String getPolicyName() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetPolicyName_1()
- throws Exception {
- StdPolicyConfig fixture = new StdPolicyConfig();
- fixture.setConfigStatus("", PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setDocument((Document) null);
- fixture.setResponseAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setOther("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setPolicyName("");
- fixture.setProperties(new Properties());
- fixture.setJsonObject((JsonObject) null);
- fixture.setMatchingConditions(new Hashtable<String, String>());
-
- String result = fixture.getPolicyName();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the String getPolicyName() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetPolicyName_2()
- throws Exception {
- StdPolicyConfig fixture = new StdPolicyConfig();
- fixture.setConfigStatus("", PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setDocument((Document) null);
- fixture.setResponseAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setOther("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setPolicyName((String) null);
- fixture.setProperties(new Properties());
- fixture.setJsonObject((JsonObject) null);
- fixture.setMatchingConditions(new Hashtable<String, String>());
-
- String result = fixture.getPolicyName();
-
- // add additional test code here
- assertEquals(null, result);
- }
-
- /**
- * Run the String getPolicyName() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetPolicyName_3()
- throws Exception {
- StdPolicyConfig fixture = new StdPolicyConfig();
- fixture.setConfigStatus("", PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setDocument((Document) null);
- fixture.setResponseAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setOther("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setPolicyName("");
- fixture.setProperties(new Properties());
- fixture.setJsonObject((JsonObject) null);
- fixture.setMatchingConditions(new Hashtable<String, String>());
-
- String result = fixture.getPolicyName();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the String getPolicyVersion() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetPolicyVersion_1()
- throws Exception {
- StdPolicyConfig fixture = new StdPolicyConfig();
- fixture.setConfigStatus("", PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setDocument((Document) null);
- fixture.setResponseAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setOther("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setPolicyName("");
- fixture.setProperties(new Properties());
- fixture.setJsonObject((JsonObject) null);
- fixture.setMatchingConditions(new Hashtable<String, String>());
-
- String result = fixture.getPolicyVersion();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the Map<String, String> getResponseAttributes() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetResponseAttributes_1()
- throws Exception {
- StdPolicyConfig fixture = new StdPolicyConfig();
- fixture.setConfigStatus("", PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setDocument((Document) null);
- fixture.setResponseAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setOther("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setPolicyName("");
- fixture.setProperties(new Properties());
- fixture.setJsonObject((JsonObject) null);
- fixture.setMatchingConditions(new Hashtable<String, String>());
-
- Map<String, String> result = fixture.getResponseAttributes();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(0, result.size());
- }
-
- /**
- * Run the PolicyType getType() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetType_1()
- throws Exception {
- StdPolicyConfig fixture = new StdPolicyConfig();
- fixture.setConfigStatus("", PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setDocument((Document) null);
- fixture.setResponseAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setOther("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setPolicyName("");
- fixture.setProperties(new Properties());
- fixture.setJsonObject((JsonObject) null);
- fixture.setMatchingConditions(new Hashtable<String, String>());
-
- PolicyType result = fixture.getType();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("json", result.toString());
- assertEquals("JSON", result.name());
- assertEquals(1, result.ordinal());
- }
-
- /**
- * Run the void setConfigStatus(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetConfigStatus_1()
- throws Exception {
- StdPolicyConfig fixture = new StdPolicyConfig();
- fixture.setConfigStatus("", PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setDocument((Document) null);
- fixture.setResponseAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setOther("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setPolicyName("");
- fixture.setProperties(new Properties());
- fixture.setJsonObject((JsonObject) null);
- fixture.setMatchingConditions(new Hashtable<String, String>());
- String configStatus = "";
-
- fixture.setConfigStatus(configStatus);
-
- // add additional test code here
- }
-
- /**
- * Run the void setConfigStatus(String,PolicyConfigStatus) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetConfigStatus_2()
- throws Exception {
- StdPolicyConfig fixture = new StdPolicyConfig();
- fixture.setConfigStatus("", PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setDocument((Document) null);
- fixture.setResponseAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setOther("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setPolicyName("");
- fixture.setProperties(new Properties());
- fixture.setJsonObject((JsonObject) null);
- fixture.setMatchingConditions(new Hashtable<String, String>());
- String configStatus = "";
- PolicyConfigStatus policyConfigStatus = PolicyConfigStatus.CONFIG_NOT_FOUND;
-
- fixture.setConfigStatus(configStatus, policyConfigStatus);
-
- // add additional test code here
- }
-
- /**
- * Run the void setDocument(Document) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetDocument_1()
- throws Exception {
- StdPolicyConfig fixture = new StdPolicyConfig();
- fixture.setConfigStatus("", PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setDocument((Document) null);
- fixture.setResponseAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setOther("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setPolicyName("");
- fixture.setProperties(new Properties());
- fixture.setJsonObject((JsonObject) null);
- fixture.setMatchingConditions(new Hashtable<String, String>());
- Document document = null;
-
- fixture.setDocument(document);
-
- // add additional test code here
- }
-
- /**
- * Run the void setJsonObject(JsonObject) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetJsonObject_1()
- throws Exception {
- StdPolicyConfig fixture = new StdPolicyConfig();
- fixture.setConfigStatus("", PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setDocument((Document) null);
- fixture.setResponseAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setOther("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setPolicyName("");
- fixture.setProperties(new Properties());
- fixture.setJsonObject((JsonObject) null);
- fixture.setMatchingConditions(new Hashtable<String, String>());
- JsonObject jsonObject = null;
-
- fixture.setJsonObject(jsonObject);
-
- // add additional test code here
- }
-
- /**
- * Run the void setMatchingConditions(Map<String,String>) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetMatchingConditions_1()
- throws Exception {
- StdPolicyConfig fixture = new StdPolicyConfig();
- fixture.setConfigStatus("", PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setDocument((Document) null);
- fixture.setResponseAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setOther("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setPolicyName("");
- fixture.setProperties(new Properties());
- fixture.setJsonObject((JsonObject) null);
- fixture.setMatchingConditions(new Hashtable<String, String>());
- Map<String, String> matchingConditions = new Hashtable<String, String>();
-
- fixture.setMatchingConditions(matchingConditions);
-
- // add additional test code here
- }
-
- /**
- * Run the void setOther(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetOther_1()
- throws Exception {
- StdPolicyConfig fixture = new StdPolicyConfig();
- fixture.setConfigStatus("", PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setDocument((Document) null);
- fixture.setResponseAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setOther("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setPolicyName("");
- fixture.setProperties(new Properties());
- fixture.setJsonObject((JsonObject) null);
- fixture.setMatchingConditions(new Hashtable<String, String>());
- String other = "";
-
- fixture.setOther(other);
-
- // add additional test code here
- }
-
- /**
- * Run the void setPolicyConfigStatus(PolicyConfigStatus) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetPolicyConfigStatus_1()
- throws Exception {
- StdPolicyConfig fixture = new StdPolicyConfig();
- fixture.setConfigStatus("", PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setDocument((Document) null);
- fixture.setResponseAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setOther("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setPolicyName("");
- fixture.setProperties(new Properties());
- fixture.setJsonObject((JsonObject) null);
- fixture.setMatchingConditions(new Hashtable<String, String>());
- PolicyConfigStatus policyConfigStatus = PolicyConfigStatus.CONFIG_NOT_FOUND;
-
- fixture.setPolicyConfigStatus(policyConfigStatus);
-
- // add additional test code here
- }
-
- /**
- * Run the void setPolicyName(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetPolicyName_1()
- throws Exception {
- StdPolicyConfig fixture = new StdPolicyConfig();
- fixture.setConfigStatus("", PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setDocument((Document) null);
- fixture.setResponseAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setOther("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setPolicyName("");
- fixture.setProperties(new Properties());
- fixture.setJsonObject((JsonObject) null);
- fixture.setMatchingConditions(new Hashtable<String, String>());
- String policyName = "";
-
- fixture.setPolicyName(policyName);
-
- // add additional test code here
- }
-
- /**
- * Run the void setPolicyType(PolicyType) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetPolicyType_1()
- throws Exception {
- StdPolicyConfig fixture = new StdPolicyConfig();
- fixture.setConfigStatus("", PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setDocument((Document) null);
- fixture.setResponseAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setOther("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setPolicyName("");
- fixture.setProperties(new Properties());
- fixture.setJsonObject((JsonObject) null);
- fixture.setMatchingConditions(new Hashtable<String, String>());
- PolicyType policyType = PolicyType.JSON;
-
- fixture.setPolicyType(policyType);
-
- // add additional test code here
- }
-
- /**
- * Run the void setPolicyVersion(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetPolicyVersion_1()
- throws Exception {
- StdPolicyConfig fixture = new StdPolicyConfig();
- fixture.setConfigStatus("", PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setDocument((Document) null);
- fixture.setResponseAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setOther("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setPolicyName("");
- fixture.setProperties(new Properties());
- fixture.setJsonObject((JsonObject) null);
- fixture.setMatchingConditions(new Hashtable<String, String>());
- String policyVersion = "";
-
- fixture.setPolicyVersion(policyVersion);
-
- // add additional test code here
- }
-
- /**
- * Run the void setProperties(Properties) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetProperties_1()
- throws Exception {
- StdPolicyConfig fixture = new StdPolicyConfig();
- fixture.setConfigStatus("", PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setDocument((Document) null);
- fixture.setResponseAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setOther("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setPolicyName("");
- fixture.setProperties(new Properties());
- fixture.setJsonObject((JsonObject) null);
- fixture.setMatchingConditions(new Hashtable<String, String>());
- Properties properties = new Properties();
-
- fixture.setProperties(properties);
-
- // add additional test code here
- }
-
- /**
- * Run the void setResponseAttributes(Map<String,String>) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetResponseAttributes_1()
- throws Exception {
- StdPolicyConfig fixture = new StdPolicyConfig();
- fixture.setConfigStatus("", PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setDocument((Document) null);
- fixture.setResponseAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setOther("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setPolicyName("");
- fixture.setProperties(new Properties());
- fixture.setJsonObject((JsonObject) null);
- fixture.setMatchingConditions(new Hashtable<String, String>());
- Map<String, String> responseAttributes = new Hashtable<String, String>();
-
- fixture.setResponseAttributes(responseAttributes);
-
- // add additional test code here
- }
-
- /**
- * Run the JsonObject toJSON() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testToJSON_1()
- throws Exception {
- StdPolicyConfig fixture = new StdPolicyConfig();
- fixture.setConfigStatus("", PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setDocument((Document) null);
- fixture.setResponseAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setOther("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setPolicyName("");
- fixture.setProperties(new Properties());
- fixture.setJsonObject((JsonObject) null);
- fixture.setMatchingConditions(new Hashtable<String, String>());
-
- JsonObject result = fixture.toJSON();
-
- // add additional test code here
- assertEquals(null, result);
- }
-
- /**
- * Run the String toOther() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testToOther_1()
- throws Exception {
- StdPolicyConfig fixture = new StdPolicyConfig();
- fixture.setConfigStatus("", PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setDocument((Document) null);
- fixture.setResponseAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setOther("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setPolicyName("");
- fixture.setProperties(new Properties());
- fixture.setJsonObject((JsonObject) null);
- fixture.setMatchingConditions(new Hashtable<String, String>());
-
- String result = fixture.toOther();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the Properties toProperties() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testToProperties_1()
- throws Exception {
- StdPolicyConfig fixture = new StdPolicyConfig();
- fixture.setConfigStatus("", PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setDocument((Document) null);
- fixture.setResponseAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setOther("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setPolicyName("");
- fixture.setProperties(new Properties());
- fixture.setJsonObject((JsonObject) null);
- fixture.setMatchingConditions(new Hashtable<String, String>());
-
- Properties result = fixture.toProperties();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(0, result.size());
- }
-
- /**
- * Run the String toString() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testToString_1()
- throws Exception {
- StdPolicyConfig fixture = new StdPolicyConfig();
- fixture.setConfigStatus("", PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setDocument((Document) null);
- fixture.setResponseAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setOther("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setPolicyName("test");
- fixture.setProperties(new Properties());
- fixture.setJsonObject((JsonObject) null);
- fixture.setMatchingConditions(new Hashtable<String, String>());
-
- String result = fixture.toString();
-
- // add additional test code here
- assertEquals("PolicyConfig [ policyConfigStatus=not_found, policyConfigMessage=, policyName=test]", result);
- }
-
- /**
- * Run the Document toXML() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testToXML_1()
- throws Exception {
- StdPolicyConfig fixture = new StdPolicyConfig();
- fixture.setConfigStatus("", PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setDocument((Document) null);
- fixture.setResponseAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setOther("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setPolicyName("");
- fixture.setProperties(new Properties());
- fixture.setJsonObject((JsonObject) null);
- fixture.setMatchingConditions(new Hashtable<String, String>());
-
- Document result = fixture.toXML();
-
- // add additional test code here
- assertEquals(null, result);
- }
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(StdPolicyConfigTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/StdPolicyResponseTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/StdPolicyResponseTest.java
deleted file mode 100644
index a593c460b..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/StdPolicyResponseTest.java
+++ /dev/null
@@ -1,348 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.std.test;
-
-import java.util.Hashtable;
-import java.util.Map;
-
-import org.junit.*;
-import org.openecomp.policy.api.PolicyResponseStatus;
-import org.openecomp.policy.std.StdPolicyResponse;
-
-import static org.junit.Assert.*;
-
-/**
- * The class <code>StdPolicyResponseTest</code> contains tests for the class <code>{@link StdPolicyResponse}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- * @version $Revision: 1.0 $
- */
-public class StdPolicyResponseTest {
- /**
- * Run the Map<String, String> getActionAdvised() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetActionAdvised_1()
- throws Exception {
- StdPolicyResponse fixture = new StdPolicyResponse();
- fixture.setPolicyResponseStatus("", PolicyResponseStatus.ACTION_ADVISED);
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setActionTaken(new Hashtable<String, String>());
-
- Map<String, String> result = fixture.getActionAdvised();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(0, result.size());
- }
-
- /**
- * Run the Map<String, String> getActionTaken() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetActionTaken_1()
- throws Exception {
- StdPolicyResponse fixture = new StdPolicyResponse();
- fixture.setPolicyResponseStatus("", PolicyResponseStatus.ACTION_ADVISED);
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setActionTaken(new Hashtable<String, String>());
-
- Map<String, String> result = fixture.getActionTaken();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(0, result.size());
- }
-
- /**
- * Run the String getPolicyResponseMessage() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetPolicyResponseMessage_1()
- throws Exception {
- StdPolicyResponse fixture = new StdPolicyResponse();
- fixture.setPolicyResponseStatus("", PolicyResponseStatus.ACTION_ADVISED);
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setActionTaken(new Hashtable<String, String>());
-
- String result = fixture.getPolicyResponseMessage();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the PolicyResponseStatus getPolicyResponseStatus() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetPolicyResponseStatus_1()
- throws Exception {
- StdPolicyResponse fixture = new StdPolicyResponse();
- fixture.setPolicyResponseStatus("", PolicyResponseStatus.ACTION_ADVISED);
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setActionTaken(new Hashtable<String, String>());
-
- PolicyResponseStatus result = fixture.getPolicyResponseStatus();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("action_advised", result.toString());
- assertEquals("ACTION_ADVISED", result.name());
- assertEquals(1, result.ordinal());
- }
-
- /**
- * Run the Map<String, String> getRequestAttributes() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetRequestAttributes_1()
- throws Exception {
- StdPolicyResponse fixture = new StdPolicyResponse();
- fixture.setPolicyResponseStatus("", PolicyResponseStatus.ACTION_ADVISED);
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setActionTaken(new Hashtable<String, String>());
-
- Map<String, String> result = fixture.getRequestAttributes();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(0, result.size());
- }
-
- /**
- * Run the void setActionAdvised(Map<String,String>) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetActionAdvised_1()
- throws Exception {
- StdPolicyResponse fixture = new StdPolicyResponse();
- fixture.setPolicyResponseStatus("", PolicyResponseStatus.ACTION_ADVISED);
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setActionTaken(new Hashtable<String, String>());
- Map<String, String> actionAdvised = new Hashtable<String, String>();
-
- fixture.setActionAdvised(actionAdvised);
-
- // add additional test code here
- }
-
- /**
- * Run the void setActionTaken(Map<String,String>) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetActionTaken_1()
- throws Exception {
- StdPolicyResponse fixture = new StdPolicyResponse();
- fixture.setPolicyResponseStatus("", PolicyResponseStatus.ACTION_ADVISED);
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setActionTaken(new Hashtable<String, String>());
- Map<String, String> actionTaken = new Hashtable<String, String>();
-
- fixture.setActionTaken(actionTaken);
-
- // add additional test code here
- }
-
- /**
- * Run the void setPolicyResponseMessage(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetPolicyResponseMessage_1()
- throws Exception {
- StdPolicyResponse fixture = new StdPolicyResponse();
- fixture.setPolicyResponseStatus("", PolicyResponseStatus.ACTION_ADVISED);
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setActionTaken(new Hashtable<String, String>());
- String policyResponseMessage = "";
-
- fixture.setPolicyResponseMessage(policyResponseMessage);
-
- // add additional test code here
- }
-
- /**
- * Run the void setPolicyResponseStatus(PolicyResponseStatus) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetPolicyResponseStatus_1()
- throws Exception {
- StdPolicyResponse fixture = new StdPolicyResponse();
- fixture.setPolicyResponseStatus("", PolicyResponseStatus.ACTION_ADVISED);
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setActionTaken(new Hashtable<String, String>());
- PolicyResponseStatus policyResponseStatus = PolicyResponseStatus.ACTION_ADVISED;
-
- fixture.setPolicyResponseStatus(policyResponseStatus);
-
- // add additional test code here
- }
-
- /**
- * Run the void setPolicyResponseStatus(String,PolicyResponseStatus) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetPolicyResponseStatus_2()
- throws Exception {
- StdPolicyResponse fixture = new StdPolicyResponse();
- fixture.setPolicyResponseStatus("", PolicyResponseStatus.ACTION_ADVISED);
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setActionTaken(new Hashtable<String, String>());
- String policyResponseMessage = "";
- PolicyResponseStatus policyResponseStatus = PolicyResponseStatus.ACTION_ADVISED;
-
- fixture.setPolicyResponseStatus(policyResponseMessage, policyResponseStatus);
-
- // add additional test code here
- }
-
- /**
- * Run the void setRequestAttributes(Map<String,String>) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetRequestAttributes_1()
- throws Exception {
- StdPolicyResponse fixture = new StdPolicyResponse();
- fixture.setPolicyResponseStatus("", PolicyResponseStatus.ACTION_ADVISED);
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setActionTaken(new Hashtable<String, String>());
- Map<String, String> requestAttributes = new Hashtable<String, String>();
-
- fixture.setRequestAttributes(requestAttributes);
-
- // add additional test code here
- }
-
- /**
- * Run the String toString() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testToString_1()
- throws Exception {
- StdPolicyResponse fixture = new StdPolicyResponse();
- fixture.setPolicyResponseStatus("", PolicyResponseStatus.ACTION_ADVISED);
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setActionTaken(new Hashtable<String, String>());
-
- String result = fixture.toString();
-
- // add additional test code here
- assertEquals("PolicyResponse [ policyResponseStatus=action_advised, policyResponseMessage=, ]", result);
- }
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(StdPolicyResponseTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/StdRemovedPolicyTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/StdRemovedPolicyTest.java
deleted file mode 100644
index 0a0865c82..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/StdRemovedPolicyTest.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.std.test;
-
-import org.junit.*;
-import org.openecomp.policy.std.StdRemovedPolicy;
-
-import static org.junit.Assert.*;
-
-/**
- * The class <code>StdRemovedPolicyTest</code> contains tests for the class <code>{@link StdRemovedPolicy}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- * @version $Revision: 1.0 $
- */
-public class StdRemovedPolicyTest {
- /**
- * Run the StdRemovedPolicy() constructor test.
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testStdRemovedPolicy_1()
- throws Exception {
- StdRemovedPolicy result = new StdRemovedPolicy();
- assertNotNull(result);
- // add additional test code here
- }
-
- /**
- * Run the String getPolicyName() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetPolicyName_1()
- throws Exception {
- StdRemovedPolicy fixture = new StdRemovedPolicy();
- fixture.setVersionNo("");
- fixture.setPolicyName("");
-
- String result = fixture.getPolicyName();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the String getPolicyName() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetPolicyName_2()
- throws Exception {
- StdRemovedPolicy fixture = new StdRemovedPolicy();
- fixture.setVersionNo("");
- fixture.setPolicyName((String) null);
-
- String result = fixture.getPolicyName();
-
- // add additional test code here
- assertEquals(null, result);
- }
-
- /**
- * Run the String getPolicyName() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetPolicyName_3()
- throws Exception {
- StdRemovedPolicy fixture = new StdRemovedPolicy();
- fixture.setVersionNo("");
- fixture.setPolicyName("");
-
- String result = fixture.getPolicyName();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the String getVersionNo() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetVersionNo_1()
- throws Exception {
- StdRemovedPolicy fixture = new StdRemovedPolicy();
- fixture.setVersionNo("");
- fixture.setPolicyName("");
-
- String result = fixture.getVersionNo();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the void setPolicyName(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetPolicyName_1()
- throws Exception {
- StdRemovedPolicy fixture = new StdRemovedPolicy();
- fixture.setVersionNo("");
- fixture.setPolicyName("");
- String policyName = "";
-
- fixture.setPolicyName(policyName);
-
- // add additional test code here
- }
-
- /**
- * Run the void setVersionNo(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetVersionNo_1()
- throws Exception {
- StdRemovedPolicy fixture = new StdRemovedPolicy();
- fixture.setVersionNo("");
- fixture.setPolicyName("");
- String versionNo = "";
-
- fixture.setVersionNo(versionNo);
-
- // add additional test code here
- }
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(StdRemovedPolicyTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/StdStatusTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/StdStatusTest.java
deleted file mode 100644
index 34918c2ea..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/StdStatusTest.java
+++ /dev/null
@@ -1,1433 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.std.test;
-
-import java.util.Hashtable;
-import java.util.Map;
-import java.util.Properties;
-
-import javax.json.JsonObject;
-
-import org.junit.*;
-import org.openecomp.policy.api.PolicyConfigStatus;
-import org.openecomp.policy.api.PolicyDecision;
-import org.openecomp.policy.api.PolicyResponseStatus;
-import org.openecomp.policy.api.PolicyType;
-import org.openecomp.policy.std.StdStatus;
-
-import static org.junit.Assert.*;
-
-import org.w3c.dom.Document;
-
-/**
- * The class <code>StdStatusTest</code> contains tests for the class <code>{@link StdStatus}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- * @version $Revision: 1.0 $
- */
-public class StdStatusTest {
- /**
- * Run the Map<String, String> getActionAdvised() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetActionAdvised_1()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
-
- Map<String, String> result = fixture.getActionAdvised();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(0, result.size());
- }
-
- /**
- * Run the Map<String, String> getActionTaken() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetActionTaken_1()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
-
- Map<String, String> result = fixture.getActionTaken();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(0, result.size());
- }
-
- /**
- * Run the Map<String, String> getMatchingConditions() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetMatchingConditions_1()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
-
- Map<String, String> result = fixture.getMatchingConditions();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(0, result.size());
- }
-
- /**
- * Run the String getPolicyConfigMessage() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetPolicyConfigMessage_1()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
-
- String result = fixture.getPolicyConfigMessage();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the PolicyConfigStatus getPolicyConfigStatus() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetPolicyConfigStatus_1()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
-
- PolicyConfigStatus result = fixture.getPolicyConfigStatus();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("not_found", result.toString());
- assertEquals("CONFIG_NOT_FOUND", result.name());
- assertEquals(1, result.ordinal());
- }
-
- /**
- * Run the PolicyDecision getPolicyDecision() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetPolicyDecision_1()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
-
- PolicyDecision result = fixture.getDecision();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("deny", result.toString());
- assertEquals("DENY", result.name());
- assertEquals(1, result.ordinal());
- }
-
- /**
- * Run the String getPolicyName() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetPolicyName_1()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
-
- String result = fixture.getPolicyName();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the String getPolicyName() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetPolicyName_2()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName((String) null);
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
-
- String result = fixture.getPolicyName();
-
- // add additional test code here
- assertEquals(null, result);
- }
-
- /**
- * Run the String getPolicyName() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetPolicyName_3()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
-
- String result = fixture.getPolicyName();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the String getPolicyResponseMessage() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetPolicyResponseMessage_1()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
-
- String result = fixture.getPolicyResponseMessage();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the PolicyResponseStatus getPolicyResponseStatus() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetPolicyResponseStatus_1()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
-
- PolicyResponseStatus result = fixture.getPolicyResponseStatus();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("action_advised", result.toString());
- assertEquals("ACTION_ADVISED", result.name());
- assertEquals(1, result.ordinal());
- }
-
- /**
- * Run the String getPolicyVersion() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetPolicyVersion_1()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
-
- String result = fixture.getPolicyVersion();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the Map<String, String> getRequestAttributes() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetRequestAttributes_1()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
-
- Map<String, String> result = fixture.getRequestAttributes();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(0, result.size());
- }
-
- /**
- * Run the Map<String, String> getResponseAttributes() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetResponseAttributes_1()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
-
- Map<String, String> result = fixture.getResponseAttributes();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(0, result.size());
- }
-
- /**
- * Run the PolicyType getType() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetType_1()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
-
- PolicyType result = fixture.getType();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("json", result.toString());
- assertEquals("JSON", result.name());
- assertEquals(1, result.ordinal());
- }
-
- /**
- * Run the void setActionAdvised(Map<String,String>) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetActionAdvised_1()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
- Map<String, String> actionAdvised = new Hashtable<String, String>();
-
- fixture.setActionAdvised(actionAdvised);
-
- // add additional test code here
- }
-
- /**
- * Run the void setActionTaken(Map<String,String>) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetActionTaken_1()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
- Map<String, String> actionTaken = new Hashtable<String, String>();
-
- fixture.setActionTaken(actionTaken);
-
- // add additional test code here
- }
-
- /**
- * Run the void setConfigStatus(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetConfigStatus_1()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
- String configStatus = "";
-
- fixture.setConfigStatus(configStatus);
-
- // add additional test code here
- }
-
- /**
- * Run the void setDocument(Document) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetDocument_1()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
- Document document = null;
-
- fixture.setDocument(document);
-
- // add additional test code here
- }
-
- /**
- * Run the void setJsonObject(JsonObject) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetJsonObject_1()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
- JsonObject jsonObject = null;
-
- fixture.setJsonObject(jsonObject);
-
- // add additional test code here
- }
-
- /**
- * Run the void setMatchingConditions(Map<String,String>) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetMatchingConditions_1()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
- Map<String, String> matchingConditions = new Hashtable<String, String>();
-
- fixture.setMatchingConditions(matchingConditions);
-
- // add additional test code here
- }
-
- /**
- * Run the void setOther(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetOther_1()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
- String other = "";
-
- fixture.setOther(other);
-
- // add additional test code here
- }
-
- /**
- * Run the void setPolicyConfigStatus(PolicyConfigStatus) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetPolicyConfigStatus_1()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
- PolicyConfigStatus policyConfigStatus = PolicyConfigStatus.CONFIG_NOT_FOUND;
-
- fixture.setPolicyConfigStatus(policyConfigStatus);
-
- // add additional test code here
- }
-
- /**
- * Run the void setPolicyConfigStatus(String,PolicyConfigStatus) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetPolicyConfigStatus_2()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
- String configStatus = "";
- PolicyConfigStatus policyConfigStatus = PolicyConfigStatus.CONFIG_NOT_FOUND;
-
- fixture.setPolicyConfigStatus(configStatus, policyConfigStatus);
-
- // add additional test code here
- }
-
- /**
- * Run the void setPolicyDecision(PolicyDecision) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetPolicyDecision_1()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
- PolicyDecision policyDecision = PolicyDecision.DENY;
-
- fixture.setDecision(policyDecision);
-
- // add additional test code here
- }
-
- /**
- * Run the void setPolicyName(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetPolicyName_1()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
- String policyName = "";
-
- fixture.setPolicyName(policyName);
-
- // add additional test code here
- }
-
- /**
- * Run the void setPolicyResponseMessage(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetPolicyResponseMessage_1()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
- String policyResponseMessage = "";
-
- fixture.setPolicyResponseMessage(policyResponseMessage);
-
- // add additional test code here
- }
-
- /**
- * Run the void setPolicyResponseStatus(PolicyResponseStatus) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetPolicyResponseStatus_1()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
- PolicyResponseStatus policyResponseStatus = PolicyResponseStatus.ACTION_ADVISED;
-
- fixture.setPolicyResponseStatus(policyResponseStatus);
-
- // add additional test code here
- }
-
- /**
- * Run the void setPolicyResponseStatus(String,PolicyResponseStatus) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetPolicyResponseStatus_2()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
- String policyResponseMessage = "";
- PolicyResponseStatus policyResponseStatus = PolicyResponseStatus.ACTION_ADVISED;
-
- fixture.setPolicyResponseStatus(policyResponseMessage, policyResponseStatus);
-
- // add additional test code here
- }
-
- /**
- * Run the void setPolicyType(PolicyType) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetPolicyType_1()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
- PolicyType policyType = PolicyType.JSON;
-
- fixture.setPolicyType(policyType);
-
- // add additional test code here
- }
-
- /**
- * Run the void setPolicyVersion(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetPolicyVersion_1()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
- String policyVersion = "";
-
- fixture.setPolicyVersion(policyVersion);
-
- // add additional test code here
- }
-
- /**
- * Run the void setProperties(Properties) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetProperties_1()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
- Properties properties = new Properties();
-
- fixture.setProperties(properties);
-
- // add additional test code here
- }
-
- /**
- * Run the void setRequestAttributes(Map<String,String>) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetRequestAttributes_1()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
- Map<String, String> requestAttributes = new Hashtable<String, String>();
-
- fixture.setRequestAttributes(requestAttributes);
-
- // add additional test code here
- }
-
- /**
- * Run the void setResposneAttributes(Map<String,String>) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetResposneAttributes_1()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
- Map<String, String> responseAttributes = new Hashtable<String, String>();
-
- fixture.setResposneAttributes(responseAttributes);
-
- // add additional test code here
- }
-
- /**
- * Run the void setStatus(String,PolicyResponseStatus,PolicyConfigStatus) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetStatus_1()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
- String message = "";
- PolicyResponseStatus policyResponseStatus = PolicyResponseStatus.ACTION_ADVISED;
- PolicyConfigStatus policyConfigStatus = PolicyConfigStatus.CONFIG_NOT_FOUND;
-
- fixture.setStatus(message, policyResponseStatus, policyConfigStatus);
-
- // add additional test code here
- }
-
- /**
- * Run the JsonObject toJSON() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testToJSON_1()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
-
- JsonObject result = fixture.toJSON();
-
- // add additional test code here
- assertEquals(null, result);
- }
-
- /**
- * Run the String toOther() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testToOther_1()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
-
- String result = fixture.toOther();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the Properties toProperties() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testToProperties_1()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
-
- Properties result = fixture.toProperties();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(0, result.size());
- }
-
- /**
- * Run the Document toXML() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testToXML_1()
- throws Exception {
- StdStatus fixture = new StdStatus();
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setPolicyName("");
- fixture.setPolicyType(PolicyType.JSON);
- fixture.setResposneAttributes(new Hashtable<String, String>());
- fixture.setMatchingConditions(new Hashtable<String, String>());
- fixture.setStatus("", PolicyResponseStatus.ACTION_ADVISED, PolicyConfigStatus.CONFIG_NOT_FOUND);
- fixture.setJsonObject((JsonObject) null);
- fixture.setDocument((Document) null);
- fixture.setProperties(new Properties());
- fixture.setRequestAttributes(new Hashtable<String, String>());
- fixture.setPolicyVersion("");
- fixture.setActionAdvised(new Hashtable<String, String>());
- fixture.setOther("");
- fixture.setDecision(PolicyDecision.DENY);
- fixture.setDetails("");
- fixture.setActionTaken(new Hashtable<String, String>());
-
- Document result = fixture.toXML();
-
- // add additional test code here
- assertEquals(null, result);
- }
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(StdStatusTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/package-info.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/package-info.java
deleted file mode 100644
index 75bfc39ad..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/std/test/package-info.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-/**
- *
- */
-/**
- *
- */
-package org.openecomp.policy.std.test;
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/ActionPolicyApiTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/ActionPolicyApiTest.java
deleted file mode 100644
index 398efe0f1..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/ActionPolicyApiTest.java
+++ /dev/null
@@ -1,239 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mockito;
-import org.openecomp.policy.api.AttributeType;
-import org.openecomp.policy.api.PolicyChangeResponse;
-import org.openecomp.policy.api.PolicyClass;
-import org.openecomp.policy.api.PolicyEngine;
-import org.openecomp.policy.api.PolicyEngineException;
-import org.openecomp.policy.api.PolicyParameters;
-import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
-import org.openecomp.policy.common.logging.flexlogger.Logger;
-import org.openecomp.policy.std.StdPolicyChangeResponse;
-
-import junit.framework.TestCase;
-
-public class ActionPolicyApiTest extends TestCase {
-
- private static final Logger logger = FlexLogger.getLogger(ActionPolicyApiTest.class);
-
- private PolicyEngine policyEngine = null;
- private PolicyEngine mockPolicyEngine = null;
-
- PolicyChangeResponse result = null;
- StdPolicyChangeResponse response = new StdPolicyChangeResponse();
- PolicyParameters policyParameters = new PolicyParameters();
-
- @Before
- protected void setUp() throws Exception {
- try {
- policyEngine = new PolicyEngine("Test/config_pass.properties");
- } catch (PolicyEngineException e) {
- logger.error(e.getMessage());
- fail("PolicyEngine Instantiation Error" + e);
- }
- logger.info("Loaded.. PolicyEngine");
-
- mockPolicyEngine = Mockito.mock(PolicyEngine.class);
-
- policyParameters.setPolicyClass(PolicyClass.Action); //required
- policyParameters.setPolicyName("test.junitTest"); //required
- policyParameters.setPolicyDescription("testing"); //optional
- //policyParameters.setPolicyScope("test"); //Directory will be created where the Policies are saved... this displays a a subscope on the GUI
-
- //Set the Component Attributes... These are Optional
- Map<String, String> configAttributes = new HashMap<String, String>();
- configAttributes.put("test", "testing");
-
- Map<AttributeType, Map<String,String>> attributes = new HashMap<AttributeType, Map<String,String>>();
- attributes.put(AttributeType.MATCHING, configAttributes);
- policyParameters.setAttributes(attributes);
-
- policyParameters.setActionPerformer("PEP");
- policyParameters.setActionAttribute("testing");
- policyParameters.setRequestID(UUID.randomUUID());
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- @Test
- public final void testCreatePolicy() {
- response.setResponseMessage("success");
- PolicyChangeResponse result = null;
- try {
-
- Mockito.when(mockPolicyEngine.createPolicy(policyParameters)).thenReturn(response);
- result = mockPolicyEngine.createPolicy(policyParameters);
-
- } catch (Exception e) {
- logger.warn(e.getMessage());
- }
- assertEquals(result, response);
- }
-
- @Test
- public final void testUpdatePolicy() {
- response.setResponseMessage("success");
- PolicyChangeResponse result = null;
- try {
-
- Mockito.when(mockPolicyEngine.updatePolicy(policyParameters)).thenReturn(response);
- result = mockPolicyEngine.updatePolicy(policyParameters);
-
- } catch (Exception e) {
- logger.warn(e.getMessage());
- }
- assertEquals(result, response);
-
- }
-
- @Test
- public final void testCreatePolicyNullPolicyName() {
- response.setResponseMessage("PE300 - Data Issue: No Policy Name given.");
- policyParameters.setPolicyName(null);
- try{
- result = policyEngine.createPolicy(policyParameters);
- } catch (Exception e){
- logger.warn(e.getMessage());
- }
- //assertEquals(result.getResponseMessage(), response.getResponseMessage());
- }
-
- @Test
- public final void testCreatePolicyNullPolicyScope() {
- response.setResponseMessage("PE300 - Data Issue: No Policy Scope given.");
- policyParameters.setPolicyName("test");
- try{
- result = policyEngine.createPolicy(policyParameters);
- } catch (Exception e){
- logger.warn(e.getMessage());
- }
- //assertEquals(result.getResponseMessage(), response.getResponseMessage());
- }
-
- @Test
- public final void testCreatePolicyNullActionAttributes() {
- response.setResponseMessage("PE300 - Data Issue: No Action Attribute given.");
- policyParameters.setActionAttribute(null);
- try{
- result = policyEngine.createPolicy(policyParameters);
- } catch (Exception e){
- logger.warn(e.getMessage());
- }
- //assertEquals(result.getResponseMessage(), response.getResponseMessage());
- }
-
- @Test
- public final void testCreatePolicyNullActionPerformer() {
- response.setResponseMessage("PE300 - Data Issue: No Action Performer given.");
- policyParameters.setActionPerformer(null);
- try{
- result = policyEngine.createPolicy(policyParameters);
- } catch (Exception e){
- logger.warn(e.getMessage());
- }
- //assertEquals(result.getResponseMessage(), response.getResponseMessage());
- }
-
- @Test
- public final void testCreatePolicyInvalidActionPerformer() {
- response.setResponseMessage("PE300 - Data Issue: Invalid Action Performer given.");
- policyParameters.setActionPerformer("testfail");
- try{
- result = policyEngine.createPolicy(policyParameters);
- } catch (Exception e){
- logger.warn(e.getMessage());
- }
- //assertEquals(result.getResponseMessage(), response.getResponseMessage());
- }
-
- @Test
- public final void testUpdatePolicyNullPolicyName() {
- response.setResponseMessage("PE300 - Data Issue: No Policy Name given.");
- policyParameters.setPolicyName(null);
- try{
- result = policyEngine.updatePolicy(policyParameters);
- } catch (Exception e){
- logger.warn(e.getMessage());
- }
- //assertEquals(result.getResponseMessage(), response.getResponseMessage());
- }
-
- @Test
- public final void testUpdatePolicyNullPolicyScope() {
- response.setResponseMessage("PE300 - Data Issue: No Policy Scope given.");
- policyParameters.setPolicyName("test");
- try{
- result = policyEngine.updatePolicy(policyParameters);
- } catch (Exception e){
- logger.warn(e.getMessage());
- }
- //assertEquals(result.getResponseMessage(), response.getResponseMessage());
- }
-
- @Test
- public final void testUpdatePolicyNullActionAttributes() {
- response.setResponseMessage("PE300 - Data Issue: No Action Attribute given.");
- policyParameters.setActionAttribute(null);
- try{
- result = policyEngine.updatePolicy(policyParameters);
- } catch (Exception e){
- logger.warn(e.getMessage());
- }
- //assertEquals(result.getResponseMessage(), response.getResponseMessage());
- }
-
- @Test
- public final void testUpdatePolicyNullActionPerformer() {
- response.setResponseMessage("PE300 - Data Issue: No Action Performer given.");
- policyParameters.setActionPerformer(null);
- try{
- result = policyEngine.updatePolicy(policyParameters);
- } catch (Exception e){
- logger.warn(e.getMessage());
- }
- //assertEquals(result.getResponseMessage(), response.getResponseMessage());
- }
-
- @Test
- public final void testUpdatePolicyInvalidActionPerformer() {
- response.setResponseMessage("PE300 - Data Issue: Invalid Action Performer given.");
- policyParameters.setActionPerformer("testfail");
- try{
- result = policyEngine.updatePolicy(policyParameters);
- } catch (Exception e){
- logger.warn(e.getMessage());
- }
- //assertEquals(result.getResponseMessage(), response.getResponseMessage());
- }
-
-
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/AttributeTypeTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/AttributeTypeTest.java
deleted file mode 100644
index df8713ab8..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/AttributeTypeTest.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import org.junit.*;
-import org.openecomp.policy.api.AttributeType;
-
-import static org.junit.Assert.*;
-
-/**
- * The class <code>AttributeTypeTest</code> contains tests for the class <code>{@link AttributeType}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- * @version $Revision: 1.0 $
- */
-public class AttributeTypeTest {
- /**
- * Run the String toString() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testToString_1()
- throws Exception {
- AttributeType fixture = AttributeType.MATCHING;
-
- String result = fixture.toString();
-
- // add additional test code here
- assertEquals("matching", result);
- }
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/ConfigBasePolicyTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/ConfigBasePolicyTest.java
deleted file mode 100644
index 69de7fe87..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/ConfigBasePolicyTest.java
+++ /dev/null
@@ -1,325 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-
-import org.junit.Test;
-import org.mockito.Mockito;
-import org.openecomp.policy.api.AttributeType;
-import org.openecomp.policy.api.PolicyChangeResponse;
-import org.openecomp.policy.api.PolicyConfigType;
-import org.openecomp.policy.api.PolicyEngine;
-import org.openecomp.policy.api.PolicyEngineException;
-import org.openecomp.policy.api.PolicyParameters;
-import org.openecomp.policy.api.PolicyType;
-import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
-import org.openecomp.policy.common.logging.flexlogger.Logger;
-import org.openecomp.policy.std.StdPolicyChangeResponse;
-
-import junit.framework.TestCase;
-
-/**
- * The class <code>ConfigBasePolicyTest</code> contains tests for the class
- * {@link <code>PolicyEngine</code>}
- *
- * @pattern JUnit Test Case
- * *
- */
-public class ConfigBasePolicyTest extends TestCase {
-
- private static final Logger logger = FlexLogger.getLogger(DecisionPolicyApiTest.class);
-
- private PolicyEngine policyEngine = null;
- private PolicyEngine mockPolicyEngine = null;
-
- PolicyChangeResponse result = null;
- StdPolicyChangeResponse response = new StdPolicyChangeResponse();
- PolicyParameters policyParameters = new PolicyParameters();
-
- /**
- * Perform pre-test initialization
- *
- * @throws Exception
- *
- * @see TestCase#setUp()
- */
- protected void setUp() throws Exception {
- try {
- policyEngine = new PolicyEngine("Test/config_pass.properties");
- } catch (PolicyEngineException e) {
- logger.error(e.getMessage());
- fail("PolicyEngine Instantiation Error" + e);
- }
- logger.info("Loaded.. PolicyEngine");
-
- mockPolicyEngine = Mockito.mock(PolicyEngine.class);
-
- policyParameters.setPolicyConfigType(PolicyConfigType.Base); //required
- policyParameters.setPolicyName("test.junitTest"); //required
- policyParameters.setEcompName("test");
- policyParameters.setConfigName("testBase");
- policyParameters.setConfigBodyType(PolicyType.OTHER);
- policyParameters.setConfigBody("testing");
- policyParameters.setPolicyDescription("testing"); //optional
- //policyParameters.setPolicyScope("test"); //Directory will be created where the Policies are saved... this displays a a subscope on the GUI
-
- //Set the Component Attributes... These are Optional
- Map<String, String> configAttributes = new HashMap<String, String>();
- configAttributes.put("test", "testing");
-
- Map<AttributeType, Map<String,String>> attributes = new HashMap<AttributeType, Map<String,String>>();
- attributes.put(AttributeType.MATCHING, configAttributes);
- policyParameters.setAttributes(attributes);
-
- policyParameters.setRequestID(UUID.randomUUID());
- }
-
- /**
- * Perform post-test clean up
- *
- * @throws Exception
- *
- * @see TestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- super.tearDown();
- // Add additional tear down code here
- }
-
- /**
- * Run the PolicyChangeResponse createPolicy(PolicyParameters) method test
- */
- public void testCreatePolicy() {
- response.setResponseMessage("success");
- PolicyChangeResponse result = null;
- try {
-
- Mockito.when(mockPolicyEngine.createPolicy(policyParameters)).thenReturn(response);
- result = mockPolicyEngine.createPolicy(policyParameters);
-
- } catch (Exception e) {
- logger.warn(e.getMessage());
- }
- assertEquals(result, response);
- }
-
- /**
- * Run the String createConfigPolicy() method test
- */
- @SuppressWarnings("deprecation")
- @Test
- public void testCreateConfigPolicy() {
- String response = "success";
- String result = null;
- try {
-
- Mockito.when(mockPolicyEngine.createConfigPolicy("testPolicy","test","test","testConfig",null,"OTHER","test","test",null, null, null, null, null)).thenReturn(response);
- result = mockPolicyEngine.createConfigPolicy("testPolicy","test","test","testConfig",null,"OTHER","test","test",null, null, null, null, null);
-
- } catch (Exception e) {
- logger.warn(e.getMessage());
- }
- assertEquals(result, response);
- }
-
- /**
- * Run the PolicyChangeResponse updatePolicy(PolicyParameters) method test
- */
- public void testUpdatePolicy() {
- response.setResponseMessage("success");
- PolicyChangeResponse result = null;
- try {
-
- Mockito.when(mockPolicyEngine.updatePolicy(policyParameters)).thenReturn(response);
- result = mockPolicyEngine.updatePolicy(policyParameters);
-
- } catch (Exception e) {
- logger.warn(e.getMessage());
- }
- assertEquals(result, response);
- }
-
- /**
- * Run the String updateConfigPolicy() method test
- */
- @SuppressWarnings("deprecation")
- @Test
- public void testUpdateConfigPolicy() {
- String response = "success";
- String result = null;
- try {
-
- Mockito.when(mockPolicyEngine.updateConfigPolicy("testPolicy","test","test","testConfig",null,"OTHER","test","test",null, null, null, null, null)).thenReturn(response);
- result = mockPolicyEngine.updateConfigPolicy("testPolicy","test","test","testConfig",null,"OTHER","test","test",null, null, null, null, null);
-
- } catch (Exception e) {
- logger.warn(e.getMessage());
- }
- assertEquals(result, response);
- }
-
- @Test
- public final void testCreatePolicyNullPolicyName() {
- response.setResponseMessage("PE300 - Data Issue: No Policy Name given.");
- policyParameters.setPolicyName(null);
- try{
- result = policyEngine.createPolicy(policyParameters);
- } catch (Exception e){
- logger.warn(e.getMessage());
- }
- //assertEquals(result.getResponseMessage(), response.getResponseMessage());
- }
-
- @Test
- public final void testCreatePolicyNullPolicyScope() {
- response.setResponseMessage("PE300 - Data Issue: No Policy Scope given.");
- policyParameters.setPolicyName("test");
- try{
- result = policyEngine.createPolicy(policyParameters);
- } catch (Exception e){
- logger.warn(e.getMessage());
- }
- //assertEquals(result.getResponseMessage(), response.getResponseMessage());
- }
-
- @Test
- public final void testCreatePolicyNullEcompName() {
- response.setResponseMessage("PE300 - Data Issue: No ECOMP Name given.");
- policyParameters.setEcompName(null);
- try{
- result = policyEngine.createPolicy(policyParameters);
- } catch (Exception e){
- logger.warn(e.getMessage());
- }
- //assertEquals(result.getResponseMessage(), response.getResponseMessage());
- }
-
- @Test
- public final void testCreatePolicyNullPolicyConfigName() {
- response.setResponseMessage("PE300 - Data Issue: No Config Name given.");
- policyParameters.setConfigName(null);;
- try{
- result = policyEngine.createPolicy(policyParameters);
- } catch (Exception e){
- logger.warn(e.getMessage());
- }
- //assertEquals(result.getResponseMessage(), response.getResponseMessage());
- }
-
- @Test
- public final void testCreatePolicyNullPolicyConfigBodyType() {
- response.setResponseMessage("PE300 - Data Issue: No Config Body Type given.");
- policyParameters.setConfigBodyType(null);
- try{
- result = policyEngine.createPolicy(policyParameters);
- } catch (Exception e){
- logger.warn(e.getMessage());
- }
- //assertEquals(result.getResponseMessage(), response.getResponseMessage());
- }
-
- @Test
- public final void testCreatePolicyNullPolicyConfigBody() {
- response.setResponseMessage("PE300 - Data Issue: No Config Body given.");
- policyParameters.setConfigBody(null);
- try{
- result = policyEngine.createPolicy(policyParameters);
- } catch (Exception e){
- logger.warn(e.getMessage());
- }
- //assertEquals(result.getResponseMessage(), response.getResponseMessage());
- }
-
- @Test
- public final void testUpdatePolicyNullPolicyName() {
- response.setResponseMessage("PE300 - Data Issue: No Policy Name given.");
- policyParameters.setPolicyName(null);
- try{
- result = policyEngine.updatePolicy(policyParameters);
- } catch (Exception e){
- logger.warn(e.getMessage());
- }
- //assertEquals(result.getResponseMessage(), response.getResponseMessage());
- }
-
- @Test
- public final void testUpdatePolicyNullPolicyScope() {
- response.setResponseMessage("PE300 - Data Issue: No Policy Scope given.");
- policyParameters.setPolicyName("test");
- try{
- result = policyEngine.updatePolicy(policyParameters);
- } catch (Exception e){
- logger.warn(e.getMessage());
- }
- //assertEquals(result.getResponseMessage(), response.getResponseMessage());
- }
-
- @Test
- public final void testUpdatePolicyNullEcompName() {
- response.setResponseMessage("PE300 - Data Issue: No ECOMP Name given.");
- policyParameters.setEcompName(null);
- try{
- result = policyEngine.updatePolicy(policyParameters);
- } catch (Exception e){
- logger.warn(e.getMessage());
- }
- //assertEquals(result.getResponseMessage(), response.getResponseMessage());
- }
-
- @Test
- public final void testUpdatePolicyNullPolicyConfigName() {
- response.setResponseMessage("PE300 - Data Issue: No Config Name given.");
- policyParameters.setConfigName(null);;
- try{
- result = policyEngine.createPolicy(policyParameters);
- } catch (Exception e){
- logger.warn(e.getMessage());
- }
- //assertEquals(result.getResponseMessage(), response.getResponseMessage());
- }
-
- @Test
- public final void testUpdatePolicyNullPolicyConfigBodyType() {
- response.setResponseMessage("PE300 - Data Issue: No Config Body Type given.");
- policyParameters.setConfigBodyType(null);
- try{
- result = policyEngine.createPolicy(policyParameters);
- } catch (Exception e){
- logger.warn(e.getMessage());
- }
- //assertEquals(result.getResponseMessage(), response.getResponseMessage());
- }
-
- @Test
- public final void testUpdatePolicyNullPolicyConfigBody() {
- response.setResponseMessage("PE300 - Data Issue: No Config Body given.");
- policyParameters.setConfigBody(null);
- try{
- result = policyEngine.createPolicy(policyParameters);
- } catch (Exception e){
- logger.warn(e.getMessage());
- }
- //assertEquals(result.getResponseMessage(), response.getResponseMessage());
- }
-} \ No newline at end of file
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/ConfigFirewallPolicyTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/ConfigFirewallPolicyTest.java
deleted file mode 100644
index 280f06e10..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/ConfigFirewallPolicyTest.java
+++ /dev/null
@@ -1,254 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import java.io.StringReader;
-import java.util.UUID;
-
-import javax.json.Json;
-import javax.json.JsonObject;
-import javax.json.JsonReader;
-
-import org.junit.Test;
-import org.mockito.Mockito;
-import org.openecomp.policy.api.PolicyChangeResponse;
-import org.openecomp.policy.api.PolicyConfigType;
-import org.openecomp.policy.api.PolicyEngine;
-import org.openecomp.policy.api.PolicyEngineException;
-import org.openecomp.policy.api.PolicyParameters;
-import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
-import org.openecomp.policy.common.logging.flexlogger.Logger;
-import org.openecomp.policy.std.StdPolicyChangeResponse;
-
-import junit.framework.TestCase;
-
-public class ConfigFirewallPolicyTest extends TestCase {
-
- private static final Logger logger = FlexLogger.getLogger(DecisionPolicyApiTest.class);
-
- private PolicyEngine policyEngine = null;
- private PolicyEngine mockPolicyEngine = null;
-
- PolicyChangeResponse result = null;
- StdPolicyChangeResponse response = new StdPolicyChangeResponse();
- PolicyParameters policyParameters = new PolicyParameters();
- String json = null;
-
- /**
- * Perform pre-test initialization
- *
- * @throws Exception
- *
- * @see TestCase#setUp()
- */
- protected void setUp() throws Exception {
- try {
- policyEngine = new PolicyEngine("Test/config_pass.properties");
- } catch (PolicyEngineException e) {
- logger.error(e.getMessage());
- fail("PolicyEngine Instantiation Error" + e);
- }
- logger.info("Loaded.. PolicyEngine");
-
- mockPolicyEngine = Mockito.mock(PolicyEngine.class);
-
- policyParameters.setPolicyConfigType(PolicyConfigType.Firewall); //required
- policyParameters.setPolicyName("test.junitTest"); //required
-
- json = "{\"serviceTypeId\":\"/v0/firewall/pan\",\"configName\":\"rule1607\",\"deploymentOption\":{\"deployNow\":false},\"securityZoneId\":\"/v0/firewall/pan\",\"serviceGroups\":[{\"name\":\"1607Group\",\"description\":null,\"members\":[{\"type\":\"REFERENCE\",\"name\":\"SList\"},{\"type\":\"REFERENCE\",\"name\":\"Syslog\"}]},{\"name\":\"Syslog\",\"description\":\"NA\",\"type\":\"SERVICE\",\"transportProtocol\":\"udp\",\"appProtocol\":null,\"ports\":\"514\"},{\"name\":\"SList\",\"description\":\"Service List\",\"type\":\"SERVICE\",\"transportProtocol\":\"tcp\",\"appProtocol\":null,\"ports\":\"8080\"}],\"addressGroups\":[{\"name\":\"1607Group\",\"description\":null,\"members\":[{\"type\":\"SUBNET\",\"value\":\"10.11.12.13/14\"},{\"type\":\"SUBNET\",\"value\":\"10.11.12.13/14\"}]},{\"name\":\"PL_CCE3\",\"description\":\"CCE Routers\",\"members\":[{\"type\":\"SUBNET\",\"value\":\"10.11.12.13/14\"}]}],\"firewallRuleList\":[{\"position\":\"1\",\"ruleName\":\"1607Rule\",\"fromZones\":[\"Trusted\"],\"toZones\":[\"Untrusted\"],\"negateSource\":false,\"negateDestination\":false,\"sourceList\":[{\"type\":\"REFERENCE\",\"value\":\"PL_CCE3\"},{\"type\":\"REFERENCE\",\"value\":\"1607Group\"}],\"destinationList\":[{\"type\":\"REFERENCE\",\"value\":\"1607Group\"}],\"sourceServices\":[],\"destServices\":[{\"type\":\"REFERENCE\",\"name\":\"1607Group\"}],\"action\":\"accept\",\"description\":\"Rule for 1607 templates\",\"enabled\":true,\"log\":true}]}";
-
- policyParameters.setConfigBody(buildJSON(json).toString());
-
- //policyParameters.setPolicyScope("test"); //Directory will be created where the Policies are saved... this displays a a subscope on the GUI
- policyParameters.setRequestID(UUID.randomUUID());
- }
-
- private static JsonObject buildJSON(String jsonString) {
- JsonObject json = null;;
- if (jsonString != null) {
- StringReader in = null;
-
- in = new StringReader(jsonString);
-
- JsonReader jsonReader = Json.createReader(in);
- json = jsonReader.readObject();
- }
-
- return json;
- }
- /**
- * Perform post-test clean up
- *
- * @throws Exception
- *
- * @see TestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- super.tearDown();
- // Add additional tear down code here
- }
-
- /**
- * Run the PolicyChangeResponse createPolicy(PolicyParameters) method test
- */
- public void testCreatePolicy() {
- response.setResponseMessage("success");
- PolicyChangeResponse result = null;
- try {
-
- Mockito.when(mockPolicyEngine.createPolicy(policyParameters)).thenReturn(response);
- result = mockPolicyEngine.createPolicy(policyParameters);
-
- } catch (Exception e) {
- logger.warn(e.getMessage());
- }
- assertEquals(result, response);
- }
-
- /**
- * Run the String createConfigFirewallPolicy() method test
- */
- @SuppressWarnings("deprecation")
- @Test
- public void testCreateConfigFirewallPolicy() {
- String response = "success";
- String result = null;
- JsonObject jsonObj = buildJSON(json);
- try {
-
- Mockito.when(mockPolicyEngine.createConfigFirewallPolicy("testPolicy",jsonObj, "test", null, null, null, null, null)).thenReturn(response);
- result = mockPolicyEngine.createConfigFirewallPolicy("testPolicy",jsonObj, "test", null, null, null, null, null);
-
- } catch (Exception e) {
- logger.warn(e.getMessage());
- }
- assertEquals(result, response);
- }
-
- /**
- * Run the PolicyChangeResponse updatePolicy(PolicyParameters) method test
- */
- public void testUpdatePolicy() {
- response.setResponseMessage("success");
- PolicyChangeResponse result = null;
- try {
-
- Mockito.when(mockPolicyEngine.updatePolicy(policyParameters)).thenReturn(response);
- result = mockPolicyEngine.updatePolicy(policyParameters);
-
- } catch (Exception e) {
- logger.warn(e.getMessage());
- }
- assertEquals(result, response);
- }
-
- /**
- * Run the String updateConfigFirewallPolicy() method test
- */
- @SuppressWarnings("deprecation")
- @Test
- public void testUpdateConfigFirewallPolicy() {
- String response = "success";
- String result = null;
- JsonObject jsonObj = buildJSON(json);
- try {
-
- Mockito.when(mockPolicyEngine.updateConfigFirewallPolicy("testPolicy",jsonObj, "test", null, null, null, null, null)).thenReturn(response);
- result = mockPolicyEngine.updateConfigFirewallPolicy("testPolicy",jsonObj, "test", null, null, null, null, null);
-
- } catch (Exception e) {
- logger.warn(e.getMessage());
- }
- assertEquals(result, response);
- }
-
- @Test
- public final void testCreatePolicyNullPolicyName() {
- response.setResponseMessage("PE500 - Process Flow Issue: :500:");
- policyParameters.setPolicyName(null);
- try{
- result = policyEngine.createPolicy(policyParameters);
- } catch (Exception e){
- logger.warn(e.getMessage());
- }
- assertEquals(result.getResponseMessage(), response.getResponseMessage());
- }
-
- @Test
- public final void testCreatePolicyNullPolicyScope() {
- response.setResponseMessage("PE500 - Process Flow Issue: :500:");
- policyParameters.setPolicyName("test");
- try{
- result = policyEngine.createPolicy(policyParameters);
- } catch (Exception e){
- logger.warn(e.getMessage());
- }
- assertEquals(result.getResponseMessage(), response.getResponseMessage());
- }
-
- @Test
- public final void testCreatePolicyNullPolicyConfigBody() {
- response.setResponseMessage("PE500 - Process Flow Issue: :500:");
- policyParameters.setConfigBody(null);
- try{
- result = policyEngine.createPolicy(policyParameters);
- } catch (Exception e){
- logger.warn(e.getMessage());
- }
- assertEquals(result.getResponseMessage(), response.getResponseMessage());
- }
-
- @Test
- public final void testUpdatePolicyNullPolicyName() {
- response.setResponseMessage("PE500 - Process Flow Issue: :500:");
- policyParameters.setPolicyName(null);
- try{
- result = policyEngine.updatePolicy(policyParameters);
- } catch (Exception e){
- logger.warn(e.getMessage());
- }
- assertEquals(result.getResponseMessage(), response.getResponseMessage());
- }
-
- @Test
- public final void testUpdatePolicyNullPolicyScope() {
- response.setResponseMessage("PE500 - Process Flow Issue: :500:");
- policyParameters.setPolicyName("test");
- try{
- result = policyEngine.updatePolicy(policyParameters);
- } catch (Exception e){
- logger.warn(e.getMessage());
- }
- assertEquals(result.getResponseMessage(), response.getResponseMessage());
- }
-
- @Test
- public final void testUpdatePolicyNullPolicyConfigBody() {
- response.setResponseMessage("PE500 - Process Flow Issue: :500:");
- policyParameters.setConfigBody(null);
- try{
- result = policyEngine.createPolicy(policyParameters);
- } catch (Exception e){
- logger.warn(e.getMessage());
- }
- assertEquals(result.getResponseMessage(), response.getResponseMessage());
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/ConfigRequestParametersTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/ConfigRequestParametersTest.java
deleted file mode 100644
index 0e8f912c9..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/ConfigRequestParametersTest.java
+++ /dev/null
@@ -1,362 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import java.util.Hashtable;
-import java.util.Map;
-import java.util.UUID;
-
-import org.junit.*;
-import org.openecomp.policy.api.ConfigRequestParameters;
-
-import static org.junit.Assert.*;
-
-/**
- * The class <code>ConfigRequestParametersTest</code> contains tests for the class <code>{@link ConfigRequestParameters}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- * @version $Revision: 1.0 $
- */
-public class ConfigRequestParametersTest {
- /**
- * Run the ConfigRequestParameters() constructor test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testConfigRequestParameters_1()
- throws Exception {
-
- ConfigRequestParameters result = new ConfigRequestParameters();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(null, result.getPolicyName());
- assertEquals(null, result.getConfigName());
- assertEquals(null, result.getConfigAttributes());
- assertEquals(null, result.getRequestID());
- assertEquals(null, result.getEcompName());
- assertEquals(Boolean.FALSE, result.getUnique());
- }
-
- /**
- * Run the ConfigRequestParameters(String,String,String,Map<String,String>,Boolean,UUID) constructor test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testConfigRequestParameters_2()
- throws Exception {
- String policyName = "";
- String eCOMPComponentName = "";
- String configName = "";
- Map<String, String> configAttributes = new Hashtable<String, String>();
- Boolean unique = new Boolean(true);
- UUID requestID = UUID.randomUUID();
-
- ConfigRequestParameters result = createConfigRequest(policyName, eCOMPComponentName, configName, configAttributes, unique, requestID);
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("", result.getPolicyName());
- assertEquals("", result.getConfigName());
- assertEquals("", result.getEcompName());
- assertEquals(Boolean.TRUE, result.getUnique());
- }
-
- /**
- * Run the Map<String, String> getConfigAttributes() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetConfigAttributes_1()
- throws Exception {
- ConfigRequestParameters fixture = createConfigRequest("", "", "", new Hashtable<String, String>(), new Boolean(true), UUID.randomUUID());
-
- Map<String, String> result = fixture.getConfigAttributes();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(0, result.size());
- }
-
- /**
- * Run the String getConfigName() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetConfigName_1()
- throws Exception {
- ConfigRequestParameters fixture = createConfigRequest("", "", "", new Hashtable<String, String>(), new Boolean(true), UUID.randomUUID());
-
- String result = fixture.getConfigName();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the String getEcompName() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetEcompName_1()
- throws Exception {
- ConfigRequestParameters fixture = createConfigRequest("", "", "", new Hashtable<String, String>(), new Boolean(true), UUID.randomUUID());
-
- String result = fixture.getEcompName();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the String getPolicyName() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetPolicyName_1()
- throws Exception {
- ConfigRequestParameters fixture = createConfigRequest("", "", "", new Hashtable<String, String>(), new Boolean(true), UUID.randomUUID());
-
- String result = fixture.getPolicyName();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the UUID getRequestID() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetRequestID_1()
- throws Exception {
- ConfigRequestParameters fixture = createConfigRequest("", "", "", new Hashtable<String, String>(), new Boolean(true), UUID.fromString("6b5aa070-90bc-46a6-9a59-e1fe526df7ae"));
-
- UUID result = fixture.getRequestID();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("6b5aa070-90bc-46a6-9a59-e1fe526df7ae", result.toString());
- assertEquals(4, result.version());
- assertEquals(2, result.variant());
- assertEquals(-7324574836520519762L, result.getLeastSignificantBits());
- assertEquals(7735671715287287462L, result.getMostSignificantBits());
- }
-
- /**
- * Run the Boolean getUnique() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetUnique_1()
- throws Exception {
- ConfigRequestParameters fixture = createConfigRequest("", "", "", new Hashtable<String, String>(), new Boolean(true), UUID.randomUUID());
-
- Boolean result = fixture.getUnique();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("true", result.toString());
- assertEquals(true, result.booleanValue());
- }
-
- /**
- * Run the void makeUnique(Boolean) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testMakeUnique_1()
- throws Exception {
- ConfigRequestParameters fixture = createConfigRequest("", "", "", new Hashtable<String, String>(), new Boolean(true), UUID.randomUUID());
- Boolean unique = new Boolean(true);
-
- fixture.makeUnique(unique);
-
- // add additional test code here
- }
-
- /**
- * Run the void setConfigAttributes(Map<String,String>) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetConfigAttributes_1()
- throws Exception {
- ConfigRequestParameters fixture = createConfigRequest("", "", "", new Hashtable<String, String>(), new Boolean(true), UUID.randomUUID());
- Map<String, String> configAttributes = new Hashtable<String, String>();
-
- fixture.setConfigAttributes(configAttributes);
-
- // add additional test code here
- }
-
- /**
- * Run the void setConfigName(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetConfigName_1()
- throws Exception {
- ConfigRequestParameters fixture = createConfigRequest("", "", "", new Hashtable<String, String>(), new Boolean(true), UUID.randomUUID());
- String configName = "";
-
- fixture.setConfigName(configName);
-
- // add additional test code here
- }
-
- /**
- * Run the void setEcompName(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetEcompName_1()
- throws Exception {
- ConfigRequestParameters fixture = createConfigRequest("", "", "", new Hashtable<String, String>(), new Boolean(true), UUID.randomUUID());
- String eCOMPComponentName = "";
-
- fixture.setEcompName(eCOMPComponentName);
-
- // add additional test code here
- }
-
- /**
- * Run the void setPolicyName(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetPolicyName_1()
- throws Exception {
- ConfigRequestParameters fixture = createConfigRequest("", "", "", new Hashtable<String, String>(), new Boolean(true), UUID.randomUUID());
- String policyName = "";
-
- fixture.setPolicyName(policyName);
-
- // add additional test code here
- }
-
- /**
- * Run the void setRequestID(UUID) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetRequestID_1()
- throws Exception {
- ConfigRequestParameters fixture = createConfigRequest("", "", "", new Hashtable<String, String>(), new Boolean(true), UUID.randomUUID());
- UUID requestID = UUID.randomUUID();
-
- fixture.setRequestID(requestID);
-
- // add additional test code here
- }
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(ConfigRequestParametersTest.class);
- }
-
- private ConfigRequestParameters createConfigRequest(String policyName, String eCOMPComponentName, String configName, Map<String,String> configAttributes, Boolean unique, UUID requestID){
- ConfigRequestParameters configRequestParameters = new ConfigRequestParameters();
- configRequestParameters.setRequestID(requestID);
- configRequestParameters.setPolicyName(policyName);
- configRequestParameters.setEcompName(eCOMPComponentName);
- configRequestParameters.setConfigName(configName);
- configRequestParameters.setConfigAttributes(configAttributes);
- configRequestParameters.makeUnique(unique);
- return configRequestParameters;
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/DecisionPolicyApiTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/DecisionPolicyApiTest.java
deleted file mode 100644
index 82ba1c7ca..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/DecisionPolicyApiTest.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-
-import org.junit.Test;
-import org.mockito.Mockito;
-import org.openecomp.policy.api.AttributeType;
-import org.openecomp.policy.api.PolicyChangeResponse;
-import org.openecomp.policy.api.PolicyClass;
-import org.openecomp.policy.api.PolicyEngine;
-import org.openecomp.policy.api.PolicyEngineException;
-import org.openecomp.policy.api.PolicyParameters;
-import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
-import org.openecomp.policy.common.logging.flexlogger.Logger;
-import org.openecomp.policy.std.StdPolicyChangeResponse;
-
-import junit.framework.TestCase;
-
-/**
- * The class <code>DecisionPolicyApiTest</code> contains tests for the class
- * {@link <code>PolicyEngine</code>}
- *
- * @pattern JUnit Test Case
- * *
- */
-public class DecisionPolicyApiTest extends TestCase {
-
- private static final Logger logger = FlexLogger.getLogger(DecisionPolicyApiTest.class);
-
- private PolicyEngine policyEngine = null;
- private PolicyEngine mockPolicyEngine = null;
-
- PolicyChangeResponse result = null;
- StdPolicyChangeResponse response = new StdPolicyChangeResponse();
- PolicyParameters policyParameters = new PolicyParameters();
-
- /**
- * Perform pre-test initialization
- *
- * @throws Exception
- *
- * @see TestCase#setUp()
- */
- protected void setUp() throws Exception {
- try {
- policyEngine = new PolicyEngine("Test/config_pass.properties");
- } catch (PolicyEngineException e) {
- logger.error(e.getMessage());
- fail("PolicyEngine Instantiation Error" + e);
- }
- logger.info("Loaded.. PolicyEngine");
-
- mockPolicyEngine = Mockito.mock(PolicyEngine.class);
-
- policyParameters.setPolicyClass(PolicyClass.Decision); //required
- policyParameters.setPolicyName("test.junitTest"); //required
- policyParameters.setEcompName("test");
- policyParameters.setPolicyDescription("testing"); //optional
- //policyParameters.setPolicyScope("test"); //Directory will be created where the Policies are saved... this displays a a subscope on the GUI
-
- //Set the Component Attributes... These are Optional
- Map<String, String> configAttributes = new HashMap<String, String>();
- configAttributes.put("test", "testing");
-
- Map<AttributeType, Map<String,String>> attributes = new HashMap<AttributeType, Map<String,String>>();
- attributes.put(AttributeType.MATCHING, configAttributes);
- policyParameters.setAttributes(attributes);
-
- //Set the settings... These are Optional
-/* Map<String, String> settingsMap = new HashMap<String, String>();
- settingsMap.put("server", "5");
-
- Map<AttributeType, Map<String,String>> settings = new HashMap<AttributeType, Map<String, String>>();
- settings.put(AttributeType.SETTINGS, settingsMap);
- policyParameters.setSettings(settings);*/
-
- policyParameters.setRequestID(UUID.randomUUID());
- }
-
- /**
- * Perform post-test clean up
- *
- * @throws Exception
- *
- * @see TestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- super.tearDown();
- // Add additional tear down code here
- }
-
- /**
- * Run the PolicyChangeResponse createPolicy(PolicyParameters) method test
- */
- public void testCreatePolicy() {
- response.setResponseMessage("success");
- PolicyChangeResponse result = null;
- try {
-
- Mockito.when(mockPolicyEngine.createPolicy(policyParameters)).thenReturn(response);
- result = mockPolicyEngine.createPolicy(policyParameters);
-
- } catch (Exception e) {
- logger.warn(e.getMessage());
- }
- assertEquals(result, response);
- }
-
- /**
- * Run the PolicyChangeResponse updatePolicy(PolicyParameters) method test
- */
- public void testUpdatePolicy() {
- response.setResponseMessage("success");
- PolicyChangeResponse result = null;
- try {
-
- Mockito.when(mockPolicyEngine.updatePolicy(policyParameters)).thenReturn(response);
- result = mockPolicyEngine.updatePolicy(policyParameters);
-
- } catch (Exception e) {
- logger.warn(e.getMessage());
- }
- assertEquals(result, response);
- }
-
- @Test
- public final void testCreatePolicyNullPolicyName() {
- response.setResponseMessage("PE500 - Process Flow Issue: :500:");
- policyParameters.setPolicyName(null);
- try{
- result = policyEngine.createPolicy(policyParameters);
- } catch (Exception e){
- logger.warn(e.getMessage());
- }
- assertEquals(result.getResponseMessage(), response.getResponseMessage());
- }
-
- @Test
- public final void testCreatePolicyNullPolicyScope() {
- response.setResponseMessage("PE500 - Process Flow Issue: :500:");
- policyParameters.setPolicyName("test");
- try{
- result = policyEngine.createPolicy(policyParameters);
- } catch (Exception e){
- logger.warn(e.getMessage());
- }
- assertEquals(result.getResponseMessage(), response.getResponseMessage());
- }
-
- @Test
- public final void testCreatePolicyNullEcompName() {
- response.setResponseMessage("PE500 - Process Flow Issue: :500:");
- policyParameters.setEcompName(null);
- try{
- result = policyEngine.createPolicy(policyParameters);
- } catch (Exception e){
- logger.warn(e.getMessage());
- }
- assertEquals(result.getResponseMessage(), response.getResponseMessage());
- }
-
- @Test
- public final void testUpdatePolicyNullPolicyName() {
- response.setResponseMessage("PE500 - Process Flow Issue: :500:");
- policyParameters.setPolicyName(null);
- try{
- result = policyEngine.updatePolicy(policyParameters);
- } catch (Exception e){
- logger.warn(e.getMessage());
- }
- assertEquals(result.getResponseMessage(), response.getResponseMessage());
- }
-
- @Test
- public final void testUpdatePolicyNullPolicyScope() {
- response.setResponseMessage("PE500 - Process Flow Issue: :500:");
- policyParameters.setPolicyName("test");
- try{
- result = policyEngine.updatePolicy(policyParameters);
- } catch (Exception e){
- logger.warn(e.getMessage());
- }
- assertEquals(result.getResponseMessage(), response.getResponseMessage());
- }
-
- @Test
- public final void testUpdatePolicyNullEcompName() {
- response.setResponseMessage("PE500 - Process Flow Issue: :500:");
- policyParameters.setEcompName(null);
- try{
- result = policyEngine.updatePolicy(policyParameters);
- } catch (Exception e){
- logger.warn(e.getMessage());
- }
- assertEquals(result.getResponseMessage(), response.getResponseMessage());
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/DecisionRequestParametersTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/DecisionRequestParametersTest.java
deleted file mode 100644
index d8fdfbc0a..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/DecisionRequestParametersTest.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import java.util.Hashtable;
-import java.util.Map;
-import java.util.UUID;
-
-import org.junit.*;
-import org.openecomp.policy.api.DecisionRequestParameters;
-
-import static org.junit.Assert.*;
-
-/**
- * The class <code>DecisionRequestParametersTest</code> contains tests for the class <code>{@link DecisionRequestParameters}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- * @version $Revision: 1.0 $
- */
-public class DecisionRequestParametersTest {
- /**
- * Run the DecisionRequestParameters() constructor test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testDecisionRequestParameters_1()
- throws Exception {
-
- DecisionRequestParameters result = new DecisionRequestParameters();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(null, result.getECOMPComponentName());
- assertEquals(null, result.getDecisionAttributes());
- assertEquals(null, result.getRequestID());
- }
-
- /**
- * Run the DecisionRequestParameters(String,Map<String,String>,UUID) constructor test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testDecisionRequestParameters_2()
- throws Exception {
- String eCOMPComponentName = "";
- Map<String, String> decisionAttributes = new Hashtable<String, String>();
- UUID requestID = UUID.randomUUID();
-
- DecisionRequestParameters result = new DecisionRequestParameters(eCOMPComponentName, decisionAttributes, requestID);
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("", result.getECOMPComponentName());
- }
-
- /**
- * Run the Map<String, String> getDecisionAttributes() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetDecisionAttributes_1()
- throws Exception {
- DecisionRequestParameters fixture = new DecisionRequestParameters("", new Hashtable<String, String>(), UUID.randomUUID());
-
- Map<String, String> result = fixture.getDecisionAttributes();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(0, result.size());
- }
-
- /**
- * Run the String getECOMPComponentName() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetECOMPComponentName_1()
- throws Exception {
- DecisionRequestParameters fixture = new DecisionRequestParameters("", new Hashtable<String, String>(), UUID.randomUUID());
-
- String result = fixture.getECOMPComponentName();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the UUID getRequestID() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetRequestID_1()
- throws Exception {
- DecisionRequestParameters fixture = new DecisionRequestParameters("", new Hashtable<String, String>(), UUID.fromString("d1db6a6d-7140-4864-8200-6b541261fdd2"));
-
- UUID result = fixture.getRequestID();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("d1db6a6d-7140-4864-8200-6b541261fdd2", result.toString());
- assertEquals(4, result.version());
- assertEquals(2, result.variant());
- assertEquals(-9079138839949083182L, result.getLeastSignificantBits());
- assertEquals(-3324946881598961564L, result.getMostSignificantBits());
- }
-
- /**
- * Run the void setDecisionAttributes(Map<String,String>) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetDecisionAttributes_1()
- throws Exception {
- DecisionRequestParameters fixture = new DecisionRequestParameters("", new Hashtable<String, String>(), UUID.randomUUID());
- Map<String, String> decisionAttributes = new Hashtable<String, String>();
-
- fixture.setDecisionAttributes(decisionAttributes);
-
- // add additional test code here
- }
-
- /**
- * Run the void setECOMPComponentName(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetECOMPComponentName_1()
- throws Exception {
- DecisionRequestParameters fixture = new DecisionRequestParameters("", new Hashtable<String, String>(), UUID.randomUUID());
- String eCOMPComponentName = "";
-
- fixture.setECOMPComponentName(eCOMPComponentName);
-
- // add additional test code here
- }
-
- /**
- * Run the void setRequestID(UUID) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetRequestID_1()
- throws Exception {
- DecisionRequestParameters fixture = new DecisionRequestParameters("", new Hashtable<String, String>(), UUID.randomUUID());
- UUID requestID = UUID.randomUUID();
-
- fixture.setRequestID(requestID);
-
- // add additional test code here
- }
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(DecisionRequestParametersTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/DeletePolicyConditionTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/DeletePolicyConditionTest.java
deleted file mode 100644
index c2941202b..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/DeletePolicyConditionTest.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import org.junit.*;
-import org.openecomp.policy.api.DeletePolicyCondition;
-
-import static org.junit.Assert.*;
-
-/**
- * The class <code>DeletePolicyConditionTest</code> contains tests for the class <code>{@link DeletePolicyCondition}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- * @version $Revision: 1.0 $
- */
-public class DeletePolicyConditionTest {
- /**
- * Run the String toString() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testToString_1()
- throws Exception {
- DeletePolicyCondition fixture = DeletePolicyCondition.ALL;
-
- String result = fixture.toString();
-
- // add additional test code here
- assertEquals("All Versions", result);
- }
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(DeletePolicyConditionTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/DeletePolicyParametersTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/DeletePolicyParametersTest.java
deleted file mode 100644
index 7723f9819..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/DeletePolicyParametersTest.java
+++ /dev/null
@@ -1,314 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import java.util.UUID;
-
-import org.junit.*;
-import org.openecomp.policy.api.DeletePolicyCondition;
-import org.openecomp.policy.api.DeletePolicyParameters;
-
-import static org.junit.Assert.*;
-
-/**
- * The class <code>DeletePolicyParametersTest</code> contains tests for the class <code>{@link DeletePolicyParameters}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- * @version $Revision: 1.0 $
- */
-public class DeletePolicyParametersTest {
- /**
- * Run the DeletePolicyCondition getDeleteCondition() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetDeleteCondition_1()
- throws Exception {
- DeletePolicyParameters fixture = new DeletePolicyParameters();
- fixture.setPolicyComponent("");
- fixture.setPolicyName("");
- fixture.setDeleteCondition(DeletePolicyCondition.ALL);
- fixture.setRequestID(UUID.randomUUID());
- fixture.setPdpGroup("");
-
- DeletePolicyCondition result = fixture.getDeleteCondition();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("All Versions", result.toString());
- assertEquals("ALL", result.name());
- assertEquals(1, result.ordinal());
- }
-
- /**
- * Run the String getPdpGroup() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetPdpGroup_1()
- throws Exception {
- DeletePolicyParameters fixture = new DeletePolicyParameters();
- fixture.setPolicyComponent("");
- fixture.setPolicyName("");
- fixture.setDeleteCondition(DeletePolicyCondition.ALL);
- fixture.setRequestID(UUID.randomUUID());
- fixture.setPdpGroup("");
-
- String result = fixture.getPdpGroup();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the String getPolicyComponent() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetPolicyComponent_1()
- throws Exception {
- DeletePolicyParameters fixture = new DeletePolicyParameters();
- fixture.setPolicyComponent("");
- fixture.setPolicyName("");
- fixture.setDeleteCondition(DeletePolicyCondition.ALL);
- fixture.setRequestID(UUID.randomUUID());
- fixture.setPdpGroup("");
-
- String result = fixture.getPolicyComponent();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the String getPolicyName() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetPolicyName_1()
- throws Exception {
- DeletePolicyParameters fixture = new DeletePolicyParameters();
- fixture.setPolicyComponent("");
- fixture.setPolicyName("");
- fixture.setDeleteCondition(DeletePolicyCondition.ALL);
- fixture.setRequestID(UUID.randomUUID());
- fixture.setPdpGroup("");
-
- String result = fixture.getPolicyName();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the UUID getRequestID() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetRequestID_1()
- throws Exception {
- DeletePolicyParameters fixture = new DeletePolicyParameters();
- fixture.setPolicyComponent("");
- fixture.setPolicyName("");
- fixture.setDeleteCondition(DeletePolicyCondition.ALL);
- fixture.setRequestID(UUID.fromString("482e90e2-2ad7-4265-9893-4cfe08ef1e3d"));
- fixture.setPdpGroup("");
-
- UUID result = fixture.getRequestID();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("482e90e2-2ad7-4265-9893-4cfe08ef1e3d", result.toString());
- assertEquals(4, result.version());
- assertEquals(2, result.variant());
- assertEquals(-7452528304412746179L, result.getLeastSignificantBits());
- assertEquals(5201253920715260517L, result.getMostSignificantBits());
- }
-
- /**
- * Run the void setDeleteCondition(DeletePolicyCondition) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetDeleteCondition_1()
- throws Exception {
- DeletePolicyParameters fixture = new DeletePolicyParameters();
- fixture.setPolicyComponent("");
- fixture.setPolicyName("");
- fixture.setDeleteCondition(DeletePolicyCondition.ALL);
- fixture.setRequestID(UUID.randomUUID());
- fixture.setPdpGroup("");
- DeletePolicyCondition deleteCondition = DeletePolicyCondition.ALL;
-
- fixture.setDeleteCondition(deleteCondition);
-
- // add additional test code here
- }
-
- /**
- * Run the void setPdpGroup(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetPdpGroup_1()
- throws Exception {
- DeletePolicyParameters fixture = new DeletePolicyParameters();
- fixture.setPolicyComponent("");
- fixture.setPolicyName("");
- fixture.setDeleteCondition(DeletePolicyCondition.ALL);
- fixture.setRequestID(UUID.randomUUID());
- fixture.setPdpGroup("");
- String pdpGroup = "";
-
- fixture.setPdpGroup(pdpGroup);
-
- // add additional test code here
- }
-
- /**
- * Run the void setPolicyComponent(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetPolicyComponent_1()
- throws Exception {
- DeletePolicyParameters fixture = new DeletePolicyParameters();
- fixture.setPolicyComponent("");
- fixture.setPolicyName("");
- fixture.setDeleteCondition(DeletePolicyCondition.ALL);
- fixture.setRequestID(UUID.randomUUID());
- fixture.setPdpGroup("");
- String policyComponent = "";
-
- fixture.setPolicyComponent(policyComponent);
-
- // add additional test code here
- }
-
- /**
- * Run the void setPolicyName(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetPolicyName_1()
- throws Exception {
- DeletePolicyParameters fixture = new DeletePolicyParameters();
- fixture.setPolicyComponent("");
- fixture.setPolicyName("");
- fixture.setDeleteCondition(DeletePolicyCondition.ALL);
- fixture.setRequestID(UUID.randomUUID());
- fixture.setPdpGroup("");
- String policyName = "";
-
- fixture.setPolicyName(policyName);
-
- // add additional test code here
- }
-
- /**
- * Run the void setRequestID(UUID) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetRequestID_1()
- throws Exception {
- DeletePolicyParameters fixture = new DeletePolicyParameters();
- fixture.setPolicyComponent("");
- fixture.setPolicyName("");
- fixture.setDeleteCondition(DeletePolicyCondition.ALL);
- fixture.setRequestID(UUID.randomUUID());
- fixture.setPdpGroup("");
- UUID requestID = UUID.randomUUID();
-
- fixture.setRequestID(requestID);
-
- // add additional test code here
- }
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(DeletePolicyParametersTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/EventRequestParametersTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/EventRequestParametersTest.java
deleted file mode 100644
index abfc31f8b..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/EventRequestParametersTest.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import java.util.Hashtable;
-import java.util.Map;
-import java.util.UUID;
-
-import org.junit.*;
-import org.openecomp.policy.api.EventRequestParameters;
-
-import static org.junit.Assert.*;
-
-/**
- * The class <code>EventRequestParametersTest</code> contains tests for the class <code>{@link EventRequestParameters}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- * @version $Revision: 1.0 $
- */
-public class EventRequestParametersTest {
- /**
- * Run the EventRequestParameters() constructor test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testEventRequestParameters_1()
- throws Exception {
-
- EventRequestParameters result = new EventRequestParameters();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(null, result.getEventAttributes());
- assertEquals(null, result.getRequestID());
- }
-
- /**
- * Run the EventRequestParameters(Map<String,String>,UUID) constructor test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testEventRequestParameters_2()
- throws Exception {
- Map<String, String> eventAttributes = new Hashtable<String, String>();
- UUID requestID = UUID.randomUUID();
-
- EventRequestParameters result = new EventRequestParameters(eventAttributes, requestID);
-
- // add additional test code here
- assertNotNull(result);
- }
-
- /**
- * Run the Map<String, String> getEventAttributes() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetEventAttributes_1()
- throws Exception {
- EventRequestParameters fixture = new EventRequestParameters(new Hashtable<String, String>(), UUID.randomUUID());
-
- Map<String, String> result = fixture.getEventAttributes();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(0, result.size());
- }
-
- /**
- * Run the UUID getRequestID() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetRequestID_1()
- throws Exception {
- EventRequestParameters fixture = new EventRequestParameters(new Hashtable<String, String>(), UUID.fromString("5b15376d-569b-4772-ac75-9362043f6a6c"));
-
- UUID result = fixture.getRequestID();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("5b15376d-569b-4772-ac75-9362043f6a6c", result.toString());
- assertEquals(4, result.version());
- assertEquals(2, result.variant());
- assertEquals(-6019743277723456916L, result.getLeastSignificantBits());
- assertEquals(6563212974706345842L, result.getMostSignificantBits());
- }
-
- /**
- * Run the void setEventAttributes(Map<String,String>) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetEventAttributes_1()
- throws Exception {
- EventRequestParameters fixture = new EventRequestParameters(new Hashtable<String, String>(), UUID.randomUUID());
- Map<String, String> eventAttributes = new Hashtable<String, String>();
-
- fixture.setEventAttributes(eventAttributes);
-
- // add additional test code here
- }
-
- /**
- * Run the void setRequestID(UUID) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetRequestID_1()
- throws Exception {
- EventRequestParameters fixture = new EventRequestParameters(new Hashtable<String, String>(), UUID.randomUUID());
- UUID requestID = UUID.randomUUID();
-
- fixture.setRequestID(requestID);
-
- // add additional test code here
- }
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(EventRequestParametersTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/GetConfigByPolicyNameTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/GetConfigByPolicyNameTest.java
deleted file mode 100644
index 7bfa27c6e..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/GetConfigByPolicyNameTest.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import java.util.Collection;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.openecomp.policy.api.PolicyConfig;
-import org.openecomp.policy.api.PolicyConfigException;
-import org.openecomp.policy.api.PolicyEngine;
-import org.openecomp.policy.api.PolicyEngineException;
-import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
-import org.openecomp.policy.common.logging.flexlogger.Logger;
-
-import junit.framework.TestCase;
-
-public class GetConfigByPolicyNameTest extends TestCase {
- private PolicyEngine policyEngine = null;
- private String policyName = null;
- private Collection<PolicyConfig> policyConfig = null;
- private static final Logger logger = FlexLogger.getLogger(GetConfigByPolicyNameTest.class);
- @Before
- public void setUp() {
- try {
- policyEngine = new PolicyEngine("Test/config_pass.properties");
- } catch (PolicyEngineException e) {
- logger.error(e.getMessage());
- fail("PolicyEngine Instantiation Error" + e);
- }
- logger.info("Loaded.. PolicyEngine");
- }
-
- @SuppressWarnings("deprecation")
- @Test
- public void testGetConfigPolicyNameNotValid(){
- policyName = null;
- try{
- policyConfig = policyEngine.getConfigByPolicyName(policyName);
- } catch (PolicyConfigException e){
- logger.warn(e.getMessage());
- }
- assertNull(policyConfig);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/GetConfigStringStringMapTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/GetConfigStringStringMapTest.java
deleted file mode 100644
index c5b7f8f6d..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/GetConfigStringStringMapTest.java
+++ /dev/null
@@ -1,259 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.fail;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.openecomp.policy.api.PolicyConfig;
-import org.openecomp.policy.api.PolicyConfigException;
-import org.openecomp.policy.api.PolicyConfigStatus;
-import org.openecomp.policy.api.PolicyEngine;
-import org.openecomp.policy.api.PolicyEngineException;
-import org.openecomp.policy.api.PolicyType;
-import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
-import org.openecomp.policy.common.logging.flexlogger.Logger;
-
-public class GetConfigStringStringMapTest {
-
- private PolicyEngine policyEngine = null;
- private String eCOMPComponentName = null;
- private String configName = null;
- private Map<String,String> configAttributes = new HashMap<String,String>();
- private Collection<PolicyConfig> policyConfig = null;
- private static final Logger logger = FlexLogger.getLogger(GetConfigStringStringMapTest.class);
- @Before
- public void setUp() {
- try {
- policyEngine = new PolicyEngine("Test/config_pass.properties");
- } catch (PolicyEngineException e) {
- logger.error(e.getMessage());
- fail("PolicyEngine Instantiation Error" + e);
- }
- logger.info("Loaded.. PolicyEngine");
- }
-
- @SuppressWarnings("deprecation")
- @Test
- public void testGetConfigStringStringMapFail() {
- eCOMPComponentName = null;
- configName = null;
- configAttributes = null;
- try {
- policyConfig = policyEngine.getConfig(eCOMPComponentName, configName, configAttributes);
- } catch (PolicyConfigException e) {
- logger.warn(e.getMessage());
- }
- assertNull(policyConfig);
- }
-
- @SuppressWarnings("deprecation")
- @Test
- public void testGetConfigStringStringMapFail1() {
- eCOMPComponentName = null;
- configName = "testFail";
- configAttributes.put("TestValue", "Fail");
- try {
- policyConfig = policyEngine.getConfig(eCOMPComponentName, configName, configAttributes);
- } catch (PolicyConfigException e) {
- logger.warn(e.getMessage());
- }
- assertNull(policyConfig);
- }
-
- @SuppressWarnings("deprecation")
- @Test
- public void testGetConfigStringStringMapFail2() {
- eCOMPComponentName = "TestFail";
- configName = null;
- configAttributes.put("TestValue", "Fail");
- try {
- policyConfig = policyEngine.getConfig(eCOMPComponentName, configName, configAttributes);
- } catch (PolicyConfigException e) {
- logger.warn(e.getMessage());
- }
- assertNull(policyConfig);
- }
-
- @SuppressWarnings("deprecation")
- @Test
- public void testGetConfigStringStringMapFail3() {
- eCOMPComponentName = "TestFail";
- configName = "configFail";
- configAttributes= null;
- try {
- policyConfig = policyEngine.getConfig(eCOMPComponentName, configName, configAttributes);
- } catch (PolicyConfigException e) {
- logger.warn(e.getMessage());
- }
- assertNull(policyConfig);
- }
-
- @SuppressWarnings("deprecation")
- @Test
- public void testGetConfigStringStringMapfail4() {
- eCOMPComponentName = "TestFail";
- configName = "configFail";
- configAttributes.put("", "");
- try {
- policyConfig = policyEngine.getConfig(eCOMPComponentName, configName, configAttributes);
- } catch (PolicyConfigException e) {
- logger.warn(e.getMessage());
- }
- assertNull(policyConfig);
- }
-
- //@Test
- @SuppressWarnings("deprecation")
- public void testGetConfigStringStringMapNotValid() {
- eCOMPComponentName = "TestFail";
- configName = "configFail";
- configAttributes.put("Action:com.test.fail", "Value");
- try {
- policyConfig = policyEngine.getConfig(eCOMPComponentName, configName, configAttributes);
- } catch (PolicyConfigException e) {
- logger.warn(e.getMessage());
- }
- for(PolicyConfig policyConfig : this.policyConfig){
- logger.info(policyConfig.getPolicyConfigMessage() + " , " +policyConfig.getPolicyConfigStatus());
- assertNotNull(policyConfig);
- assertEquals(PolicyConfigStatus.CONFIG_NOT_FOUND,policyConfig.getPolicyConfigStatus());
- assertNotNull(policyConfig.getPolicyConfigMessage());
- assertNull(policyConfig.getType());
- assertNull(policyConfig.toJSON());
- assertNull(policyConfig.toProperties());
- assertNull(policyConfig.toXML());
- assertNull(policyConfig.toOther());
- }
- }
-
- //@Test
- @SuppressWarnings("deprecation")
- public void testGetConfigStringStringMapValidJSON() {
- eCOMPComponentName = "JSON";
- configName = "JSONconfig";
- configAttributes.put("Resource.com:test:resource:json", "Test");
- configAttributes.put("Action.com:test:action:json", "TestJSON");
- configAttributes.put("Subject.com:test:subject:json", "TestSubject");
- try {
- policyConfig = policyEngine.getConfig(eCOMPComponentName, configName, configAttributes);
- } catch (PolicyConfigException e) {
- logger.warn(e.getMessage());
- }
- for(PolicyConfig policyConfig : this.policyConfig){
- logger.info(policyConfig.getPolicyConfigMessage() + " , " +policyConfig.getPolicyConfigStatus());
- assertNotNull(policyConfig);
- assertEquals(PolicyConfigStatus.CONFIG_RETRIEVED,policyConfig.getPolicyConfigStatus());
- assertNotNull(policyConfig.getPolicyConfigMessage());
- assertEquals(PolicyType.JSON,policyConfig.getType());
- assertNotNull(policyConfig.toJSON());
- assertNull(policyConfig.toProperties());
- assertNull(policyConfig.toXML());
- assertNull(policyConfig.toOther());
- }
- }
-
- //@Test
- @SuppressWarnings("deprecation")
- public void testGetConfigStringStringMapValidXML() {
- eCOMPComponentName = "XML";
- configName = "XMLconfig";
- configAttributes.put("Resource.com:test:resource:json", "Test");
- configAttributes.put("Action.com:test:action:json", "TestJSON");
- configAttributes.put("Subject.com:test:subject:json", "TestSubject");
- try {
- policyConfig = policyEngine.getConfig(eCOMPComponentName, configName, configAttributes);
- } catch (PolicyConfigException e) {
- logger.warn(e.getMessage());
- }
- for(PolicyConfig policyConfig : this.policyConfig){
- logger.info(policyConfig.getPolicyConfigMessage() + " , " +policyConfig.getPolicyConfigStatus());
- assertNotNull(policyConfig);
- assertEquals(PolicyConfigStatus.CONFIG_RETRIEVED,policyConfig.getPolicyConfigStatus());
- assertNotNull(policyConfig.getPolicyConfigMessage());
- assertEquals(PolicyType.XML,policyConfig.getType());
- assertNull(policyConfig.toJSON());
- assertNull(policyConfig.toProperties());
- assertNotNull(policyConfig.toXML());
- assertNull(policyConfig.toOther());
- }
- }
-
- //@Test
- @SuppressWarnings("deprecation")
- public void testGetConfigStringStringMapValidProperties() {
- eCOMPComponentName = "Properties";
- configName = "PropConfig" ;
- configAttributes.put("Resource.com:test:resource:json", "Test");
- configAttributes.put("Action.com:test:action:json", "TestJSON");
- configAttributes.put("Subject.com:test:subject:json", "TestSubject");
- try {
- policyConfig = policyEngine.getConfig(eCOMPComponentName, configName, configAttributes);
- } catch (PolicyConfigException e) {
- logger.warn(e.getMessage());
- }
- for(PolicyConfig policyConfig : this.policyConfig){
- logger.info(policyConfig.getPolicyConfigMessage() + " , " +policyConfig.getPolicyConfigStatus());
- assertNotNull(policyConfig);
- assertEquals(PolicyConfigStatus.CONFIG_RETRIEVED,policyConfig.getPolicyConfigStatus());
- assertNotNull(policyConfig.getPolicyConfigMessage());
- assertEquals(PolicyType.PROPERTIES,policyConfig.getType());
- assertNull(policyConfig.toJSON());
- assertNotNull(policyConfig.toProperties());
- assertNull(policyConfig.toXML());
- assertNull(policyConfig.toOther());
- }
- }
-
- //@Test
- @SuppressWarnings("deprecation")
- public void testGetConfigStringStringMapValidOther() {
- eCOMPComponentName = "Other";
- configName = "OtherConfig" ;
- configAttributes.put("Resource.com:test:resource:json", "Test");
- configAttributes.put("Action.com:test:action:json", "TestJSON");
- configAttributes.put("Subject.com:test:subject:json", "TestSubject");
- try {
- policyConfig = policyEngine.getConfig(eCOMPComponentName, configName, configAttributes);
- } catch (PolicyConfigException e) {
- logger.warn(e.getMessage());
- }
- for(PolicyConfig policyConfig : this.policyConfig){
- logger.info(policyConfig.getPolicyConfigMessage() + " , " +policyConfig.getPolicyConfigStatus());
- assertNotNull(policyConfig);
- assertEquals(PolicyConfigStatus.CONFIG_RETRIEVED,policyConfig.getPolicyConfigStatus());
- assertNotNull(policyConfig.getPolicyConfigMessage());
- assertEquals(PolicyType.OTHER,policyConfig.getType());
- assertNull(policyConfig.toJSON());
- assertNull(policyConfig.toProperties());
- assertNull(policyConfig.toXML());
- assertNotNull(policyConfig.toOther());
- }
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/GetConfigStringStringTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/GetConfigStringStringTest.java
deleted file mode 100644
index b55abd734..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/GetConfigStringStringTest.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.fail;
-
-import java.util.Collection;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.openecomp.policy.api.PolicyConfig;
-import org.openecomp.policy.api.PolicyConfigException;
-import org.openecomp.policy.api.PolicyConfigStatus;
-import org.openecomp.policy.api.PolicyEngine;
-import org.openecomp.policy.api.PolicyEngineException;
-import org.openecomp.policy.api.PolicyType;
-import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
-import org.openecomp.policy.common.logging.flexlogger.Logger;
-
-public class GetConfigStringStringTest {
-
- private PolicyEngine policyEngine = null;
- private String eCOMPComponentName = null;
- private String configName = null;
- private Collection<PolicyConfig> policyConfig = null;
- private static final Logger logger = FlexLogger.getLogger(GetConfigStringStringTest.class);
- @Before
- public void setUp() {
- try {
- policyEngine = new PolicyEngine("Test/config_pass.properties");
- } catch (PolicyEngineException e) {
- logger.error(e.getMessage());
- fail("PolicyEngine Instantiation Error" + e);
- }
- logger.info("Loaded.. PolicyEngine");
- }
-
- @SuppressWarnings("deprecation")
- @Test
- public void testGetConfigStringStringFail() {
- eCOMPComponentName = null;
- configName = null;
- try {
- policyConfig = policyEngine.getConfig(eCOMPComponentName, configName);
- } catch (PolicyConfigException e) {
- logger.warn(e.getMessage());
- }
- assertNull(policyConfig);
- }
-
- @SuppressWarnings("deprecation")
- @Test
- public void testGetConfigStringStringFail1() {
- eCOMPComponentName = null;
- configName = "";
- try {
- policyConfig = policyEngine.getConfig(eCOMPComponentName, configName);
- } catch (PolicyConfigException e) {
- logger.warn(e.getMessage());
- }
- assertNull(policyConfig);
- }
-
- @SuppressWarnings("deprecation")
- @Test
- public void testGetConfigStringStringFail2() {
- eCOMPComponentName = "";
- configName = null;
- try {
- policyConfig = policyEngine.getConfig(eCOMPComponentName, configName);
- } catch (PolicyConfigException e) {
- logger.warn(e.getMessage());
- }
- assertNull(policyConfig);
- }
-
- //@Test
- @SuppressWarnings("deprecation")
- public void testGetConfigStringStringNotvalid() {
- eCOMPComponentName = "fail";
- configName = "fail";
- try {
- policyConfig = policyEngine.getConfig(eCOMPComponentName, configName);
- } catch (PolicyConfigException e) {
- logger.warn(e.getMessage());
- }
- for(PolicyConfig policyConfig : this.policyConfig){
- logger.info(policyConfig.getPolicyConfigMessage() + " , " +policyConfig.getPolicyConfigStatus());
- assertNotNull(policyConfig);
- assertEquals(PolicyConfigStatus.CONFIG_NOT_FOUND,policyConfig.getPolicyConfigStatus());
- assertNotNull(policyConfig.getPolicyConfigMessage());
- assertNull(policyConfig.getType());
- assertNull(policyConfig.toJSON());
- assertNull(policyConfig.toProperties());
- assertNull(policyConfig.toXML());
- assertNull(policyConfig.toOther());
- }
- }
-
- //@Test
- @SuppressWarnings("deprecation")
- public void testGetConfigStringStringValidJSON() {
- eCOMPComponentName = "JSON";
- configName = "JSONconfig";
- try {
- policyConfig = policyEngine.getConfig(eCOMPComponentName, configName);
- } catch (PolicyConfigException e) {
- logger.warn(e.getMessage());
- }
- for(PolicyConfig policyConfig : this.policyConfig){
- logger.info(policyConfig.getPolicyConfigMessage() + " , " +policyConfig.getPolicyConfigStatus());
- assertNotNull(policyConfig);
- assertEquals(PolicyConfigStatus.CONFIG_RETRIEVED,policyConfig.getPolicyConfigStatus());
- assertNotNull(policyConfig.getPolicyConfigMessage());
- assertEquals(PolicyType.JSON,policyConfig.getType());
- assertNotNull(policyConfig.toJSON());
- assertNull(policyConfig.toProperties());
- assertNull(policyConfig.toXML());
- assertNull(policyConfig.toOther());
- }
- }
-
- //@Test
- @SuppressWarnings("deprecation")
- public void testGetConfigStringStringValidXML() {
- eCOMPComponentName = "XML";
- configName = "XMLconfig";
- try {
- policyConfig = policyEngine.getConfig(eCOMPComponentName, configName);
- } catch (PolicyConfigException e) {
- logger.warn(e.getMessage());
- }
- for(PolicyConfig policyConfig : this.policyConfig){
- logger.info(policyConfig.getPolicyConfigMessage() + " , " +policyConfig.getPolicyConfigStatus());
- assertNotNull(policyConfig);
- assertEquals(PolicyConfigStatus.CONFIG_RETRIEVED,policyConfig.getPolicyConfigStatus());
- assertNotNull(policyConfig.getPolicyConfigMessage());
- assertEquals(PolicyType.XML,policyConfig.getType());
- assertNull(policyConfig.toJSON());
- assertNull(policyConfig.toProperties());
- assertNotNull(policyConfig.toXML());
- assertNull(policyConfig.toOther());
- }
- }
-
- //@Test
- @SuppressWarnings("deprecation")
- public void testGetConfigStringStringValidProperties() {
- eCOMPComponentName = "Properties";
- configName = "PropConfig" ;
- try {
- policyConfig = policyEngine.getConfig(eCOMPComponentName, configName);
- } catch (PolicyConfigException e) {
- logger.warn(e.getMessage());
- }
- for(PolicyConfig policyConfig : this.policyConfig){
- logger.info(policyConfig.getPolicyConfigMessage() + " , " +policyConfig.getPolicyConfigStatus());
- assertNotNull(policyConfig);
- assertEquals(PolicyConfigStatus.CONFIG_RETRIEVED,policyConfig.getPolicyConfigStatus());
- assertNotNull(policyConfig.getPolicyConfigMessage());
- assertEquals(PolicyType.PROPERTIES,policyConfig.getType());
- assertNull(policyConfig.toJSON());
- assertNotNull(policyConfig.toProperties());
- assertNull(policyConfig.toXML());
- assertNull(policyConfig.toOther());
- }
- }
-
- //@Test
- @SuppressWarnings("deprecation")
- public void testGetConfigStringStringValidOther() {
- eCOMPComponentName = "Other";
- configName = "OtherConfig" ;
- try {
- policyConfig = policyEngine.getConfig(eCOMPComponentName, configName);
- } catch (PolicyConfigException e) {
- logger.warn(e.getMessage());
- }
- for(PolicyConfig policyConfig : this.policyConfig){
- logger.info(policyConfig.getPolicyConfigMessage() + " , " +policyConfig.getPolicyConfigStatus());
- assertNotNull(policyConfig);
- assertEquals(PolicyConfigStatus.CONFIG_RETRIEVED,policyConfig.getPolicyConfigStatus());
- assertNotNull(policyConfig.getPolicyConfigMessage());
- assertEquals(PolicyType.OTHER,policyConfig.getType());
- assertNull(policyConfig.toJSON());
- assertNull(policyConfig.toProperties());
- assertNull(policyConfig.toXML());
- assertNotNull(policyConfig.toOther());
- }
- }
-
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/GetConfigStringTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/GetConfigStringTest.java
deleted file mode 100644
index ffa1913aa..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/GetConfigStringTest.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import java.util.Collection;
-
-import org.junit.Before;
-import org.openecomp.policy.api.PolicyConfig;
-import org.openecomp.policy.api.PolicyConfigException;
-import org.openecomp.policy.api.PolicyEngine;
-import org.openecomp.policy.api.PolicyEngineException;
-import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
-import org.openecomp.policy.common.logging.flexlogger.Logger;
-
-import junit.framework.TestCase;
-
-public class GetConfigStringTest extends TestCase{
-
- private PolicyEngine policyEngine = null;
- private String eCOMPComponentName = null;
- private Collection<PolicyConfig> policyConfig = null;
- private static final Logger logger = FlexLogger.getLogger(GetConfigStringTest.class);
- @Before
- public void setUp() {
- try {
- policyEngine = new PolicyEngine("Test/config_pass.properties");
- } catch (PolicyEngineException e) {
- logger.error(e.getMessage());
- fail("PolicyEngine Instantiation Error" + e);
- }
- logger.info("Loaded.. PolicyEngine");
- }
-
- //@Test
- @SuppressWarnings("deprecation")
- public void testGetConfigStringFail() {
- eCOMPComponentName = null;
- try {
- policyConfig = policyEngine.getConfig(eCOMPComponentName);
- } catch (PolicyConfigException e) {
- logger.warn(e.getMessage());
- }
- assertNull(policyConfig);
- }
-
- /*@Test
- public void testGetConfigStringNotvalid() {
- eCOMPComponentName = "fail";
- try {
- policyConfig = policyEngine.getConfig(eCOMPComponentName);
- } catch (PolicyConfigException e) {
- logger.warn(e.getMessage());
- }
- for(PolicyConfig policyConfig : this.policyConfig){
- logger.info(policyConfig.getPolicyConfigMessage() + " , " +policyConfig.getPolicyConfigStatus());
- assertNotNull(policyConfig);
- assertEquals(PolicyConfigStatus.CONFIG_NOT_FOUND,policyConfig.getPolicyConfigStatus());
- assertNotNull(policyConfig.getPolicyConfigMessage());
- assertNull(policyConfig.getType());
- assertNull(policyConfig.toJSON());
- assertNull(policyConfig.toProperties());
- assertNull(policyConfig.toXML());
- assertNull(policyConfig.toOther());
- }
- }
- */
-
- /*@Test
- public void testGetConfigStringValidJSON() {
- eCOMPComponentName = "JSON";
- try {
- policyConfig = policyEngine.getConfig(eCOMPComponentName);
- } catch (PolicyConfigException e) {
- logger.warn(e.getMessage());
- }
- for(PolicyConfig policyConfig : this.policyConfig){
- logger.info(policyConfig.getPolicyConfigMessage() + " , " +policyConfig.getPolicyConfigStatus());
- assertNotNull(policyConfig);
- assertEquals(PolicyConfigStatus.CONFIG_RETRIEVED,policyConfig.getPolicyConfigStatus());
- assertNotNull(policyConfig.getPolicyConfigMessage());
- assertEquals(PolicyType.JSON,policyConfig.getType());
- assertNotNull(policyConfig.toJSON());
- assertNull(policyConfig.toProperties());
- assertNull(policyConfig.toXML());
- assertNull(policyConfig.toOther());
- }
- }
- */
- /*@Test
- public void testGetConfigStringValidXML() {
- eCOMPComponentName = "XML";
- try {
- policyConfig = policyEngine.getConfig(eCOMPComponentName);
- } catch (PolicyConfigException e) {
- logger.warn(e.getMessage());
- }
- for(PolicyConfig policyConfig : this.policyConfig){
- logger.info(policyConfig.getPolicyConfigMessage() + " , " +policyConfig.getPolicyConfigStatus());
- assertNotNull(policyConfig);
- assertEquals(PolicyConfigStatus.CONFIG_RETRIEVED,policyConfig.getPolicyConfigStatus());
- assertNotNull(policyConfig.getPolicyConfigMessage());
- assertEquals(PolicyType.XML,policyConfig.getType());
- assertNull(policyConfig.toJSON());
- assertNull(policyConfig.toProperties());
- assertNotNull(policyConfig.toXML());
- assertNull(policyConfig.toOther());
- }
- }
- */
- /*@Test
- public void testGetConfigStringValidProperties() {
- eCOMPComponentName = "Properties";
- try {
- policyConfig = policyEngine.getConfig(eCOMPComponentName);
- } catch (PolicyConfigException e) {
- logger.warn(e.getMessage());
- }
- for(PolicyConfig policyConfig : this.policyConfig){
- logger.info(policyConfig.getPolicyConfigMessage() + " , " +policyConfig.getPolicyConfigStatus());
- assertNotNull(policyConfig);
- assertEquals(PolicyConfigStatus.CONFIG_RETRIEVED,policyConfig.getPolicyConfigStatus());
- assertNotNull(policyConfig.getPolicyConfigMessage());
- assertEquals(PolicyType.PROPERTIES,policyConfig.getType());
- assertNull(policyConfig.toJSON());
- assertNotNull(policyConfig.toProperties());
- assertNull(policyConfig.toXML());
- assertNull(policyConfig.toOther());
- }
- }
- */
- /*@Test
- public void testGetConfigStringValidOther() {
- eCOMPComponentName = "Other";
- try {
- policyConfig = policyEngine.getConfig(eCOMPComponentName);
- } catch (PolicyConfigException e) {
- logger.warn(e.getMessage());
- }
- for(PolicyConfig policyConfig : this.policyConfig){
- logger.info(policyConfig.getPolicyConfigMessage() + " , " +policyConfig.getPolicyConfigStatus());
- assertNotNull(policyConfig);
- assertEquals(PolicyConfigStatus.CONFIG_RETRIEVED,policyConfig.getPolicyConfigStatus());
- assertNotNull(policyConfig.getPolicyConfigMessage());
- assertEquals(PolicyType.OTHER,policyConfig.getType());
- assertNull(policyConfig.toJSON());
- assertNull(policyConfig.toProperties());
- assertNull(policyConfig.toXML());
- assertNotNull(policyConfig.toOther());
- }
- }
- */
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/ImportParametersTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/ImportParametersTest.java
deleted file mode 100644
index 3719b5d2f..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/ImportParametersTest.java
+++ /dev/null
@@ -1,403 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import java.util.UUID;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.openecomp.policy.api.ImportParameters;
-
-/**
- * The class <code>ImportParametersTest</code> contains tests for the class <code>{@link ImportParameters}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- * @version $Revision: 1.0 $
- */
-public class ImportParametersTest {
- /**
- * Run the String getDescription() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetDescription_1()
- throws Exception {
- ImportParameters fixture = new ImportParameters();
- fixture.setFilePath("");
- fixture.setVersion("");
- fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
- fixture.setRequestID(UUID.randomUUID());
- fixture.setDescription("");
- fixture.setServiceName("");
-
- String result = fixture.getDescription();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the String getFilePath() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetFilePath_1()
- throws Exception {
- ImportParameters fixture = new ImportParameters();
- fixture.setFilePath("");
- fixture.setVersion("");
- fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
- fixture.setRequestID(UUID.randomUUID());
- fixture.setDescription("");
- fixture.setServiceName("");
-
- String result = fixture.getFilePath();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the UUID getRequestID() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetRequestID_1()
- throws Exception {
- ImportParameters fixture = new ImportParameters();
- fixture.setFilePath("");
- fixture.setVersion("");
- fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
- fixture.setRequestID(UUID.fromString("731dca0a-fe99-456c-8ad2-87cff8437b2f"));
- fixture.setDescription("");
- fixture.setServiceName("");
-
- UUID result = fixture.getRequestID();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("731dca0a-fe99-456c-8ad2-87cff8437b2f", result.toString());
- assertEquals(4, result.version());
- assertEquals(2, result.variant());
- assertEquals(-8443537024073106641L, result.getLeastSignificantBits());
- assertEquals(8295008237256263020L, result.getMostSignificantBits());
- }
-
- /**
- * Run the String getServiceName() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetServiceName_1()
- throws Exception {
- ImportParameters fixture = new ImportParameters();
- fixture.setFilePath("");
- fixture.setVersion("");
- fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
- fixture.setRequestID(UUID.randomUUID());
- fixture.setDescription("");
- fixture.setServiceName("");
-
- String result = fixture.getServiceName();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the ImportParameters.IMPORT_TYPE getServiceType() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetServiceType_1()
- throws Exception {
- ImportParameters fixture = new ImportParameters();
- fixture.setFilePath("");
- fixture.setVersion("");
- fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
- fixture.setRequestID(UUID.randomUUID());
- fixture.setDescription("");
- fixture.setServiceName("");
-
- ImportParameters.IMPORT_TYPE result = fixture.getServiceType();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("MICROSERVICE", result.name());
- assertEquals("MICROSERVICE", result.toString());
- assertEquals(0, result.ordinal());
- }
-
- /**
- * Run the String getVersion() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetVersion_1()
- throws Exception {
- ImportParameters fixture = new ImportParameters();
- fixture.setFilePath("");
- fixture.setVersion("");
- fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
- fixture.setRequestID(UUID.randomUUID());
- fixture.setDescription("");
- fixture.setServiceName("");
-
- String result = fixture.getVersion();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the void setDescription(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetDescription_1()
- throws Exception {
- ImportParameters fixture = new ImportParameters();
- fixture.setFilePath("");
- fixture.setVersion("");
- fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
- fixture.setRequestID(UUID.randomUUID());
- fixture.setDescription("");
- fixture.setServiceName("");
- String description = "";
-
- fixture.setDescription(description);
-
- // add additional test code here
- }
-
- /**
- * Run the void setFilePath(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetFilePath_1()
- throws Exception {
- ImportParameters fixture = new ImportParameters();
- fixture.setFilePath("");
- fixture.setVersion("");
- fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
- fixture.setRequestID(UUID.randomUUID());
- fixture.setDescription("");
- fixture.setServiceName("");
- String filePath = "";
-
- fixture.setFilePath(filePath);
-
- // add additional test code here
- }
-
- /**
- * Run the void setImportParameters(String,String,UUID,String,IMPORT_TYPE,String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetImportParameters_1()
- throws Exception {
- ImportParameters fixture = new ImportParameters();
- fixture.setFilePath("");
- fixture.setVersion("");
- fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
- fixture.setRequestID(UUID.randomUUID());
- fixture.setDescription("");
- fixture.setServiceName("");
- String serviceName = "";
- String description = "";
- UUID requestID = UUID.randomUUID();
- String filePath = "";
- ImportParameters.IMPORT_TYPE importType = ImportParameters.IMPORT_TYPE.MICROSERVICE;
- String version = "";
-
- fixture.setImportParameters(serviceName, description, requestID, filePath, importType, version);
-
- // add additional test code here
- }
-
- /**
- * Run the void setRequestID(UUID) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetRequestID_1()
- throws Exception {
- ImportParameters fixture = new ImportParameters();
- fixture.setFilePath("");
- fixture.setVersion("");
- fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
- fixture.setRequestID(UUID.randomUUID());
- fixture.setDescription("");
- fixture.setServiceName("");
- UUID requestID = UUID.randomUUID();
-
- fixture.setRequestID(requestID);
-
- // add additional test code here
- }
-
- /**
- * Run the void setServiceName(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetServiceName_1()
- throws Exception {
- ImportParameters fixture = new ImportParameters();
- fixture.setFilePath("");
- fixture.setVersion("");
- fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
- fixture.setRequestID(UUID.randomUUID());
- fixture.setDescription("");
- fixture.setServiceName("");
- String serviceName = "";
-
- fixture.setServiceName(serviceName);
-
- // add additional test code here
- }
-
- /**
- * Run the void setServiceType(IMPORT_TYPE) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetServiceType_1()
- throws Exception {
- ImportParameters fixture = new ImportParameters();
- fixture.setFilePath("");
- fixture.setVersion("");
- fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
- fixture.setRequestID(UUID.randomUUID());
- fixture.setDescription("");
- fixture.setServiceName("");
- ImportParameters.IMPORT_TYPE enumImportType = ImportParameters.IMPORT_TYPE.MICROSERVICE;
-
- fixture.setServiceType(enumImportType);
-
- // add additional test code here
- }
-
- /**
- * Run the void setVersion(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetVersion_1()
- throws Exception {
- ImportParameters fixture = new ImportParameters();
- fixture.setFilePath("");
- fixture.setVersion("");
- fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
- fixture.setRequestID(UUID.randomUUID());
- fixture.setDescription("");
- fixture.setServiceName("");
- String version = "";
-
- fixture.setVersion(version);
-
- // add additional test code here
- }
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(ImportParametersTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/LoadedPolicyTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/LoadedPolicyTest.java
deleted file mode 100644
index 0748d0ad9..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/LoadedPolicyTest.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import org.junit.After;
-import org.junit.Before;
-import org.openecomp.policy.api.LoadedPolicy;
-
-/**
- * The class <code>LoadedPolicyTest</code> contains tests for the class <code>{@link LoadedPolicy}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- * @version $Revision: 1.0 $
- */
-public class LoadedPolicyTest {
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(LoadedPolicyTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/NotificationHandlerTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/NotificationHandlerTest.java
deleted file mode 100644
index 68ba3a773..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/NotificationHandlerTest.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import org.junit.After;
-import org.junit.Before;
-import org.openecomp.policy.api.NotificationHandler;
-
-/**
- * The class <code>NotificationHandlerTest</code> contains tests for the class <code>{@link NotificationHandler}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- * @version $Revision: 1.0 $
- */
-public class NotificationHandlerTest {
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(NotificationHandlerTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/NotificationSchemeTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/NotificationSchemeTest.java
deleted file mode 100644
index 1cb105c2f..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/NotificationSchemeTest.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import org.junit.*;
-import org.openecomp.policy.api.NotificationScheme;
-
-import static org.junit.Assert.*;
-
-/**
- * The class <code>NotificationSchemeTest</code> contains tests for the class <code>{@link NotificationScheme}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- * @version $Revision: 1.0 $
- */
-public class NotificationSchemeTest {
- /**
- * Run the String toString() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testToString_1()
- throws Exception {
- NotificationScheme fixture = NotificationScheme.AUTO_ALL_NOTIFICATIONS;
-
- String result = fixture.toString();
-
- // add additional test code here
- assertEquals("auto_all_notifications", result);
- }
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(NotificationSchemeTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/NotificationTypeTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/NotificationTypeTest.java
deleted file mode 100644
index 95dce6a60..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/NotificationTypeTest.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import org.junit.*;
-import org.openecomp.policy.api.NotificationType;
-
-import static org.junit.Assert.*;
-
-/**
- * The class <code>NotificationTypeTest</code> contains tests for the class <code>{@link NotificationType}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- * @version $Revision: 1.0 $
- */
-public class NotificationTypeTest {
- /**
- * Run the String toString() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testToString_1()
- throws Exception {
- NotificationType fixture = NotificationType.BOTH;
-
- String result = fixture.toString();
-
- // add additional test code here
- assertEquals("both", result);
- }
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(NotificationTypeTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PDPNotificationTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PDPNotificationTest.java
deleted file mode 100644
index 43754f8df..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PDPNotificationTest.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import org.junit.After;
-import org.junit.Before;
-import org.openecomp.policy.api.PDPNotification;
-
-/**
- * The class <code>PDPNotificationTest</code> contains tests for the class <code>{@link PDPNotification}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- * @version $Revision: 1.0 $
- */
-public class PDPNotificationTest {
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(PDPNotificationTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyChangeResponseTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyChangeResponseTest.java
deleted file mode 100644
index d36ae44c2..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyChangeResponseTest.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import org.junit.After;
-import org.junit.Before;
-import org.openecomp.policy.api.PolicyChangeResponse;
-
-/**
- * The class <code>PolicyChangeResponseTest</code> contains tests for the class <code>{@link PolicyChangeResponse}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- * @version $Revision: 1.0 $
- */
-public class PolicyChangeResponseTest {
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(PolicyChangeResponseTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyClassTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyClassTest.java
deleted file mode 100644
index 28e5beefd..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyClassTest.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import org.junit.*;
-import org.openecomp.policy.api.PolicyClass;
-
-import static org.junit.Assert.*;
-
-/**
- * The class <code>PolicyClassTest</code> contains tests for the class <code>{@link PolicyClass}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- * @version $Revision: 1.0 $
- */
-public class PolicyClassTest {
- /**
- * Run the String toString() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testToString_1()
- throws Exception {
- PolicyClass fixture = PolicyClass.Action;
-
- String result = fixture.toString();
-
- // add additional test code here
- assertEquals("Action", result);
- }
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(PolicyClassTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyConfigExceptionTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyConfigExceptionTest.java
deleted file mode 100644
index 4134eacc2..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyConfigExceptionTest.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import org.junit.*;
-import org.openecomp.policy.api.PolicyConfigException;
-
-import static org.junit.Assert.*;
-
-/**
- * The class <code>PolicyConfigExceptionTest</code> contains tests for the class <code>{@link PolicyConfigException}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- * @version $Revision: 1.0 $
- */
-public class PolicyConfigExceptionTest {
- /**
- * Run the PolicyConfigException() constructor test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testPolicyConfigException_1()
- throws Exception {
-
- PolicyConfigException result = new PolicyConfigException();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(null, result.getCause());
- assertEquals("org.openecomp.policy.api.PolicyConfigException", result.toString());
- assertEquals(null, result.getLocalizedMessage());
- assertEquals(null, result.getMessage());
- }
-
- /**
- * Run the PolicyConfigException(String) constructor test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testPolicyConfigException_2()
- throws Exception {
- String message = "";
-
- PolicyConfigException result = new PolicyConfigException(message);
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(null, result.getCause());
- assertEquals("org.openecomp.policy.api.PolicyConfigException: ", result.toString());
- assertEquals("", result.getLocalizedMessage());
- assertEquals("", result.getMessage());
- }
-
- /**
- * Run the PolicyConfigException(Throwable) constructor test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testPolicyConfigException_3()
- throws Exception {
- Throwable cause = new Throwable();
-
- PolicyConfigException result = new PolicyConfigException(cause);
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("org.openecomp.policy.api.PolicyConfigException: java.lang.Throwable", result.toString());
- assertEquals("java.lang.Throwable", result.getLocalizedMessage());
- assertEquals("java.lang.Throwable", result.getMessage());
- }
-
- /**
- * Run the PolicyConfigException(String,Throwable) constructor test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testPolicyConfigException_4()
- throws Exception {
- String message = "";
- Throwable cause = new Throwable();
-
- PolicyConfigException result = new PolicyConfigException(message, cause);
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("org.openecomp.policy.api.PolicyConfigException: ", result.toString());
- assertEquals("", result.getLocalizedMessage());
- assertEquals("", result.getMessage());
- }
-
- /**
- * Run the PolicyConfigException(String,Throwable,boolean,boolean) constructor test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testPolicyConfigException_5()
- throws Exception {
- String message = "";
- Throwable cause = new Throwable();
- boolean enableSuppression = true;
- boolean writableStackTrace = true;
-
- PolicyConfigException result = new PolicyConfigException(message, cause, enableSuppression, writableStackTrace);
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("org.openecomp.policy.api.PolicyConfigException: ", result.toString());
- assertEquals("", result.getLocalizedMessage());
- assertEquals("", result.getMessage());
- }
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(PolicyConfigExceptionTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyConfigStatusTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyConfigStatusTest.java
deleted file mode 100644
index c40253890..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyConfigStatusTest.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import org.junit.*;
-import org.openecomp.policy.api.PolicyConfigStatus;
-
-import static org.junit.Assert.*;
-
-/**
- * The class <code>PolicyConfigStatusTest</code> contains tests for the class <code>{@link PolicyConfigStatus}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- * @version $Revision: 1.0 $
- */
-public class PolicyConfigStatusTest {
- /**
- * Run the PolicyConfigStatus getStatus(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetStatus_1()
- throws Exception {
- String configStatus = "";
-
- PolicyConfigStatus result = PolicyConfigStatus.getStatus(configStatus);
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("not_found", result.toString());
- assertEquals("CONFIG_NOT_FOUND", result.name());
- assertEquals(1, result.ordinal());
- }
-
- /**
- * Run the PolicyConfigStatus getStatus(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetStatus_2()
- throws Exception {
- String configStatus = "";
-
- PolicyConfigStatus result = PolicyConfigStatus.getStatus(configStatus);
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("not_found", result.toString());
- assertEquals("CONFIG_NOT_FOUND", result.name());
- assertEquals(1, result.ordinal());
- }
-
- /**
- * Run the String toString() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testToString_1()
- throws Exception {
- PolicyConfigStatus fixture = PolicyConfigStatus.CONFIG_NOT_FOUND;
-
- String result = fixture.toString();
-
- // add additional test code here
- assertEquals("not_found", result);
- }
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(PolicyConfigStatusTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyConfigTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyConfigTest.java
deleted file mode 100644
index c6247fcdf..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyConfigTest.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import org.junit.After;
-import org.junit.Before;
-import org.openecomp.policy.api.PolicyConfig;
-
-/**
- * The class <code>PolicyConfigTest</code> contains tests for the class <code>{@link PolicyConfig}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- * @version $Revision: 1.0 $
- */
-public class PolicyConfigTest {
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(PolicyConfigTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyConfigTypeTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyConfigTypeTest.java
deleted file mode 100644
index cd6c6a977..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyConfigTypeTest.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import org.junit.*;
-import org.openecomp.policy.api.PolicyConfigType;
-
-import static org.junit.Assert.*;
-
-/**
- * The class <code>PolicyConfigTypeTest</code> contains tests for the class <code>{@link PolicyConfigType}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- * @version $Revision: 1.0 $
- */
-public class PolicyConfigTypeTest {
- /**
- * Run the String toString() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testToString_1()
- throws Exception {
- PolicyConfigType fixture = PolicyConfigType.BRMS_PARAM;
-
- String result = fixture.toString();
-
- // add additional test code here
- assertEquals("BRMS_Param", result);
- }
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(PolicyConfigTypeTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyDecisionExceptionTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyDecisionExceptionTest.java
deleted file mode 100644
index 95dfd7acd..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyDecisionExceptionTest.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import org.junit.*;
-import org.openecomp.policy.api.PolicyDecisionException;
-
-import static org.junit.Assert.*;
-
-/**
- * The class <code>PolicyDecisionExceptionTest</code> contains tests for the class <code>{@link PolicyDecisionException}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- * @version $Revision: 1.0 $
- */
-public class PolicyDecisionExceptionTest {
- /**
- * Run the PolicyDecisionException() constructor test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testPolicyDecisionException_1()
- throws Exception {
-
- PolicyDecisionException result = new PolicyDecisionException();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(null, result.getCause());
- assertEquals("org.openecomp.policy.api.PolicyDecisionException", result.toString());
- assertEquals(null, result.getLocalizedMessage());
- assertEquals(null, result.getMessage());
- }
-
- /**
- * Run the PolicyDecisionException(String) constructor test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testPolicyDecisionException_2()
- throws Exception {
- String message = "";
-
- PolicyDecisionException result = new PolicyDecisionException(message);
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(null, result.getCause());
- assertEquals("org.openecomp.policy.api.PolicyDecisionException: ", result.toString());
- assertEquals("", result.getLocalizedMessage());
- assertEquals("", result.getMessage());
- }
-
- /**
- * Run the PolicyDecisionException(Throwable) constructor test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testPolicyDecisionException_3()
- throws Exception {
- Throwable cause = new Throwable();
-
- PolicyDecisionException result = new PolicyDecisionException(cause);
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("org.openecomp.policy.api.PolicyDecisionException: java.lang.Throwable", result.toString());
- assertEquals("java.lang.Throwable", result.getLocalizedMessage());
- assertEquals("java.lang.Throwable", result.getMessage());
- }
-
- /**
- * Run the PolicyDecisionException(String,Throwable) constructor test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testPolicyDecisionException_4()
- throws Exception {
- String message = "";
- Throwable cause = new Throwable();
-
- PolicyDecisionException result = new PolicyDecisionException(message, cause);
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("org.openecomp.policy.api.PolicyDecisionException: ", result.toString());
- assertEquals("", result.getLocalizedMessage());
- assertEquals("", result.getMessage());
- }
-
- /**
- * Run the PolicyDecisionException(String,Throwable,boolean,boolean) constructor test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testPolicyDecisionException_5()
- throws Exception {
- String message = "";
- Throwable cause = new Throwable();
- boolean enableSuppression = true;
- boolean writableStackTrace = true;
-
- PolicyDecisionException result = new PolicyDecisionException(message, cause, enableSuppression, writableStackTrace);
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("org.openecomp.policy.api.PolicyDecisionException: ", result.toString());
- assertEquals("", result.getLocalizedMessage());
- assertEquals("", result.getMessage());
- }
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(PolicyDecisionExceptionTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyDecisionTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyDecisionTest.java
deleted file mode 100644
index 12069abeb..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyDecisionTest.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import org.junit.*;
-import org.openecomp.policy.api.PolicyDecision;
-
-import static org.junit.Assert.*;
-
-/**
- * The class <code>PolicyDecisionTest</code> contains tests for the class <code>{@link PolicyDecision}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- * @version $Revision: 1.0 $
- */
-public class PolicyDecisionTest {
- /**
- * Run the String toString() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testToString_1()
- throws Exception {
- PolicyDecision fixture = PolicyDecision.DENY;
-
- String result = fixture.toString();
-
- // add additional test code here
- assertEquals("deny", result);
- }
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(PolicyDecisionTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyEngineExceptionTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyEngineExceptionTest.java
deleted file mode 100644
index d21fb12e2..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyEngineExceptionTest.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import org.junit.*;
-import org.openecomp.policy.api.PolicyEngineException;
-
-import static org.junit.Assert.*;
-
-/**
- * The class <code>PolicyEngineExceptionTest</code> contains tests for the class <code>{@link PolicyEngineException}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- * @version $Revision: 1.0 $
- */
-public class PolicyEngineExceptionTest {
- /**
- * Run the PolicyEngineException() constructor test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testPolicyEngineException_1()
- throws Exception {
-
- PolicyEngineException result = new PolicyEngineException();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(null, result.getCause());
- assertEquals("org.openecomp.policy.api.PolicyEngineException", result.toString());
- assertEquals(null, result.getLocalizedMessage());
- assertEquals(null, result.getMessage());
- }
-
- /**
- * Run the PolicyEngineException(String) constructor test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testPolicyEngineException_2()
- throws Exception {
- String message = "";
-
- PolicyEngineException result = new PolicyEngineException(message);
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(null, result.getCause());
- assertEquals("org.openecomp.policy.api.PolicyEngineException: ", result.toString());
- assertEquals("", result.getLocalizedMessage());
- assertEquals("", result.getMessage());
- }
-
- /**
- * Run the PolicyEngineException(Throwable) constructor test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testPolicyEngineException_3()
- throws Exception {
- Throwable cause = new Throwable();
-
- PolicyEngineException result = new PolicyEngineException(cause);
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("org.openecomp.policy.api.PolicyEngineException: java.lang.Throwable", result.toString());
- assertEquals("java.lang.Throwable", result.getLocalizedMessage());
- assertEquals("java.lang.Throwable", result.getMessage());
- }
-
- /**
- * Run the PolicyEngineException(String,Throwable) constructor test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testPolicyEngineException_4()
- throws Exception {
- String message = "";
- Throwable cause = new Throwable();
-
- PolicyEngineException result = new PolicyEngineException(message, cause);
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("org.openecomp.policy.api.PolicyEngineException: ", result.toString());
- assertEquals("", result.getLocalizedMessage());
- assertEquals("", result.getMessage());
- }
-
- /**
- * Run the PolicyEngineException(String,Throwable,boolean,boolean) constructor test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testPolicyEngineException_5()
- throws Exception {
- String message = "";
- Throwable cause = new Throwable();
- boolean enableSuppression = true;
- boolean writableStackTrace = true;
-
- PolicyEngineException result = new PolicyEngineException(message, cause, enableSuppression, writableStackTrace);
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("org.openecomp.policy.api.PolicyEngineException: ", result.toString());
- assertEquals("", result.getLocalizedMessage());
- assertEquals("", result.getMessage());
- }
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(PolicyEngineExceptionTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyEngineInterfaceTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyEngineInterfaceTest.java
deleted file mode 100644
index fd5f65fa3..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyEngineInterfaceTest.java
+++ /dev/null
@@ -1,670 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import java.io.StringReader;
-import java.net.HttpURLConnection;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-
-import javax.json.Json;
-import javax.json.JsonObject;
-import javax.json.JsonReader;
-
-import org.mockito.Mockito;
-import org.openecomp.policy.api.AttributeType;
-import org.openecomp.policy.api.ConfigRequestParameters;
-import org.openecomp.policy.api.DecisionRequestParameters;
-import org.openecomp.policy.api.DecisionResponse;
-import org.openecomp.policy.api.DeletePolicyCondition;
-import org.openecomp.policy.api.DeletePolicyParameters;
-import org.openecomp.policy.api.EventRequestParameters;
-import org.openecomp.policy.api.ImportParameters;
-import org.openecomp.policy.api.ImportParameters.IMPORT_TYPE;
-import org.openecomp.policy.api.NotificationHandler;
-import org.openecomp.policy.api.NotificationScheme;
-import org.openecomp.policy.api.PDPNotification;
-import org.openecomp.policy.api.PolicyChangeResponse;
-import org.openecomp.policy.api.PolicyClass;
-import org.openecomp.policy.api.PolicyConfig;
-import org.openecomp.policy.api.PolicyConfigException;
-import org.openecomp.policy.api.PolicyDecisionException;
-import org.openecomp.policy.api.PolicyEngine;
-import org.openecomp.policy.api.PolicyEngineException;
-import org.openecomp.policy.api.PolicyEventException;
-import org.openecomp.policy.api.PolicyParameters;
-import org.openecomp.policy.api.PolicyResponse;
-import org.openecomp.policy.api.PushPolicyParameters;
-import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
-import org.openecomp.policy.common.logging.flexlogger.Logger;
-import org.openecomp.policy.std.StdPDPNotification;
-import org.openecomp.policy.std.StdPolicyChangeResponse;
-import org.openecomp.policy.std.StdPolicyResponse;
-
-import junit.framework.TestCase;
-
-/**
- * The class <code>PolicyEngineInterfaceTest</code> contains tests for the
- * class {@link <code>PolicyEngine</code>}
- *
- * @pattern JUnit Test Case
- *
- * @generatedBy CodePro at 5/27/16 10:33 AM
- *
- *
- * @version $Revision$
- */
-public class PolicyEngineInterfaceTest extends TestCase {
-
- private static final Logger logger = FlexLogger.getLogger(PolicyEngineInterfaceTest.class);
-
- private PolicyEngine policyEngine = null;
- private PolicyEngine mockPolicyEngine = null;
- private Collection<PolicyConfig> policyConfig = null;
- private UUID requestID = UUID.randomUUID();
-
-
- PolicyChangeResponse result = null;
- StdPolicyChangeResponse response = new StdPolicyChangeResponse();
-
-
- /**
- * Construct new test instance
- *
- * @param name the test name
- */
- public PolicyEngineInterfaceTest(String name) {
- super(name);
- }
-
- /**
- * Perform pre-test initialization
- *
- * @throws Exception
- *
- * @see TestCase#setUp()
- */
- protected void setUp() throws Exception {
- try {
- policyEngine = new PolicyEngine("Test/config_pass.properties");
- } catch (PolicyEngineException e) {
- logger.error(e.getMessage());
- fail("PolicyEngine Instantiation Error" + e);
- }
- logger.info("Loaded.. PolicyEngine");
-
- mockPolicyEngine = Mockito.mock(PolicyEngine.class);
- HttpURLConnection conn = Mockito.mock(HttpURLConnection.class);
- Mockito.when(conn.getResponseCode()).thenReturn(HttpURLConnection.HTTP_OK);
-
- }
-
- /**
- * Perform post-test clean up
- *
- * @throws Exception
- *
- * @see TestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- super.tearDown();
- // Add additional tear down code here
- }
-
- /**
- * Run the Collection<PolicyConfig> getConfigByPolicyName(String) method
- * test
- */
- @SuppressWarnings("deprecation")
- public void testGetConfigByPolicyName() {
- String policyName = null;
- try{
- policyConfig = policyEngine.getConfigByPolicyName(policyName);
- } catch (PolicyConfigException e){
- logger.warn(e.getMessage());
- }
- assertNull(policyConfig);
- }
-
- @SuppressWarnings("deprecation")
- public void testGetConfigByPolicyName2() {
- String policyName = null;
-
- try{
- policyConfig = policyEngine.getConfigByPolicyName(policyName, requestID);
- } catch (PolicyConfigException e){
- logger.warn(e.getMessage());
- }
- assertNull(policyConfig);
- }
-
- /**
- * Run the Collection<PolicyConfig> getConfig(String) method test
- */
- @SuppressWarnings("deprecation")
- public void testGetConfig() {
- String ecompName = null;
-
- try{
- policyConfig = policyEngine.getConfig(ecompName);
- } catch (PolicyConfigException e){
- logger.warn(e.getMessage());
- }
- assertNull(policyConfig);
- }
-
- @SuppressWarnings("deprecation")
- public void testGetConfig2() {
- String ecompName = null;
-
- try{
- policyConfig = policyEngine.getConfig(ecompName,requestID);
- } catch (PolicyConfigException e){
- logger.warn(e.getMessage());
- }
- assertNull(policyConfig);
- }
-
-
- @SuppressWarnings("deprecation")
- public void testGetConfig3() {
- String ecompName = null;
- String configName = null;
-
- try{
- policyConfig = policyEngine.getConfig(ecompName,configName,requestID);
- } catch (PolicyConfigException e){
- logger.warn(e.getMessage());
- }
- assertNull(policyConfig);
- }
-
- @SuppressWarnings("deprecation")
- public void testGetConfig4() {
- String ecompName = null;
- String configName = null;
- Map<String,String> configAttributes = null;
-
- try{
- policyConfig = policyEngine.getConfig(ecompName,configName,configAttributes);
- } catch (PolicyConfigException e){
- logger.warn(e.getMessage());
- }
- assertNull(policyConfig);
- }
-
- @SuppressWarnings("deprecation")
- public void testGetConfig5() {
- String ecompName = null;
- String configName = null;
- Map<String,String> configAttributes = null;
-
- try{
- policyConfig = policyEngine.getConfig(ecompName,configName,configAttributes,requestID);
- } catch (PolicyConfigException e){
- logger.warn(e.getMessage());
- }
- assertNull(policyConfig);
- }
-
- public void testGetConfig6() {
- ConfigRequestParameters parameters = new ConfigRequestParameters();
-
- try{
- policyConfig = policyEngine.getConfig(parameters);
- } catch (PolicyConfigException e){
- logger.warn(e.getMessage());
- }
- assertNull(policyConfig);
- }
-
-
- /**
- * Run the Collection<PolicyResponse> sendEvent(Map<String,String>) method
- * test
- */
- @SuppressWarnings("deprecation")
- public void testSendEvent()
- {
- Collection<PolicyResponse> result = null;
- Collection<StdPolicyResponse> response = null;
- Map<String,String> eventAttributes = null;
-
- try {
- Mockito.when(mockPolicyEngine.sendEvent(eventAttributes)).thenReturn(result);
- result = mockPolicyEngine.sendEvent(eventAttributes);
- } catch (PolicyEventException e) {
- logger.error("Exception Occured"+e);
- }
-
-
- assertEquals(result,response);
-
- }
-
- @SuppressWarnings("deprecation")
- public void testSendEvent2()
- {
- Collection<PolicyResponse> result = null;
- Collection<StdPolicyResponse> response = null;
- Map<String,String> eventAttributes = null;
-
- try {
- Mockito.when(mockPolicyEngine.sendEvent(eventAttributes,requestID)).thenReturn(result);
- result = mockPolicyEngine.sendEvent(eventAttributes,requestID);
- } catch (PolicyEventException e) {
- logger.error("Exception Occured"+e);
- }
-
-
- assertEquals(result,response);
-
- }
-
- public void testSendEvent3()
- {
- Collection<PolicyResponse> result = null;
- Collection<StdPolicyResponse> response = null;
- EventRequestParameters parameters = new EventRequestParameters();
-
- try {
- Mockito.when(mockPolicyEngine.sendEvent(parameters)).thenReturn(result);
- result = mockPolicyEngine.sendEvent(parameters);
- } catch (PolicyEventException e) {
- logger.error("Exception Occured"+e);
- }
-
- assertEquals(result,response);
-
- }
-
-
-
- /**
- * Run the PolicyDecision getDecision(String, Map<String,String>) method
- * test
- */
- @SuppressWarnings("deprecation")
- public void testGetDecision()
- {
- String eCOMPComponentName = null;
- Map<String,String> decisionAttributes = null;
-
- DecisionResponse result = null;
-
- try {
- Mockito.when(mockPolicyEngine.getDecision(eCOMPComponentName,decisionAttributes)).thenReturn(null);
- result = mockPolicyEngine.getDecision(eCOMPComponentName,decisionAttributes);
- } catch (PolicyDecisionException e) {
- logger.error("Exception Occured"+e);
- }
-
- assertEquals(result,null);
- }
-
- @SuppressWarnings("deprecation")
- public void testGetDecision2()
- {
- String eCOMPComponentName = null;
- Map<String,String> decisionAttributes = null;
-
- DecisionResponse result = null;
-
- try {
- Mockito.when(mockPolicyEngine.getDecision(eCOMPComponentName,decisionAttributes,requestID)).thenReturn(null);
- result = mockPolicyEngine.getDecision(eCOMPComponentName,decisionAttributes);
- } catch (PolicyDecisionException e) {
- logger.error("Exception Occured"+e);
- }
-
- assertEquals(result,null);
- }
-
- public void testGetDecision3()
- {
- DecisionRequestParameters parameters = new DecisionRequestParameters();
- DecisionResponse result = null;
-
- try {
- Mockito.when(mockPolicyEngine.getDecision(parameters)).thenReturn(null);
- result = mockPolicyEngine.getDecision(parameters);
- } catch (PolicyDecisionException e) {
- logger.error("Exception Occured"+e);
- }
-
- assertEquals(result,null);
- }
-
- /**
- * Run the void setNotification(NotificationScheme, NotificationHandler)
- * method test
- */
- public void testSetNotification() {
- // add test code here
-
- NotificationScheme scheme = null;
- NotificationHandler handler = null;
-
- Mockito.doNothing().when(mockPolicyEngine).setNotification(scheme, handler);
- mockPolicyEngine.setNotification(scheme, handler);
- //assertTrue(true);
- }
-
- /**
- * Run the void clearNotification() method test
- */
- public void testClearNotification() {
- // add test code here
-
- Mockito.doNothing().when(mockPolicyEngine).clearNotification();
- mockPolicyEngine.clearNotification();
- //assertTrue(true);
- }
-
- /**
- * Run the void setScheme(NotificationScheme) method test
- */
- public void testSetScheme() {
- NotificationScheme scheme = null;
-
- Mockito.doNothing().when(mockPolicyEngine).setScheme(scheme);
- mockPolicyEngine.setScheme(scheme);
- //assertTrue(true);
- }
-
- /**
- * Run the PDPNotification getNotification() method test
- */
- public void testGetNotification() {
- PDPNotification result = null;
- StdPDPNotification response = null;
- Mockito.when(mockPolicyEngine.getNotification()).thenReturn(response);
- result = mockPolicyEngine.getNotification();
-
- assertEquals(result,response);
- }
-
- /**
- * Run the String createConfigPolicy(String, String, String, String,
- * Map<String,String>, String, String, String, UUID) method test
- */
- @SuppressWarnings("deprecation")
- public void testCreateConfigPolicy()
- {
- String response = "success";
- String result = null;
- try {
-
- Mockito.when(mockPolicyEngine.createConfigPolicy("testPolicy","test","test","testConfig",null,"OTHER","test","test",null, null, null, null, null)).thenReturn(response);
- result = mockPolicyEngine.createConfigPolicy("testPolicy","test","test","testConfig",null,"OTHER","test","test",null, null, null, null, null);
-
- } catch (Exception e) {
- logger.warn(e.getMessage());
- }
- assertEquals(result, response);
- }
-
- /**
- * Run the String updateConfigPolicy(String, String, String, String,
- * Map<String,String>, String, String, String, UUID) method test
- */
- @SuppressWarnings("deprecation")
- public void testUpdateConfigPolicy()
- {
- String response = "success";
- String result = null;
- try {
-
- Mockito.when(mockPolicyEngine.updateConfigPolicy("testPolicy","test","test","testConfig",null,"OTHER","test","test",null, null, null, null, null)).thenReturn(response);
- result = mockPolicyEngine.updateConfigPolicy("testPolicy","test","test","testConfig",null,"OTHER","test","test",null, null, null, null, null);
-
- } catch (Exception e) {
- logger.warn(e.getMessage());
- }
- assertEquals(result, response);
- }
-
- /**
- * Run the String createConfigFirewallPolicy(String, JsonObject, String,
- * UUID) method test
- */
- @SuppressWarnings("deprecation")
- public void testCreateConfigFirewallPolicy() {
- String response = "success";
- String result = null;
- String json = "{\"serviceTypeId\":\"/v0/firewall/pan\",\"configName\":\"rule1607\",\"deploymentOption\":{\"deployNow\":false},\"securityZoneId\":\"/v0/firewall/pan\",\"serviceGroups\":[{\"name\":\"1607Group\",\"description\":null,\"members\":[{\"type\":\"REFERENCE\",\"name\":\"SList\"},{\"type\":\"REFERENCE\",\"name\":\"Syslog\"}]},{\"name\":\"Syslog\",\"description\":\"NA\",\"type\":\"SERVICE\",\"transportProtocol\":\"udp\",\"appProtocol\":null,\"ports\":\"514\"},{\"name\":\"SList\",\"description\":\"Service List\",\"type\":\"SERVICE\",\"transportProtocol\":\"tcp\",\"appProtocol\":null,\"ports\":\"8080\"}],\"addressGroups\":[{\"name\":\"1607Group\",\"description\":null,\"members\":[{\"type\":\"SUBNET\",\"value\":\"10.11.12.13/14\"},{\"type\":\"SUBNET\",\"value\":\"10.11.12.13/14\"}]},{\"name\":\"PL_CCE3\",\"description\":\"CCE Routers\",\"members\":[{\"type\":\"SUBNET\",\"value\":\"10.11.12.13/14\"}]}],\"firewallRuleList\":[{\"position\":\"1\",\"ruleName\":\"1607Rule\",\"fromZones\":[\"Trusted\"],\"toZones\":[\"Untrusted\"],\"negateSource\":false,\"negateDestination\":false,\"sourceList\":[{\"type\":\"REFERENCE\",\"value\":\"PL_CCE3\"},{\"type\":\"REFERENCE\",\"value\":\"1607Group\"}],\"destinationList\":[{\"type\":\"REFERENCE\",\"value\":\"1607Group\"}],\"sourceServices\":[],\"destServices\":[{\"type\":\"REFERENCE\",\"name\":\"1607Group\"}],\"action\":\"accept\",\"description\":\"Rule for 1607 templates\",\"enabled\":true,\"log\":true}]}";
- JsonObject jsonObj = buildJSON(json);
- try {
-
- Mockito.when(mockPolicyEngine.createConfigFirewallPolicy("testPolicy",jsonObj, "test", null, null, null, null, null)).thenReturn(response);
- result = mockPolicyEngine.createConfigFirewallPolicy("testPolicy",jsonObj, "test", null, null, null, null, null);
-
- } catch (Exception e) {
- logger.warn(e.getMessage());
- }
- assertEquals(result, response);
- }
-
- /**
- * Run the String updateConfigFirewallPolicy(String, JsonObject, String,
- * UUID) method test
- */
- @SuppressWarnings("deprecation")
- public void testUpdateConfigFirewallPolicy() {
- String response = "success";
- String result = null;
- String json = "{\"serviceTypeId\":\"/v0/firewall/pan\",\"configName\":\"rule1607\",\"deploymentOption\":{\"deployNow\":false},\"securityZoneId\":\"/v0/firewall/pan\",\"serviceGroups\":[{\"name\":\"1607Group\",\"description\":null,\"members\":[{\"type\":\"REFERENCE\",\"name\":\"SList\"},{\"type\":\"REFERENCE\",\"name\":\"Syslog\"}]},{\"name\":\"Syslog\",\"description\":\"NA\",\"type\":\"SERVICE\",\"transportProtocol\":\"udp\",\"appProtocol\":null,\"ports\":\"514\"},{\"name\":\"SList\",\"description\":\"Service List\",\"type\":\"SERVICE\",\"transportProtocol\":\"tcp\",\"appProtocol\":null,\"ports\":\"8080\"}],\"addressGroups\":[{\"name\":\"1607Group\",\"description\":null,\"members\":[{\"type\":\"SUBNET\",\"value\":\"10.11.12.13/14\"},{\"type\":\"SUBNET\",\"value\":\"10.11.12.13/14\"}]},{\"name\":\"PL_CCE3\",\"description\":\"CCE Routers\",\"members\":[{\"type\":\"SUBNET\",\"value\":\"10.11.12.13/14\"}]}],\"firewallRuleList\":[{\"position\":\"1\",\"ruleName\":\"1607Rule\",\"fromZones\":[\"Trusted\"],\"toZones\":[\"Untrusted\"],\"negateSource\":false,\"negateDestination\":false,\"sourceList\":[{\"type\":\"REFERENCE\",\"value\":\"PL_CCE3\"},{\"type\":\"REFERENCE\",\"value\":\"1607Group\"}],\"destinationList\":[{\"type\":\"REFERENCE\",\"value\":\"1607Group\"}],\"sourceServices\":[],\"destServices\":[{\"type\":\"REFERENCE\",\"name\":\"1607Group\"}],\"action\":\"accept\",\"description\":\"Rule for 1607 templates\",\"enabled\":true,\"log\":true}]}";
- JsonObject jsonObj = buildJSON(json);
- try {
-
- Mockito.when(mockPolicyEngine.updateConfigFirewallPolicy("testPolicy",jsonObj, "test", null, null, null, null, null)).thenReturn(response);
- result = mockPolicyEngine.updateConfigFirewallPolicy("testPolicy",jsonObj, "test", null, null, null, null, null);
-
- } catch (Exception e) {
- logger.warn(e.getMessage());
- }
- assertEquals(result, response);
- }
-
- /**
- * Run the PolicyChangeResponse createPolicy(PolicyParameters) method test
- */
- public void testCreatePolicy() {
- response.setResponseMessage("success");
- PolicyChangeResponse result = null;
- PolicyParameters policyParameters = new PolicyParameters();
-
- policyParameters.setPolicyClass(PolicyClass.Action); //required
- policyParameters.setPolicyName("test.junitTest"); //required
- policyParameters.setPolicyDescription("testing"); //optional
-
- //Set the Component Attributes... These are Optional
- Map<String, String> configAttributes = new HashMap<String, String>();
- configAttributes.put("test", "testing");
-
- Map<AttributeType, Map<String,String>> attributes = new HashMap<AttributeType, Map<String,String>>();
- attributes.put(AttributeType.MATCHING, configAttributes);
- policyParameters.setAttributes(attributes);
-
- policyParameters.setActionPerformer("PEP");
- policyParameters.setActionAttribute("testing");
- policyParameters.setRequestID(UUID.randomUUID());
-
- try {
-
- //stdPolicyEngine = Mockito.mock(StdPolicyEngine.class);
- //Mockito.when(stdPolicyEngine.callPAP(newPAPPolicy, new String[] {"operation=create", "apiflag=api", "policyType=Action"}, null, "Action")).thenReturn(callPapResponse);
- Mockito.when(mockPolicyEngine.createPolicy(policyParameters)).thenReturn(response);
- result = mockPolicyEngine.createPolicy(policyParameters);
-
- } catch (Exception e) {
- logger.warn(e.getMessage());
- logger.error("Exception Occured"+e);
- }
- assertEquals(result, response);
- }
-
- /**
- * Run the PolicyChangeResponse updatePolicy(PolicyParameters) method test
- */
- public void testUpdatePolicy() {
- response.setResponseMessage("success");
- PolicyChangeResponse result = null;
- PolicyParameters policyParameters = new PolicyParameters();
-
- policyParameters.setPolicyClass(PolicyClass.Action); //required
- policyParameters.setPolicyName("test.junitTest"); //required
- policyParameters.setPolicyDescription("testing"); //optional
-
- //Set the Component Attributes... These are Optional
- Map<String, String> configAttributes = new HashMap<String, String>();
- configAttributes.put("test", "testing");
-
- Map<AttributeType, Map<String,String>> attributes = new HashMap<AttributeType, Map<String,String>>();
- attributes.put(AttributeType.MATCHING, configAttributes);
- policyParameters.setAttributes(attributes);
-
- policyParameters.setActionPerformer("PEP");
- policyParameters.setActionAttribute("testing");
- policyParameters.setRequestID(UUID.randomUUID());
-
- try {
-
- Mockito.when(mockPolicyEngine.updatePolicy(policyParameters)).thenReturn(response);
- result = mockPolicyEngine.updatePolicy(policyParameters);
-
- } catch (Exception e) {
- logger.warn(e.getMessage());
- }
- assertEquals(result, response);
- }
-
- /**
- * Run the String pushPolicy(String, String, String, String, UUID) method
- * test
- */
- @SuppressWarnings("deprecation")
- public void testPushPolicy() {
- String response = "Success";
- String result = null;
- try {
-
- Mockito.when(mockPolicyEngine.pushPolicy("testing","test","Base","default",requestID)).thenReturn(response);
- result = mockPolicyEngine.pushPolicy("testing","test","Base","default",requestID);
-
- } catch (Exception e) {
- logger.warn(e.getMessage());
- }
-
- assertEquals(result, response);
- }
-
- public void testPushPolicy2() {
- PushPolicyParameters policyParameters = new PushPolicyParameters();
- PolicyChangeResponse result = null;
-
- //String policyScope = null;
- policyParameters.setPolicyName("test.junitTest");
- policyParameters.setPolicyType("Action");
- policyParameters.setPdpGroup("Default");
-
- try {
-
- Mockito.when(mockPolicyEngine.pushPolicy(policyParameters)).thenReturn(response);
- result = mockPolicyEngine.pushPolicy(policyParameters);
-
- } catch (Exception e) {
- logger.warn(e.getMessage());
- }
-
- assertEquals(result, response);
- }
-
- /**
- * Run the PolicyChangeResponse deletePolicy(DeletePolicyParameters) method
- * test
- */
- public void testDeletePolicy() {
- DeletePolicyParameters policyParameters = new DeletePolicyParameters();
- PolicyChangeResponse result = null;
-
- //String policyScope = null;
- policyParameters.setPolicyName("test.junitTest.1.xml");
- policyParameters.setDeleteCondition(DeletePolicyCondition.ALL);
- policyParameters.setPolicyComponent("PAP");
- policyParameters.setPdpGroup("Default");
-
- try {
-
- Mockito.when(mockPolicyEngine.deletePolicy(policyParameters)).thenReturn(response);
- result = mockPolicyEngine.deletePolicy(policyParameters);
-
- } catch (Exception e) {
- logger.warn(e.getMessage());
- }
-
- assertEquals(result, response);
- }
-
- /**
- * Run the PolicyChangeResponse policyEngineImport(ImportParameters) method
- * test
- */
- public void testPolicyEngineImport() {
- ImportParameters importParameters = new ImportParameters();
- PolicyChangeResponse result = null;
-
- importParameters.setFilePath("C:\\Workspaces\\models\\TestingModel\\ControllerServiceSampleSdnlServiceInstance-v0.1.0-SNAPSHOT.zip");
- importParameters.setServiceName("ControllerServiceSampleSdnlServiceInstance");
-
- importParameters.setRequestID(UUID.randomUUID());
- importParameters.setServiceType(IMPORT_TYPE.MICROSERVICE);
- importParameters.setVersion("1607-2");
-
-
- try {
-
- Mockito.when(mockPolicyEngine.policyEngineImport(importParameters)).thenReturn(response);
- result = mockPolicyEngine.policyEngineImport(importParameters);
-
- } catch (Exception e) {
- logger.warn(e.getMessage());
- }
-
- assertEquals(result, response);
- }
-
- private static JsonObject buildJSON(String jsonString) {
- JsonObject json = null;;
- if (jsonString != null) {
- StringReader in = null;
-
- in = new StringReader(jsonString);
-
- JsonReader jsonReader = Json.createReader(in);
- json = jsonReader.readObject();
- }
-
- return json;
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyEngineTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyEngineTest.java
deleted file mode 100644
index c36a921d4..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyEngineTest.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.fail;
-
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-
-import org.junit.Test;
-import org.openecomp.policy.api.NotificationScheme;
-import org.openecomp.policy.api.PolicyEngine;
-import org.openecomp.policy.api.PolicyEngineException;
-import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
-import org.openecomp.policy.common.logging.flexlogger.Logger;
-
-public class PolicyEngineTest {
-
- private static final Logger logger = FlexLogger.getLogger(PolicyEngineTest.class);
- private PolicyEngine policyEngine = null;
- private String filePath = null;
-
- @Test
- public void testPolicyEngineForFail() {
- filePath = null;
- try {
- policyEngine = new PolicyEngine(filePath);
- } catch (PolicyEngineException e) {
- logger.warn(e.getMessage());
- }
- assertNull(policyEngine);
- // Test even for this case.
- filePath = "NotNull";
- try {
- policyEngine = new PolicyEngine(filePath);
- } catch (PolicyEngineException e) {
- logger.warn(e.getMessage());
- }
- assertNull(policyEngine);
- }
-
- @Test
- public void testPolicyEngineforPropertyFileError() {
- filePath = "Test/config_error.property";
- isFileAvailable(filePath);
- try {
- policyEngine = new PolicyEngine(filePath);
- } catch (PolicyEngineException e) {
- logger.warn(e.getMessage());
- }
- assertNull(policyEngine);
- }
-
- @Test
- public void testPolicyEngineforPDPURLError() {
- String filePath = "Test/config_fail.properties";
- isFileAvailable(filePath);
- try {
- policyEngine = new PolicyEngine(filePath);
- } catch (PolicyEngineException e) {
- logger.warn(e.getMessage());
- }
- assertNull(policyEngine);
- }
-
- @Test
- public void testPolicyEngineForPass() {
- String filePath = "Test/config_pass.properties";
- isFileAvailable(filePath);
- try {
- policyEngine = new PolicyEngine(filePath);
- } catch (PolicyEngineException e) {
- logger.warn(e.getMessage());
- }
- assertNotNull(policyEngine);
- }
-
- @Test
- public void testPolicyEngineForUEBPass() {
- String filePath = "Test/config_UEB_pass.properties";
- isFileAvailable(filePath);
- try {
- policyEngine = new PolicyEngine(filePath);
- } catch (PolicyEngineException e) {
- logger.warn(e.getMessage());
- }
- assertNotNull(policyEngine);
- }
-
-
- @Test
- public void testPolicyEngineForUEBBadType() {
- String filePath = "Test/config_UEB_bad_type.properties";
- isFileAvailable(filePath);
- try {
- policyEngine = new PolicyEngine(filePath);
- } catch (PolicyEngineException e) {
- logger.warn(e.getMessage());
- }
- assertNotNull(policyEngine);
- }
-
- @Test
- public void testPolicyEngineForUEBBadServerType() {
- String filePath = "Test/config_UEB_badservers.properties";
- isFileAvailable(filePath);
- try {
- policyEngine = new PolicyEngine(filePath);
- } catch (PolicyEngineException e) {
- logger.warn(e.getMessage());
- }
- assertNotNull(policyEngine);
- }
-
- @Test
- public void testPolicyEngineNotficationAutoUEB() {
- String filePath = "Test/config_UEB_pass.properties";
- isFileAvailable(filePath);
- try {
- policyEngine = new PolicyEngine(filePath);
- policyEngine.setScheme(NotificationScheme.AUTO_ALL_NOTIFICATIONS);
- } catch (PolicyEngineException e) {
- logger.warn(e.getMessage());
- }
- assertNotNull(policyEngine);
- }
-
- @Test
- public void testPolicyEngineNotficationAuto() {
- String filePath = "Test/config_pass.properties";
- isFileAvailable(filePath);
- try {
- policyEngine = new PolicyEngine(filePath);
- policyEngine.setScheme(NotificationScheme.AUTO_ALL_NOTIFICATIONS);
- //policyEngine.getNotification();
- } catch (PolicyEngineException e) {
- logger.warn(e.getMessage());
- }
- assertNotNull(policyEngine);
- }
-
- public void isFileAvailable(String filePath) {
- Path file = Paths.get(filePath);
- if (Files.notExists(file)) {
- logger.error("File Doesn't Exist "+ file.toString());
- fail("File: " +filePath + " Not found");
- }
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyEventExceptionTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyEventExceptionTest.java
deleted file mode 100644
index fa8d5d1d8..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyEventExceptionTest.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import org.junit.*;
-import org.openecomp.policy.api.PolicyEventException;
-
-import static org.junit.Assert.*;
-
-/**
- * The class <code>PolicyEventExceptionTest</code> contains tests for the class <code>{@link PolicyEventException}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- * @version $Revision: 1.0 $
- */
-public class PolicyEventExceptionTest {
- /**
- * Run the PolicyEventException() constructor test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testPolicyEventException_1()
- throws Exception {
-
- PolicyEventException result = new PolicyEventException();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(null, result.getCause());
- assertEquals("org.openecomp.policy.api.PolicyEventException", result.toString());
- assertEquals(null, result.getLocalizedMessage());
- assertEquals(null, result.getMessage());
- }
-
- /**
- * Run the PolicyEventException(String) constructor test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testPolicyEventException_2()
- throws Exception {
- String message = "";
-
- PolicyEventException result = new PolicyEventException(message);
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(null, result.getCause());
- assertEquals("org.openecomp.policy.api.PolicyEventException: ", result.toString());
- assertEquals("", result.getLocalizedMessage());
- assertEquals("", result.getMessage());
- }
-
- /**
- * Run the PolicyEventException(Throwable) constructor test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testPolicyEventException_3()
- throws Exception {
- Throwable cause = new Throwable();
-
- PolicyEventException result = new PolicyEventException(cause);
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("org.openecomp.policy.api.PolicyEventException: java.lang.Throwable", result.toString());
- assertEquals("java.lang.Throwable", result.getLocalizedMessage());
- assertEquals("java.lang.Throwable", result.getMessage());
- }
-
- /**
- * Run the PolicyEventException(String,Throwable) constructor test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testPolicyEventException_4()
- throws Exception {
- String message = "";
- Throwable cause = new Throwable();
-
- PolicyEventException result = new PolicyEventException(message, cause);
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("org.openecomp.policy.api.PolicyEventException: ", result.toString());
- assertEquals("", result.getLocalizedMessage());
- assertEquals("", result.getMessage());
- }
-
- /**
- * Run the PolicyEventException(String,Throwable,boolean,boolean) constructor test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testPolicyEventException_5()
- throws Exception {
- String message = "";
- Throwable cause = new Throwable();
- boolean enableSuppression = true;
- boolean writableStackTrace = true;
-
- PolicyEventException result = new PolicyEventException(message, cause, enableSuppression, writableStackTrace);
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("org.openecomp.policy.api.PolicyEventException: ", result.toString());
- assertEquals("", result.getLocalizedMessage());
- assertEquals("", result.getMessage());
- }
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(PolicyEventExceptionTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyParametersTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyParametersTest.java
deleted file mode 100644
index eeb973b90..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyParametersTest.java
+++ /dev/null
@@ -1,1409 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import java.util.Hashtable;
-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.openecomp.policy.api.AttributeType;
-import org.openecomp.policy.api.PolicyClass;
-import org.openecomp.policy.api.PolicyConfigType;
-import org.openecomp.policy.api.PolicyParameters;
-import org.openecomp.policy.api.PolicyType;
-
-/**
- * The class <code>PolicyParametersTest</code> contains tests for the class <code>{@link PolicyParameters}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- * @version $Revision: 1.0 $
- */
-public class PolicyParametersTest {
- /**
- * Run the String getActionAttribute() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetActionAttribute_1()
- throws Exception {
- PolicyParameters fixture = new PolicyParameters();
- fixture.setRequestID(UUID.randomUUID());
- fixture.setActionAttribute("");
- fixture.setAttributes(new Hashtable<AttributeType, Map<String, String>>());
- fixture.setDynamicRuleAlgorithmLabels(new LinkedList<String>());
- fixture.setPolicyDescription("");
- fixture.setPolicyConfigType(PolicyConfigType.BRMS_PARAM);
- fixture.setDynamicRuleAlgorithmField2(new LinkedList<String>());
- fixture.setPolicyName("");
- fixture.setConfigName("");
- fixture.setDynamicRuleAlgorithmFunctions(new LinkedList<String>());
- fixture.setPolicyClass(PolicyClass.Action);
- fixture.setEcompName("");
- fixture.setConfigBodyType(PolicyType.JSON);
- fixture.setDynamicRuleAlgorithmField1(new LinkedList<String>());
- fixture.setPriority("");
- fixture.setActionPerformer("");
- fixture.setConfigBody("");
-
- String result = fixture.getActionAttribute();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the String getActionPerformer() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetActionPerformer_1()
- throws Exception {
- PolicyParameters fixture = new PolicyParameters();
- fixture.setRequestID(UUID.randomUUID());
- fixture.setActionAttribute("");
- fixture.setAttributes(new Hashtable<AttributeType, Map<String, String>>());
- fixture.setDynamicRuleAlgorithmLabels(new LinkedList<String>());
- fixture.setPolicyDescription("");
- fixture.setPolicyConfigType(PolicyConfigType.BRMS_PARAM);
- fixture.setDynamicRuleAlgorithmField2(new LinkedList<String>());
- fixture.setPolicyName("");
- fixture.setConfigName("");
- fixture.setDynamicRuleAlgorithmFunctions(new LinkedList<String>());
- fixture.setPolicyClass(PolicyClass.Action);
- fixture.setEcompName("");
- fixture.setConfigBodyType(PolicyType.JSON);
- fixture.setDynamicRuleAlgorithmField1(new LinkedList<String>());
- fixture.setPriority("");
- fixture.setActionPerformer("");
- fixture.setConfigBody("");
-
- String result = fixture.getActionPerformer();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the Map<AttributeType, Map<String, String>> getAttributes() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetAttributes_1()
- throws Exception {
- PolicyParameters fixture = new PolicyParameters();
- fixture.setRequestID(UUID.randomUUID());
- fixture.setActionAttribute("");
- fixture.setAttributes(new Hashtable<AttributeType, Map<String, String>>());
- fixture.setDynamicRuleAlgorithmLabels(new LinkedList<String>());
- fixture.setPolicyDescription("");
-
- fixture.setPolicyConfigType(PolicyConfigType.BRMS_PARAM);
- fixture.setDynamicRuleAlgorithmField2(new LinkedList<String>());
- fixture.setPolicyName("");
- fixture.setConfigName("");
- fixture.setDynamicRuleAlgorithmFunctions(new LinkedList<String>());
- fixture.setPolicyClass(PolicyClass.Action);
- fixture.setEcompName("");
- fixture.setConfigBodyType(PolicyType.JSON);
- fixture.setDynamicRuleAlgorithmField1(new LinkedList<String>());
- fixture.setPriority("");
- fixture.setActionPerformer("");
- fixture.setConfigBody("");
-
- Map<AttributeType, Map<String, String>> result = fixture.getAttributes();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(0, result.size());
- }
-
- /**
- * Run the String getConfigBody() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetConfigBody_1()
- throws Exception {
- PolicyParameters fixture = new PolicyParameters();
- fixture.setRequestID(UUID.randomUUID());
- fixture.setActionAttribute("");
- fixture.setAttributes(new Hashtable<AttributeType, Map<String, String>>());
- fixture.setDynamicRuleAlgorithmLabels(new LinkedList<String>());
- fixture.setPolicyDescription("");
-
- fixture.setPolicyConfigType(PolicyConfigType.BRMS_PARAM);
- fixture.setDynamicRuleAlgorithmField2(new LinkedList<String>());
- fixture.setPolicyName("");
- fixture.setConfigName("");
- fixture.setDynamicRuleAlgorithmFunctions(new LinkedList<String>());
- fixture.setPolicyClass(PolicyClass.Action);
- fixture.setEcompName("");
- fixture.setConfigBodyType(PolicyType.JSON);
- fixture.setDynamicRuleAlgorithmField1(new LinkedList<String>());
- fixture.setPriority("");
- fixture.setActionPerformer("");
- fixture.setConfigBody("");
-
- String result = fixture.getConfigBody();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the PolicyType getConfigBodyType() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetConfigBodyType_1()
- throws Exception {
- PolicyParameters fixture = new PolicyParameters();
- fixture.setRequestID(UUID.randomUUID());
- fixture.setActionAttribute("");
- fixture.setAttributes(new Hashtable<AttributeType, Map<String, String>>());
- fixture.setDynamicRuleAlgorithmLabels(new LinkedList<String>());
- fixture.setPolicyDescription("");
-
- fixture.setPolicyConfigType(PolicyConfigType.BRMS_PARAM);
- fixture.setDynamicRuleAlgorithmField2(new LinkedList<String>());
- fixture.setPolicyName("");
- fixture.setConfigName("");
- fixture.setDynamicRuleAlgorithmFunctions(new LinkedList<String>());
- fixture.setPolicyClass(PolicyClass.Action);
- fixture.setEcompName("");
- fixture.setConfigBodyType(PolicyType.JSON);
- fixture.setDynamicRuleAlgorithmField1(new LinkedList<String>());
- fixture.setPriority("");
- fixture.setActionPerformer("");
- fixture.setConfigBody("");
-
- PolicyType result = fixture.getConfigBodyType();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("json", result.toString());
- assertEquals("JSON", result.name());
- assertEquals(1, result.ordinal());
- }
-
- /**
- * Run the String getConfigName() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetConfigName_1()
- throws Exception {
- PolicyParameters fixture = new PolicyParameters();
- fixture.setRequestID(UUID.randomUUID());
- fixture.setActionAttribute("");
- fixture.setAttributes(new Hashtable<AttributeType, Map<String, String>>());
- fixture.setDynamicRuleAlgorithmLabels(new LinkedList<String>());
- fixture.setPolicyDescription("");
-
- fixture.setPolicyConfigType(PolicyConfigType.BRMS_PARAM);
- fixture.setDynamicRuleAlgorithmField2(new LinkedList<String>());
- fixture.setPolicyName("");
- fixture.setConfigName("");
- fixture.setDynamicRuleAlgorithmFunctions(new LinkedList<String>());
- fixture.setPolicyClass(PolicyClass.Action);
- fixture.setEcompName("");
- fixture.setConfigBodyType(PolicyType.JSON);
- fixture.setDynamicRuleAlgorithmField1(new LinkedList<String>());
- fixture.setPriority("");
- fixture.setActionPerformer("");
- fixture.setConfigBody("");
-
- String result = fixture.getConfigName();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the List<String> getDynamicRuleAlgorithmField1() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetDynamicRuleAlgorithmField1_1()
- throws Exception {
- PolicyParameters fixture = new PolicyParameters();
- fixture.setRequestID(UUID.randomUUID());
- fixture.setActionAttribute("");
- fixture.setAttributes(new Hashtable<AttributeType, Map<String, String>>());
- fixture.setDynamicRuleAlgorithmLabels(new LinkedList<String>());
- fixture.setPolicyDescription("");
-
- fixture.setPolicyConfigType(PolicyConfigType.BRMS_PARAM);
- fixture.setDynamicRuleAlgorithmField2(new LinkedList<String>());
- fixture.setPolicyName("");
- fixture.setConfigName("");
- fixture.setDynamicRuleAlgorithmFunctions(new LinkedList<String>());
- fixture.setPolicyClass(PolicyClass.Action);
- fixture.setEcompName("");
- fixture.setConfigBodyType(PolicyType.JSON);
- fixture.setDynamicRuleAlgorithmField1(new LinkedList<String>());
- fixture.setPriority("");
- fixture.setActionPerformer("");
- fixture.setConfigBody("");
-
- List<String> result = fixture.getDynamicRuleAlgorithmField1();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(0, result.size());
- }
-
- /**
- * Run the List<String> getDynamicRuleAlgorithmField2() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetDynamicRuleAlgorithmField2_1()
- throws Exception {
- PolicyParameters fixture = new PolicyParameters();
- fixture.setRequestID(UUID.randomUUID());
- fixture.setActionAttribute("");
- fixture.setAttributes(new Hashtable<AttributeType, Map<String, String>>());
- fixture.setDynamicRuleAlgorithmLabels(new LinkedList<String>());
- fixture.setPolicyDescription("");
-
- fixture.setPolicyConfigType(PolicyConfigType.BRMS_PARAM);
- fixture.setDynamicRuleAlgorithmField2(new LinkedList<String>());
- fixture.setPolicyName("");
- fixture.setConfigName("");
- fixture.setDynamicRuleAlgorithmFunctions(new LinkedList<String>());
- fixture.setPolicyClass(PolicyClass.Action);
- fixture.setEcompName("");
- fixture.setConfigBodyType(PolicyType.JSON);
- fixture.setDynamicRuleAlgorithmField1(new LinkedList<String>());
- fixture.setPriority("");
- fixture.setActionPerformer("");
- fixture.setConfigBody("");
-
- List<String> result = fixture.getDynamicRuleAlgorithmField2();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(0, result.size());
- }
-
- /**
- * Run the List<String> getDynamicRuleAlgorithmFunctions() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetDynamicRuleAlgorithmFunctions_1()
- throws Exception {
- PolicyParameters fixture = new PolicyParameters();
- fixture.setRequestID(UUID.randomUUID());
- fixture.setActionAttribute("");
- fixture.setAttributes(new Hashtable<AttributeType, Map<String, String>>());
- fixture.setDynamicRuleAlgorithmLabels(new LinkedList<String>());
- fixture.setPolicyDescription("");
-
- fixture.setPolicyConfigType(PolicyConfigType.BRMS_PARAM);
- fixture.setDynamicRuleAlgorithmField2(new LinkedList<String>());
- fixture.setPolicyName("");
- fixture.setConfigName("");
- fixture.setDynamicRuleAlgorithmFunctions(new LinkedList<String>());
- fixture.setPolicyClass(PolicyClass.Action);
- fixture.setEcompName("");
- fixture.setConfigBodyType(PolicyType.JSON);
- fixture.setDynamicRuleAlgorithmField1(new LinkedList<String>());
- fixture.setPriority("");
- fixture.setActionPerformer("");
- fixture.setConfigBody("");
-
- List<String> result = fixture.getDynamicRuleAlgorithmFunctions();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(0, result.size());
- }
-
- /**
- * Run the List<String> getDynamicRuleAlgorithmLabels() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetDynamicRuleAlgorithmLabels_1()
- throws Exception {
- PolicyParameters fixture = new PolicyParameters();
- fixture.setRequestID(UUID.randomUUID());
- fixture.setActionAttribute("");
- fixture.setAttributes(new Hashtable<AttributeType, Map<String, String>>());
- fixture.setDynamicRuleAlgorithmLabels(new LinkedList<String>());
- fixture.setPolicyDescription("");
-
- fixture.setPolicyConfigType(PolicyConfigType.BRMS_PARAM);
- fixture.setDynamicRuleAlgorithmField2(new LinkedList<String>());
- fixture.setPolicyName("");
- fixture.setConfigName("");
- fixture.setDynamicRuleAlgorithmFunctions(new LinkedList<String>());
- fixture.setPolicyClass(PolicyClass.Action);
- fixture.setEcompName("");
- fixture.setConfigBodyType(PolicyType.JSON);
- fixture.setDynamicRuleAlgorithmField1(new LinkedList<String>());
- fixture.setPriority("");
- fixture.setActionPerformer("");
- fixture.setConfigBody("");
-
- List<String> result = fixture.getDynamicRuleAlgorithmLabels();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(0, result.size());
- }
-
- /**
- * Run the String getEcompName() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetEcompName_1()
- throws Exception {
- PolicyParameters fixture = new PolicyParameters();
- fixture.setRequestID(UUID.randomUUID());
- fixture.setActionAttribute("");
- fixture.setAttributes(new Hashtable<AttributeType, Map<String, String>>());
- fixture.setDynamicRuleAlgorithmLabels(new LinkedList<String>());
- fixture.setPolicyDescription("");
-
- fixture.setPolicyConfigType(PolicyConfigType.BRMS_PARAM);
- fixture.setDynamicRuleAlgorithmField2(new LinkedList<String>());
- fixture.setPolicyName("");
- fixture.setConfigName("");
- fixture.setDynamicRuleAlgorithmFunctions(new LinkedList<String>());
- fixture.setPolicyClass(PolicyClass.Action);
- fixture.setEcompName("");
- fixture.setConfigBodyType(PolicyType.JSON);
- fixture.setDynamicRuleAlgorithmField1(new LinkedList<String>());
- fixture.setPriority("");
- fixture.setActionPerformer("");
- fixture.setConfigBody("");
-
- String result = fixture.getEcompName();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the PolicyClass getPolicyClass() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetPolicyClass_1()
- throws Exception {
- PolicyParameters fixture = new PolicyParameters();
- fixture.setRequestID(UUID.randomUUID());
- fixture.setActionAttribute("");
- fixture.setAttributes(new Hashtable<AttributeType, Map<String, String>>());
- fixture.setDynamicRuleAlgorithmLabels(new LinkedList<String>());
- fixture.setPolicyDescription("");
-
- fixture.setPolicyConfigType(PolicyConfigType.BRMS_PARAM);
- fixture.setDynamicRuleAlgorithmField2(new LinkedList<String>());
- fixture.setPolicyName("");
- fixture.setConfigName("");
- fixture.setDynamicRuleAlgorithmFunctions(new LinkedList<String>());
- fixture.setPolicyClass(PolicyClass.Action);
- fixture.setEcompName("");
- fixture.setConfigBodyType(PolicyType.JSON);
- fixture.setDynamicRuleAlgorithmField1(new LinkedList<String>());
- fixture.setPriority("");
- fixture.setActionPerformer("");
- fixture.setConfigBody("");
-
- PolicyClass result = fixture.getPolicyClass();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("Action", result.toString());
- assertEquals("Action", result.name());
- assertEquals(1, result.ordinal());
- }
-
- /**
- * Run the PolicyConfigType getPolicyConfigType() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetPolicyConfigType_1()
- throws Exception {
- PolicyParameters fixture = new PolicyParameters();
- fixture.setRequestID(UUID.randomUUID());
- fixture.setActionAttribute("");
- fixture.setAttributes(new Hashtable<AttributeType, Map<String, String>>());
- fixture.setDynamicRuleAlgorithmLabels(new LinkedList<String>());
- fixture.setPolicyDescription("");
-
- fixture.setPolicyConfigType(PolicyConfigType.BRMS_PARAM);
- fixture.setDynamicRuleAlgorithmField2(new LinkedList<String>());
- fixture.setPolicyName("");
- fixture.setConfigName("");
- fixture.setDynamicRuleAlgorithmFunctions(new LinkedList<String>());
- fixture.setPolicyClass(PolicyClass.Action);
- fixture.setEcompName("");
- fixture.setConfigBodyType(PolicyType.JSON);
- fixture.setDynamicRuleAlgorithmField1(new LinkedList<String>());
- fixture.setPriority("");
- fixture.setActionPerformer("");
- fixture.setConfigBody("");
-
- PolicyConfigType result = (PolicyConfigType) fixture.getPolicyConfigType();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("BRMS_Param", result.toString());
- assertEquals("BRMS_PARAM", result.name());
- assertEquals(5, result.ordinal());
- }
-
- /**
- * Run the String getPolicyDescription() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetPolicyDescription_1()
- throws Exception {
- PolicyParameters fixture = new PolicyParameters();
- fixture.setRequestID(UUID.randomUUID());
- fixture.setActionAttribute("");
- fixture.setAttributes(new Hashtable<AttributeType, Map<String, String>>());
- fixture.setDynamicRuleAlgorithmLabels(new LinkedList<String>());
- fixture.setPolicyDescription("");
-
- fixture.setPolicyConfigType(PolicyConfigType.BRMS_PARAM);
- fixture.setDynamicRuleAlgorithmField2(new LinkedList<String>());
- fixture.setPolicyName("");
- fixture.setConfigName("");
- fixture.setDynamicRuleAlgorithmFunctions(new LinkedList<String>());
- fixture.setPolicyClass(PolicyClass.Action);
- fixture.setEcompName("");
- fixture.setConfigBodyType(PolicyType.JSON);
- fixture.setDynamicRuleAlgorithmField1(new LinkedList<String>());
- fixture.setPriority("");
- fixture.setActionPerformer("");
- fixture.setConfigBody("");
-
- String result = fixture.getPolicyDescription();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the String getPolicyName() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetPolicyName_1()
- throws Exception {
- PolicyParameters fixture = new PolicyParameters();
- fixture.setRequestID(UUID.randomUUID());
- fixture.setActionAttribute("");
- fixture.setAttributes(new Hashtable<AttributeType, Map<String, String>>());
- fixture.setDynamicRuleAlgorithmLabels(new LinkedList<String>());
- fixture.setPolicyDescription("");
-
- fixture.setPolicyConfigType(PolicyConfigType.BRMS_PARAM);
- fixture.setDynamicRuleAlgorithmField2(new LinkedList<String>());
- fixture.setPolicyName("");
- fixture.setConfigName("");
- fixture.setDynamicRuleAlgorithmFunctions(new LinkedList<String>());
- fixture.setPolicyClass(PolicyClass.Action);
- fixture.setEcompName("");
- fixture.setConfigBodyType(PolicyType.JSON);
- fixture.setDynamicRuleAlgorithmField1(new LinkedList<String>());
- fixture.setPriority("");
- fixture.setActionPerformer("");
- fixture.setConfigBody("");
-
- String result = fixture.getPolicyName();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the String getPriority() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetPriority_1()
- throws Exception {
- PolicyParameters fixture = new PolicyParameters();
- fixture.setRequestID(UUID.randomUUID());
- fixture.setActionAttribute("");
- fixture.setAttributes(new Hashtable<AttributeType, Map<String, String>>());
- fixture.setDynamicRuleAlgorithmLabels(new LinkedList<String>());
- fixture.setPolicyDescription("");
-
- fixture.setPolicyConfigType(PolicyConfigType.BRMS_PARAM);
- fixture.setDynamicRuleAlgorithmField2(new LinkedList<String>());
- fixture.setPolicyName("");
- fixture.setConfigName("");
- fixture.setDynamicRuleAlgorithmFunctions(new LinkedList<String>());
- fixture.setPolicyClass(PolicyClass.Action);
- fixture.setEcompName("");
- fixture.setConfigBodyType(PolicyType.JSON);
- fixture.setDynamicRuleAlgorithmField1(new LinkedList<String>());
- fixture.setPriority("");
- fixture.setActionPerformer("");
- fixture.setConfigBody("");
-
- String result = fixture.getPriority();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the UUID getRequestID() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetRequestID_1()
- throws Exception {
- PolicyParameters fixture = new PolicyParameters();
- fixture.setRequestID(UUID.fromString("878d319c-2799-4684-b480-99f40e1042b2"));
- fixture.setActionAttribute("");
- fixture.setAttributes(new Hashtable<AttributeType, Map<String, String>>());
- fixture.setDynamicRuleAlgorithmLabels(new LinkedList<String>());
- fixture.setPolicyDescription("");
-
- fixture.setPolicyConfigType(PolicyConfigType.BRMS_PARAM);
- fixture.setDynamicRuleAlgorithmField2(new LinkedList<String>());
- fixture.setPolicyName("");
- fixture.setConfigName("");
- fixture.setDynamicRuleAlgorithmFunctions(new LinkedList<String>());
- fixture.setPolicyClass(PolicyClass.Action);
- fixture.setEcompName("");
- fixture.setConfigBodyType(PolicyType.JSON);
- fixture.setDynamicRuleAlgorithmField1(new LinkedList<String>());
- fixture.setPriority("");
- fixture.setActionPerformer("");
- fixture.setConfigBody("");
-
- UUID result = fixture.getRequestID();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("878d319c-2799-4684-b480-99f40e1042b2", result.toString());
- assertEquals(4, result.version());
- assertEquals(2, result.variant());
- assertEquals(-5440179076376542542L, result.getLeastSignificantBits());
- assertEquals(-8679226360124062076L, result.getMostSignificantBits());
- }
-
- /**
- * Run the void setActionAttribute(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetActionAttribute_1()
- throws Exception {
- PolicyParameters fixture = new PolicyParameters();
- fixture.setRequestID(UUID.randomUUID());
- fixture.setActionAttribute("");
- fixture.setAttributes(new Hashtable<AttributeType, Map<String, String>>());
- fixture.setDynamicRuleAlgorithmLabels(new LinkedList<String>());
- fixture.setPolicyDescription("");
-
- fixture.setPolicyConfigType(PolicyConfigType.BRMS_PARAM);
- fixture.setDynamicRuleAlgorithmField2(new LinkedList<String>());
- fixture.setPolicyName("");
- fixture.setConfigName("");
- fixture.setDynamicRuleAlgorithmFunctions(new LinkedList<String>());
- fixture.setPolicyClass(PolicyClass.Action);
- fixture.setEcompName("");
- fixture.setConfigBodyType(PolicyType.JSON);
- fixture.setDynamicRuleAlgorithmField1(new LinkedList<String>());
- fixture.setPriority("");
- fixture.setActionPerformer("");
- fixture.setConfigBody("");
- String actionAttribute = "";
-
- fixture.setActionAttribute(actionAttribute);
-
- // add additional test code here
- }
-
- /**
- * Run the void setActionPerformer(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetActionPerformer_1()
- throws Exception {
- PolicyParameters fixture = new PolicyParameters();
- fixture.setRequestID(UUID.randomUUID());
- fixture.setActionAttribute("");
- fixture.setAttributes(new Hashtable<AttributeType, Map<String, String>>());
- fixture.setDynamicRuleAlgorithmLabels(new LinkedList<String>());
- fixture.setPolicyDescription("");
-
- fixture.setPolicyConfigType(PolicyConfigType.BRMS_PARAM);
- fixture.setDynamicRuleAlgorithmField2(new LinkedList<String>());
- fixture.setPolicyName("");
- fixture.setConfigName("");
- fixture.setDynamicRuleAlgorithmFunctions(new LinkedList<String>());
- fixture.setPolicyClass(PolicyClass.Action);
- fixture.setEcompName("");
- fixture.setConfigBodyType(PolicyType.JSON);
- fixture.setDynamicRuleAlgorithmField1(new LinkedList<String>());
- fixture.setPriority("");
- fixture.setActionPerformer("");
- fixture.setConfigBody("");
- String actionPerformer = "";
-
- fixture.setActionPerformer(actionPerformer);
-
- // add additional test code here
- }
-
- /**
- * Run the void setAttributes(Map<AttributeType,Map<String,String>>) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetAttributes_1()
- throws Exception {
- PolicyParameters fixture = new PolicyParameters();
- fixture.setRequestID(UUID.randomUUID());
- fixture.setActionAttribute("");
- fixture.setAttributes(new Hashtable<AttributeType, Map<String, String>>());
- fixture.setDynamicRuleAlgorithmLabels(new LinkedList<String>());
- fixture.setPolicyDescription("");
-
- fixture.setPolicyConfigType(PolicyConfigType.BRMS_PARAM);
- fixture.setDynamicRuleAlgorithmField2(new LinkedList<String>());
- fixture.setPolicyName("");
- fixture.setConfigName("");
- fixture.setDynamicRuleAlgorithmFunctions(new LinkedList<String>());
- fixture.setPolicyClass(PolicyClass.Action);
- fixture.setEcompName("");
- fixture.setConfigBodyType(PolicyType.JSON);
- fixture.setDynamicRuleAlgorithmField1(new LinkedList<String>());
- fixture.setPriority("");
- fixture.setActionPerformer("");
- fixture.setConfigBody("");
- Map<AttributeType, Map<String, String>> attributes = new Hashtable<AttributeType, Map<String, String>>();
-
- fixture.setAttributes(attributes);
-
- // add additional test code here
- }
-
- /**
- * Run the void setConfigBody(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetConfigBody_1()
- throws Exception {
- PolicyParameters fixture = new PolicyParameters();
- fixture.setRequestID(UUID.randomUUID());
- fixture.setActionAttribute("");
- fixture.setAttributes(new Hashtable<AttributeType, Map<String, String>>());
- fixture.setDynamicRuleAlgorithmLabels(new LinkedList<String>());
- fixture.setPolicyDescription("");
-
- fixture.setPolicyConfigType(PolicyConfigType.BRMS_PARAM);
- fixture.setDynamicRuleAlgorithmField2(new LinkedList<String>());
- fixture.setPolicyName("");
- fixture.setConfigName("");
- fixture.setDynamicRuleAlgorithmFunctions(new LinkedList<String>());
- fixture.setPolicyClass(PolicyClass.Action);
- fixture.setEcompName("");
- fixture.setConfigBodyType(PolicyType.JSON);
- fixture.setDynamicRuleAlgorithmField1(new LinkedList<String>());
- fixture.setPriority("");
- fixture.setActionPerformer("");
- fixture.setConfigBody("");
- String configBody = "";
-
- fixture.setConfigBody(configBody);
-
- // add additional test code here
- }
-
- /**
- * Run the void setConfigBodyType(PolicyType) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetConfigBodyType_1()
- throws Exception {
- PolicyParameters fixture = new PolicyParameters();
- fixture.setRequestID(UUID.randomUUID());
- fixture.setActionAttribute("");
- fixture.setAttributes(new Hashtable<AttributeType, Map<String, String>>());
- fixture.setDynamicRuleAlgorithmLabels(new LinkedList<String>());
- fixture.setPolicyDescription("");
-
- fixture.setPolicyConfigType(PolicyConfigType.BRMS_PARAM);
- fixture.setDynamicRuleAlgorithmField2(new LinkedList<String>());
- fixture.setPolicyName("");
- fixture.setConfigName("");
- fixture.setDynamicRuleAlgorithmFunctions(new LinkedList<String>());
- fixture.setPolicyClass(PolicyClass.Action);
- fixture.setEcompName("");
- fixture.setConfigBodyType(PolicyType.JSON);
- fixture.setDynamicRuleAlgorithmField1(new LinkedList<String>());
- fixture.setPriority("");
- fixture.setActionPerformer("");
- fixture.setConfigBody("");
- PolicyType configBodyType = PolicyType.JSON;
-
- fixture.setConfigBodyType(configBodyType);
-
- // add additional test code here
- }
-
- /**
- * Run the void setConfigFirewallPolicyParameters(String,String,UUID) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetConfigFirewallPolicyParameters_1()
- throws Exception {
- PolicyParameters fixture = new PolicyParameters();
- fixture.setRequestID(UUID.randomUUID());
- fixture.setActionAttribute("");
- fixture.setAttributes(new Hashtable<AttributeType, Map<String, String>>());
- fixture.setDynamicRuleAlgorithmLabels(new LinkedList<String>());
- fixture.setPolicyDescription("");
-
- fixture.setPolicyConfigType(PolicyConfigType.BRMS_PARAM);
- fixture.setDynamicRuleAlgorithmField2(new LinkedList<String>());
- fixture.setPolicyName("");
- fixture.setConfigName("");
- fixture.setDynamicRuleAlgorithmFunctions(new LinkedList<String>());
- fixture.setPolicyClass(PolicyClass.Action);
- fixture.setEcompName("");
- fixture.setConfigBodyType(PolicyType.JSON);
- fixture.setDynamicRuleAlgorithmField1(new LinkedList<String>());
- fixture.setPriority("");
- fixture.setActionPerformer("");
- fixture.setConfigBody("");
- String policyName = "";
- String firewallJson = "";
- UUID requestID = UUID.randomUUID();
-
- fixture.setConfigFirewallPolicyParameters(policyName, firewallJson, requestID);
-
- // add additional test code here
- }
-
- /**
- * Run the void setConfigName(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetConfigName_1()
- throws Exception {
- PolicyParameters fixture = new PolicyParameters();
- fixture.setRequestID(UUID.randomUUID());
- fixture.setActionAttribute("");
- fixture.setAttributes(new Hashtable<AttributeType, Map<String, String>>());
- fixture.setDynamicRuleAlgorithmLabels(new LinkedList<String>());
- fixture.setPolicyDescription("");
-
- fixture.setPolicyConfigType(PolicyConfigType.BRMS_PARAM);
- fixture.setDynamicRuleAlgorithmField2(new LinkedList<String>());
- fixture.setPolicyName("");
- fixture.setConfigName("");
- fixture.setDynamicRuleAlgorithmFunctions(new LinkedList<String>());
- fixture.setPolicyClass(PolicyClass.Action);
- fixture.setEcompName("");
- fixture.setConfigBodyType(PolicyType.JSON);
- fixture.setDynamicRuleAlgorithmField1(new LinkedList<String>());
- fixture.setPriority("");
- fixture.setActionPerformer("");
- fixture.setConfigBody("");
- String configName = "";
-
- fixture.setConfigName(configName);
-
- // add additional test code here
- }
-
- /**
- * Run the void setConfigPolicyParameters(PolicyConfigType,String,String,String,String,Map<AttributeType,Map<String,String>>,PolicyType,String,UUID) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetConfigPolicyParameters_1()
- throws Exception {
- PolicyParameters fixture = new PolicyParameters();
- fixture.setRequestID(UUID.randomUUID());
- fixture.setActionAttribute("");
- fixture.setAttributes(new Hashtable<AttributeType, Map<String, String>>());
- fixture.setDynamicRuleAlgorithmLabels(new LinkedList<String>());
- fixture.setPolicyDescription("");
-
- fixture.setPolicyConfigType(PolicyConfigType.BRMS_PARAM);
- fixture.setDynamicRuleAlgorithmField2(new LinkedList<String>());
- fixture.setPolicyName("");
- fixture.setConfigName("");
- fixture.setDynamicRuleAlgorithmFunctions(new LinkedList<String>());
- fixture.setPolicyClass(PolicyClass.Action);
- fixture.setEcompName("");
- fixture.setConfigBodyType(PolicyType.JSON);
- fixture.setDynamicRuleAlgorithmField1(new LinkedList<String>());
- fixture.setPriority("");
- fixture.setActionPerformer("");
- fixture.setConfigBody("");
- PolicyConfigType policyConfigType = PolicyConfigType.BRMS_PARAM;
- String policyName = "";
- String policyDescription = "";
- String ecompName = "";
- String configName = "";
- Map<AttributeType, Map<String, String>> attributes = new Hashtable<AttributeType, Map<String, String>>();
- PolicyType configBodyType = PolicyType.JSON;
- String configBody = "";
- UUID requestID = UUID.randomUUID();
-
- fixture.setConfigPolicyParameters(policyConfigType, policyName, policyDescription, ecompName, configName, attributes, configBodyType, configBody, requestID);
-
- // add additional test code here
- }
-
- /**
- * Run the void setDynamicRuleAlgorithmField1(List<String>) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetDynamicRuleAlgorithmField1_1()
- throws Exception {
- PolicyParameters fixture = new PolicyParameters();
- fixture.setRequestID(UUID.randomUUID());
- fixture.setActionAttribute("");
- fixture.setAttributes(new Hashtable<AttributeType, Map<String, String>>());
- fixture.setDynamicRuleAlgorithmLabels(new LinkedList<String>());
- fixture.setPolicyDescription("");
-
- fixture.setPolicyConfigType(PolicyConfigType.BRMS_PARAM);
- fixture.setDynamicRuleAlgorithmField2(new LinkedList<String>());
- fixture.setPolicyName("");
- fixture.setConfigName("");
- fixture.setDynamicRuleAlgorithmFunctions(new LinkedList<String>());
- fixture.setPolicyClass(PolicyClass.Action);
- fixture.setEcompName("");
- fixture.setConfigBodyType(PolicyType.JSON);
- fixture.setDynamicRuleAlgorithmField1(new LinkedList<String>());
- fixture.setPriority("");
- fixture.setActionPerformer("");
- fixture.setConfigBody("");
- List<String> dynamicRuleAlgorithmField1 = new LinkedList<String>();
-
- fixture.setDynamicRuleAlgorithmField1(dynamicRuleAlgorithmField1);
-
- // add additional test code here
- }
-
- /**
- * Run the void setDynamicRuleAlgorithmField2(List<String>) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetDynamicRuleAlgorithmField2_1()
- throws Exception {
- PolicyParameters fixture = new PolicyParameters();
- fixture.setRequestID(UUID.randomUUID());
- fixture.setActionAttribute("");
- fixture.setAttributes(new Hashtable<AttributeType, Map<String, String>>());
- fixture.setDynamicRuleAlgorithmLabels(new LinkedList<String>());
- fixture.setPolicyDescription("");
-
- fixture.setPolicyConfigType(PolicyConfigType.BRMS_PARAM);
- fixture.setDynamicRuleAlgorithmField2(new LinkedList<String>());
- fixture.setPolicyName("");
- fixture.setConfigName("");
- fixture.setDynamicRuleAlgorithmFunctions(new LinkedList<String>());
- fixture.setPolicyClass(PolicyClass.Action);
- fixture.setEcompName("");
- fixture.setConfigBodyType(PolicyType.JSON);
- fixture.setDynamicRuleAlgorithmField1(new LinkedList<String>());
- fixture.setPriority("");
- fixture.setActionPerformer("");
- fixture.setConfigBody("");
- List<String> dynamicRuleAlgorithmField2 = new LinkedList<String>();
-
- fixture.setDynamicRuleAlgorithmField2(dynamicRuleAlgorithmField2);
-
- // add additional test code here
- }
-
- /**
- * Run the void setDynamicRuleAlgorithmFunctions(List<String>) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetDynamicRuleAlgorithmFunctions_1()
- throws Exception {
- PolicyParameters fixture = new PolicyParameters();
- fixture.setRequestID(UUID.randomUUID());
- fixture.setActionAttribute("");
- fixture.setAttributes(new Hashtable<AttributeType, Map<String, String>>());
- fixture.setDynamicRuleAlgorithmLabels(new LinkedList<String>());
- fixture.setPolicyDescription("");
-
- fixture.setPolicyConfigType(PolicyConfigType.BRMS_PARAM);
- fixture.setDynamicRuleAlgorithmField2(new LinkedList<String>());
- fixture.setPolicyName("");
- fixture.setConfigName("");
- fixture.setDynamicRuleAlgorithmFunctions(new LinkedList<String>());
- fixture.setPolicyClass(PolicyClass.Action);
- fixture.setEcompName("");
- fixture.setConfigBodyType(PolicyType.JSON);
- fixture.setDynamicRuleAlgorithmField1(new LinkedList<String>());
- fixture.setPriority("");
- fixture.setActionPerformer("");
- fixture.setConfigBody("");
- List<String> dynamicRuleAlgorithmFunctions = new LinkedList<String>();
-
- fixture.setDynamicRuleAlgorithmFunctions(dynamicRuleAlgorithmFunctions);
-
- // add additional test code here
- }
-
- /**
- * Run the void setDynamicRuleAlgorithmLabels(List<String>) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetDynamicRuleAlgorithmLabels_1()
- throws Exception {
- PolicyParameters fixture = new PolicyParameters();
- fixture.setRequestID(UUID.randomUUID());
- fixture.setActionAttribute("");
- fixture.setAttributes(new Hashtable<AttributeType, Map<String, String>>());
- fixture.setDynamicRuleAlgorithmLabels(new LinkedList<String>());
- fixture.setPolicyDescription("");
-
- fixture.setPolicyConfigType(PolicyConfigType.BRMS_PARAM);
- fixture.setDynamicRuleAlgorithmField2(new LinkedList<String>());
- fixture.setPolicyName("");
- fixture.setConfigName("");
- fixture.setDynamicRuleAlgorithmFunctions(new LinkedList<String>());
- fixture.setPolicyClass(PolicyClass.Action);
- fixture.setEcompName("");
- fixture.setConfigBodyType(PolicyType.JSON);
- fixture.setDynamicRuleAlgorithmField1(new LinkedList<String>());
- fixture.setPriority("");
- fixture.setActionPerformer("");
- fixture.setConfigBody("");
- List<String> dynamicRuleAlgorithmLabels = new LinkedList<String>();
-
- fixture.setDynamicRuleAlgorithmLabels(dynamicRuleAlgorithmLabels);
-
- // add additional test code here
- }
-
- /**
- * Run the void setEcompName(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetEcompName_1()
- throws Exception {
- PolicyParameters fixture = new PolicyParameters();
- fixture.setRequestID(UUID.randomUUID());
- fixture.setActionAttribute("");
- fixture.setAttributes(new Hashtable<AttributeType, Map<String, String>>());
- fixture.setDynamicRuleAlgorithmLabels(new LinkedList<String>());
- fixture.setPolicyDescription("");
-
- fixture.setPolicyConfigType(PolicyConfigType.BRMS_PARAM);
- fixture.setDynamicRuleAlgorithmField2(new LinkedList<String>());
- fixture.setPolicyName("");
- fixture.setConfigName("");
- fixture.setDynamicRuleAlgorithmFunctions(new LinkedList<String>());
- fixture.setPolicyClass(PolicyClass.Action);
- fixture.setEcompName("");
- fixture.setConfigBodyType(PolicyType.JSON);
- fixture.setDynamicRuleAlgorithmField1(new LinkedList<String>());
- fixture.setPriority("");
- fixture.setActionPerformer("");
- fixture.setConfigBody("");
- String ecompName = "";
-
- fixture.setEcompName(ecompName);
-
- // add additional test code here
- }
-
- /**
- * Run the void setPolicyClass(PolicyClass) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetPolicyClass_1()
- throws Exception {
- PolicyParameters fixture = new PolicyParameters();
- fixture.setRequestID(UUID.randomUUID());
- fixture.setActionAttribute("");
- fixture.setAttributes(new Hashtable<AttributeType, Map<String, String>>());
- fixture.setDynamicRuleAlgorithmLabels(new LinkedList<String>());
- fixture.setPolicyDescription("");
-
- fixture.setPolicyConfigType(PolicyConfigType.BRMS_PARAM);
- fixture.setDynamicRuleAlgorithmField2(new LinkedList<String>());
- fixture.setPolicyName("");
- fixture.setConfigName("");
- fixture.setDynamicRuleAlgorithmFunctions(new LinkedList<String>());
- fixture.setPolicyClass(PolicyClass.Action);
- fixture.setEcompName("");
- fixture.setConfigBodyType(PolicyType.JSON);
- fixture.setDynamicRuleAlgorithmField1(new LinkedList<String>());
- fixture.setPriority("");
- fixture.setActionPerformer("");
- fixture.setConfigBody("");
- PolicyClass policyClass = PolicyClass.Action;
-
- fixture.setPolicyClass(policyClass);
-
- // add additional test code here
- }
-
- /**
- * Run the void setPolicyConfigType(PolicyConfigType) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetPolicyConfigType_1()
- throws Exception {
- PolicyParameters fixture = new PolicyParameters();
- fixture.setRequestID(UUID.randomUUID());
- fixture.setActionAttribute("");
- fixture.setAttributes(new Hashtable<AttributeType, Map<String, String>>());
- fixture.setDynamicRuleAlgorithmLabels(new LinkedList<String>());
- fixture.setPolicyDescription("");
-
- fixture.setPolicyConfigType(PolicyConfigType.BRMS_PARAM);
- fixture.setDynamicRuleAlgorithmField2(new LinkedList<String>());
- fixture.setPolicyName("");
- fixture.setConfigName("");
- fixture.setDynamicRuleAlgorithmFunctions(new LinkedList<String>());
- fixture.setPolicyClass(PolicyClass.Action);
- fixture.setEcompName("");
- fixture.setConfigBodyType(PolicyType.JSON);
- fixture.setDynamicRuleAlgorithmField1(new LinkedList<String>());
- fixture.setPriority("");
- fixture.setActionPerformer("");
- fixture.setConfigBody("");
- PolicyConfigType policyConfigType = PolicyConfigType.BRMS_PARAM;
-
- fixture.setPolicyConfigType(policyConfigType);
-
- // add additional test code here
- }
-
- /**
- * Run the void setPolicyDescription(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetPolicyDescription_1()
- throws Exception {
- PolicyParameters fixture = new PolicyParameters();
- fixture.setRequestID(UUID.randomUUID());
- fixture.setActionAttribute("");
- fixture.setAttributes(new Hashtable<AttributeType, Map<String, String>>());
- fixture.setDynamicRuleAlgorithmLabels(new LinkedList<String>());
- fixture.setPolicyDescription("");
-
- fixture.setPolicyConfigType(PolicyConfigType.BRMS_PARAM);
- fixture.setDynamicRuleAlgorithmField2(new LinkedList<String>());
- fixture.setPolicyName("");
- fixture.setConfigName("");
- fixture.setDynamicRuleAlgorithmFunctions(new LinkedList<String>());
- fixture.setPolicyClass(PolicyClass.Action);
- fixture.setEcompName("");
- fixture.setConfigBodyType(PolicyType.JSON);
- fixture.setDynamicRuleAlgorithmField1(new LinkedList<String>());
- fixture.setPriority("");
- fixture.setActionPerformer("");
- fixture.setConfigBody("");
- String policyDescription = "";
-
- fixture.setPolicyDescription(policyDescription);
-
- // add additional test code here
- }
-
- /**
- * Run the void setPolicyName(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetPolicyName_1()
- throws Exception {
- PolicyParameters fixture = new PolicyParameters();
- fixture.setRequestID(UUID.randomUUID());
- fixture.setActionAttribute("");
- fixture.setAttributes(new Hashtable<AttributeType, Map<String, String>>());
- fixture.setDynamicRuleAlgorithmLabels(new LinkedList<String>());
- fixture.setPolicyDescription("");
-
- fixture.setPolicyConfigType(PolicyConfigType.BRMS_PARAM);
- fixture.setDynamicRuleAlgorithmField2(new LinkedList<String>());
- fixture.setPolicyName("");
- fixture.setConfigName("");
- fixture.setDynamicRuleAlgorithmFunctions(new LinkedList<String>());
- fixture.setPolicyClass(PolicyClass.Action);
- fixture.setEcompName("");
- fixture.setConfigBodyType(PolicyType.JSON);
- fixture.setDynamicRuleAlgorithmField1(new LinkedList<String>());
- fixture.setPriority("");
- fixture.setActionPerformer("");
- fixture.setConfigBody("");
- String policyName = "";
-
- fixture.setPolicyName(policyName);
-
- // add additional test code here
- }
-
- /**
- * Run the void setPriority(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetPriority_1()
- throws Exception {
- PolicyParameters fixture = new PolicyParameters();
- fixture.setRequestID(UUID.randomUUID());
- fixture.setActionAttribute("");
- fixture.setAttributes(new Hashtable<AttributeType, Map<String, String>>());
- fixture.setDynamicRuleAlgorithmLabels(new LinkedList<String>());
- fixture.setPolicyDescription("");
-
- fixture.setPolicyConfigType(PolicyConfigType.BRMS_PARAM);
- fixture.setDynamicRuleAlgorithmField2(new LinkedList<String>());
- fixture.setPolicyName("");
- fixture.setConfigName("");
- fixture.setDynamicRuleAlgorithmFunctions(new LinkedList<String>());
- fixture.setPolicyClass(PolicyClass.Action);
- fixture.setEcompName("");
- fixture.setConfigBodyType(PolicyType.JSON);
- fixture.setDynamicRuleAlgorithmField1(new LinkedList<String>());
- fixture.setPriority("");
- fixture.setActionPerformer("");
- fixture.setConfigBody("");
- String priority = "";
-
- fixture.setPriority(priority);
-
- // add additional test code here
- }
-
- /**
- * Run the void setRequestID(UUID) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testSetRequestID_1()
- throws Exception {
- PolicyParameters fixture = new PolicyParameters();
- fixture.setRequestID(UUID.randomUUID());
- fixture.setActionAttribute("");
- fixture.setAttributes(new Hashtable<AttributeType, Map<String, String>>());
- fixture.setDynamicRuleAlgorithmLabels(new LinkedList<String>());
- fixture.setPolicyDescription("");
-
- fixture.setPolicyConfigType(PolicyConfigType.BRMS_PARAM);
- fixture.setDynamicRuleAlgorithmField2(new LinkedList<String>());
- fixture.setPolicyName("");
- fixture.setConfigName("");
- fixture.setDynamicRuleAlgorithmFunctions(new LinkedList<String>());
- fixture.setPolicyClass(PolicyClass.Action);
- fixture.setEcompName("");
- fixture.setConfigBodyType(PolicyType.JSON);
- fixture.setDynamicRuleAlgorithmField1(new LinkedList<String>());
- fixture.setPriority("");
- fixture.setActionPerformer("");
- fixture.setConfigBody("");
- UUID requestID = UUID.randomUUID();
-
- fixture.setRequestID(requestID);
-
- // add additional test code here
- }
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(PolicyParametersTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyResponseStatusTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyResponseStatusTest.java
deleted file mode 100644
index 5841571bd..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyResponseStatusTest.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import org.junit.*;
-import org.openecomp.policy.api.PolicyResponseStatus;
-
-import static org.junit.Assert.*;
-
-/**
- * The class <code>PolicyResponseStatusTest</code> contains tests for the class <code>{@link PolicyResponseStatus}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- * @version $Revision: 1.0 $
- */
-public class PolicyResponseStatusTest {
- /**
- * Run the PolicyResponseStatus getStatus(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetStatus_1()
- throws Exception {
- String responseStatus = "";
-
- PolicyResponseStatus result = PolicyResponseStatus.getStatus(responseStatus);
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("no_action", result.toString());
- assertEquals("NO_ACTION_REQUIRED", result.name());
- assertEquals(0, result.ordinal());
- }
-
- /**
- * Run the PolicyResponseStatus getStatus(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetStatus_2()
- throws Exception {
- String responseStatus = "";
-
- PolicyResponseStatus result = PolicyResponseStatus.getStatus(responseStatus);
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("no_action", result.toString());
- assertEquals("NO_ACTION_REQUIRED", result.name());
- assertEquals(0, result.ordinal());
- }
-
- /**
- * Run the PolicyResponseStatus getStatus(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testGetStatus_3()
- throws Exception {
- String responseStatus = "";
-
- PolicyResponseStatus result = PolicyResponseStatus.getStatus(responseStatus);
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("no_action", result.toString());
- assertEquals("NO_ACTION_REQUIRED", result.name());
- assertEquals(0, result.ordinal());
- }
-
- /**
- * Run the String toString() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testToString_1()
- throws Exception {
- PolicyResponseStatus fixture = PolicyResponseStatus.ACTION_ADVISED;
-
- String result = fixture.toString();
-
- // add additional test code here
- assertEquals("action_advised", result);
- }
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(PolicyResponseStatusTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyResponseTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyResponseTest.java
deleted file mode 100644
index ec6ac09f0..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyResponseTest.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import org.junit.After;
-import org.junit.Before;
-import org.openecomp.policy.api.PolicyResponse;
-
-/**
- * The class <code>PolicyResponseTest</code> contains tests for the class <code>{@link PolicyResponse}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- * @version $Revision: 1.0 $
- */
-public class PolicyResponseTest {
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(PolicyResponseTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyTypeTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyTypeTest.java
deleted file mode 100644
index 5b31e857b..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PolicyTypeTest.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import org.junit.*;
-import org.openecomp.policy.api.PolicyType;
-
-import static org.junit.Assert.*;
-
-/**
- * The class <code>PolicyTypeTest</code> contains tests for the class <code>{@link PolicyType}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- * @version $Revision: 1.0 $
- */
-public class PolicyTypeTest {
- /**
- * Run the String toString() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Test
- public void testToString_1()
- throws Exception {
- PolicyType fixture = PolicyType.JSON;
-
- String result = fixture.toString();
-
- // add additional test code here
- assertEquals("json", result);
- }
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:41 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(PolicyTypeTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PushPolicyParametersTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PushPolicyParametersTest.java
deleted file mode 100644
index ef005f1f4..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/PushPolicyParametersTest.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import java.util.UUID;
-
-import org.junit.*;
-import org.openecomp.policy.api.PushPolicyParameters;
-
-import static org.junit.Assert.*;
-
-/**
- * The class <code>PushPolicyParametersTest</code> contains tests for the class <code>{@link PushPolicyParameters}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- * @version $Revision: 1.0 $
- */
-public class PushPolicyParametersTest {
- /**
- * Run the PushPolicyParameters() constructor test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testPushPolicyParameters_1()
- throws Exception {
-
- PushPolicyParameters result = new PushPolicyParameters();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals(null, result.getPolicyName());
- assertEquals(null, result.getRequestID());
- assertEquals(null, result.getPolicyType());
- assertEquals(null, result.getPdpGroup());
- }
-
- /**
- * Run the PushPolicyParameters(String,String,String,UUID) constructor test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testPushPolicyParameters_2()
- throws Exception {
- String policyName = "";
- String policyType = "";
- String pdpGroup = "";
- UUID requestID = UUID.randomUUID();
-
- PushPolicyParameters result = new PushPolicyParameters(policyName, policyType, pdpGroup, requestID);
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("", result.getPolicyName());
- assertEquals("", result.getPolicyType());
- assertEquals("", result.getPdpGroup());
- }
-
- /**
- * Run the String getPdpGroup() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetPdpGroup_1()
- throws Exception {
- PushPolicyParameters fixture = new PushPolicyParameters("", "", "", UUID.randomUUID());
-
- String result = fixture.getPdpGroup();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the String getPolicyName() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetPolicyName_1()
- throws Exception {
- PushPolicyParameters fixture = new PushPolicyParameters("", "", "", UUID.randomUUID());
-
- String result = fixture.getPolicyName();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the String getPolicyType() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetPolicyType_1()
- throws Exception {
- PushPolicyParameters fixture = new PushPolicyParameters("", "", "", UUID.randomUUID());
-
- String result = fixture.getPolicyType();
-
- // add additional test code here
- assertEquals("", result);
- }
-
- /**
- * Run the UUID getRequestID() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testGetRequestID()
- throws Exception {
- PushPolicyParameters fixture = new PushPolicyParameters("", "", "", UUID.fromString("d1dbaac1-0944-4f07-9ce7-733c697537ea"));
-
- UUID result = fixture.getRequestID();
-
- // add additional test code here
- assertNotNull(result);
- assertEquals("d1dbaac1-0944-4f07-9ce7-733c697537ea", result.toString());
- assertEquals(4, result.version());
- assertEquals(2, result.variant());
- assertEquals(-7140611980868110358L, result.getLeastSignificantBits());
- assertEquals(-3324876153822097657L, result.getMostSignificantBits());
- }
-
- /**
- * Run the void setPdpGroup(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetPdpGroup_1()
- throws Exception {
- PushPolicyParameters fixture = new PushPolicyParameters("", "", "", UUID.randomUUID());
- String pdpGroup = "";
-
- fixture.setPdpGroup(pdpGroup);
-
- // add additional test code here
- }
-
- /**
- * Run the void setPolicyName(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetPolicyName_1()
- throws Exception {
- PushPolicyParameters fixture = new PushPolicyParameters("", "", "", UUID.randomUUID());
- String policyName = "";
-
- fixture.setPolicyName(policyName);
-
- // add additional test code here
- }
-
- /**
- * Run the void setPolicyType(String) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetPolicyType_1()
- throws Exception {
- PushPolicyParameters fixture = new PushPolicyParameters("", "", "", UUID.randomUUID());
- String policyType = "";
-
- fixture.setPolicyType(policyType);
-
- // add additional test code here
- }
-
- /**
- * Run the void setRequestID(UUID) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Test
- public void testSetRequestID_1()
- throws Exception {
- PushPolicyParameters fixture = new PushPolicyParameters("", "", "", UUID.randomUUID());
- UUID requestID = UUID.randomUUID();
-
- fixture.setRequestID(requestID);
-
- // add additional test code here
- }
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(PushPolicyParametersTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/RemovedPolicyTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/RemovedPolicyTest.java
deleted file mode 100644
index ef77e6d5f..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/RemovedPolicyTest.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import org.junit.After;
-import org.junit.Before;
-import org.openecomp.policy.api.RemovedPolicy;
-
-/**
- * The class <code>RemovedPolicyTest</code> contains tests for the class <code>{@link RemovedPolicy}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- * @version $Revision: 1.0 $
- */
-public class RemovedPolicyTest {
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:40 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(RemovedPolicyTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/SendEventTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/SendEventTest.java
deleted file mode 100644
index 5757f8915..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/SendEventTest.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.fail;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.junit.Before;
-import org.openecomp.policy.api.PolicyEngine;
-import org.openecomp.policy.api.PolicyEngineException;
-import org.openecomp.policy.api.PolicyEventException;
-import org.openecomp.policy.api.PolicyResponse;
-import org.openecomp.policy.api.PolicyResponseStatus;
-import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
-import org.openecomp.policy.common.logging.flexlogger.Logger;
-
-public class SendEventTest {
-
- private PolicyEngine policyEngine = null;
- private Map<String,String> eventAttributes = new HashMap<String,String>();
- private Collection<PolicyResponse> policyResponse = null;
- private static final Logger logger = FlexLogger.getLogger(SendEventTest.class);
- @Before
- public void setUp() {
- try {
- policyEngine = new PolicyEngine("Test/config_pass.properties");
- } catch (PolicyEngineException e) {
- logger.error(e.getMessage());
- fail("PolicyEngine Instantiation Error" + e);
- }
- logger.info("Loaded.. PolicyEngine");
- }
-
- //@Test
- @SuppressWarnings("deprecation")
- public void testSendEventFail() {
- eventAttributes = null;
- try {
- policyResponse = policyEngine.sendEvent(eventAttributes);
- } catch (PolicyEventException e) {
- logger.warn(e.getMessage());
- }
- assertNull(policyResponse);
- }
-
- //@Test
- @SuppressWarnings("deprecation")
- public void testSendEventFailNull() {
- eventAttributes.put("", "");
- try {
- policyResponse = policyEngine.sendEvent(eventAttributes);
- } catch (PolicyEventException e) {
- logger.warn(e.getMessage());
- }
- assertNull(policyResponse);
- }
-
- // deprecated Test.
- /*@Test
- public void testSendEventFailAttribute() {
- eventAttributes.put("Fail.key", "Value");
- try {
- policyResponse = policyEngine.sendEvent(eventAttributes);
- } catch (PolicyEventException e) {
- logger.warn(e.getMessage());
- }
- assertNull(policyResponse.getPolicyResponseMessage());
- }*/
-
- //@Test
- @SuppressWarnings("deprecation")
- public void testSendEventNotValid() {
- eventAttributes.put("Action.fail", "Value");
- try {
- policyResponse = policyEngine.sendEvent(eventAttributes);
- } catch (PolicyEventException e) {
- logger.warn(e.getMessage());
- }
- for(PolicyResponse policyResponse: this.policyResponse){
- logger.info(policyResponse.getPolicyResponseMessage() + " , " + policyResponse.getPolicyResponseStatus());
- assertNotNull(policyResponse);
- assertEquals(PolicyResponseStatus.NO_ACTION_REQUIRED, policyResponse.getPolicyResponseStatus());
- assertNotNull(policyResponse.getPolicyResponseMessage());
- assertNotNull(policyResponse.getRequestAttributes());
- assertNull(policyResponse.getActionTaken());
- assertNull(policyResponse.getActionAdvised());
- }
- }
-
- //@Test
- @SuppressWarnings("deprecation")
- public void testSendEventActionAdvised() {
- eventAttributes.put("Key", "Value");
- eventAttributes.put("cpu", "80");
- try {
- policyResponse = policyEngine.sendEvent(eventAttributes);
- } catch (PolicyEventException e) {
- logger.warn(e.getMessage());
- }
- for(PolicyResponse policyResponse: this.policyResponse){
- logger.info(policyResponse.getPolicyResponseMessage() + " , " + policyResponse.getPolicyResponseStatus());
- assertNotNull(policyResponse);
- assertEquals(PolicyResponseStatus.ACTION_ADVISED, policyResponse.getPolicyResponseStatus());
- assertNotNull(policyResponse.getPolicyResponseMessage());
- assertNotNull(policyResponse.getRequestAttributes());
- assertNull(policyResponse.getActionTaken());
- assertNotNull(policyResponse.getActionAdvised());
- }
- }
-
- //@Test
- @SuppressWarnings("deprecation")
- public void testSendEventActionTaken() {
- eventAttributes.put("Key", "Value");
- eventAttributes.put("cpu", "91");
- try {
- policyResponse = policyEngine.sendEvent(eventAttributes);
- } catch (PolicyEventException e) {
- logger.warn(e.getMessage());
- }
- for(PolicyResponse policyResponse: this.policyResponse){
- logger.info(policyResponse.getPolicyResponseMessage() + " , " + policyResponse.getPolicyResponseStatus());
- assertNotNull(policyResponse);
- assertEquals(PolicyResponseStatus.ACTION_TAKEN, policyResponse.getPolicyResponseStatus());
- assertNotNull(policyResponse.getPolicyResponseMessage());
- assertNotNull(policyResponse.getRequestAttributes());
- assertNotNull(policyResponse.getActionTaken());
- assertNull(policyResponse.getActionAdvised());
- }
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/TestRunner.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/TestRunner.java
deleted file mode 100644
index 69cbd834e..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/TestRunner.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import org.junit.runner.JUnitCore;
-import org.junit.runner.Result;
-import org.junit.runner.notification.Failure;
-
-public class TestRunner {
- public static void main(String[] args) {
- Result result = JUnitCore.runClasses(PolicyEngineTest.class);
- for(Failure failure: result.getFailures()) {
- System.out.println("Failed Test: " + failure.toString());
- }
- Result results = null;
- if(result.wasSuccessful()) {
- System.out.println("API Methods are being Tested.. ");
- results = JUnitCore.runClasses(GetConfigByPolicyNameTest.class, GetConfigStringTest.class,GetConfigStringStringTest.class,GetConfigStringStringMapTest.class,SendEventTest.class);
- for(Failure failure: results.getFailures()) {
- System.out.println("Failed Test: " + failure.toString());
- }
- System.out.println("Test Results.. ");
- System.out.println("Stats: \nRun Time: " + (results.getRunTime()+result.getRunTime()) + "\nTotal Tests:" + results.getRunCount()+ result.getRunCount()
- + "\nFailures: " + results.getFailureCount()+ result.getFailureCount());
- System.exit(1);
- }
- System.out.println("Test Failed..");
- System.out.println("Stats: \nRun Time: " + result.getRunTime() + "\nTests:" + result.getRunCount()
- + "\nFailures: " + result.getFailureCount());
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/UpdateTypeTest.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/UpdateTypeTest.java
deleted file mode 100644
index 909a05f0e..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/UpdateTypeTest.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.policy.test;
-
-import org.junit.*;
-import org.openecomp.policy.api.UpdateType;
-
-import static org.junit.Assert.*;
-
-/**
- * The class <code>UpdateTypeTest</code> contains tests for the class <code>{@link UpdateType}</code>.
- *
- * @generatedBy CodePro at 6/1/16 1:39 PM
- * @version $Revision: 1.0 $
- */
-public class UpdateTypeTest {
- /**
- * Run the String toString() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 6/1/16 1:39 PM
- */
- @Test
- public void testToString_1()
- throws Exception {
- UpdateType fixture = UpdateType.NEW;
-
- String result = fixture.toString();
-
- // add additional test code here
- assertEquals("new", result);
- }
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:39 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 6/1/16 1:39 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/1/16 1:39 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(UpdateTypeTest.class);
- }
-}
diff --git a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/package-info.java b/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/package-info.java
deleted file mode 100644
index e678c4be2..000000000
--- a/PolicyEngineAPI/src/test/java/org/openecomp/policy/test/package-info.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * PolicyEngineAPI
- * ================================================================================
- * Copyright (C) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-/**
- * API JUNIT TestCases.
- */
-package org.openecomp.policy.test;