summaryrefslogtreecommitdiffstats
path: root/policy-core/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'policy-core/src/test')
-rw-r--r--policy-core/src/test/java/org/onap/policy/drools/core/DroolsContainerTest.java22
-rw-r--r--policy-core/src/test/java/org/onap/policy/drools/core/PolicySessionFeatureApiMock.java (renamed from policy-core/src/test/java/org/onap/policy/drools/core/PolicySessionFeatureApiTest.java)2
-rw-r--r--policy-core/src/test/resources/META-INF/services/org.onap.policy.drools.core.PolicySessionFeatureAPI2
3 files changed, 13 insertions, 13 deletions
diff --git a/policy-core/src/test/java/org/onap/policy/drools/core/DroolsContainerTest.java b/policy-core/src/test/java/org/onap/policy/drools/core/DroolsContainerTest.java
index d2d0dec2..76fa1350 100644
--- a/policy-core/src/test/java/org/onap/policy/drools/core/DroolsContainerTest.java
+++ b/policy-core/src/test/java/org/onap/policy/drools/core/DroolsContainerTest.java
@@ -67,12 +67,12 @@ public class DroolsContainerTest {
@Test
public void createAndUpdate() throws Exception {
// make sure feature log starts out clean
- PolicySessionFeatureApiTest.getLog();
+ PolicySessionFeatureApiMock.getLog();
// run 'globalInit', and verify expected feature hook fired
PolicyContainer.globalInit(new String[0]);
assertEquals(Arrays.asList("globalInit"),
- PolicySessionFeatureApiTest.getLog());
+ PolicySessionFeatureApiMock.getLog());
// initial conditions -- there should be no containers
assertEquals(0, PolicyContainer.getPolicyContainers().size());
@@ -88,7 +88,7 @@ public class DroolsContainerTest {
assertEquals(Arrays.asList("activatePolicySession",
"newPolicySession",
"selectThreadModel"),
- PolicySessionFeatureApiTest.getLog());
+ PolicySessionFeatureApiMock.getLog());
// this container should be on the list
{
@@ -137,7 +137,7 @@ public class DroolsContainerTest {
// verify expected feature hooks fired
assertEquals(Arrays.asList("selectThreadModel"),
- PolicySessionFeatureApiTest.getLog());
+ PolicySessionFeatureApiMock.getLog());
// verify new container attributes
assertEquals("org.onap.policy.drools-pdp:drools-artifact1:17.2.0-SNAPSHOT",
@@ -163,7 +163,7 @@ public class DroolsContainerTest {
// verify expected feature hooks fired
assertEquals(Arrays.asList("disposeKieSession"),
- PolicySessionFeatureApiTest.getLog());
+ PolicySessionFeatureApiMock.getLog());
}
// final conditions -- there should be no containers
@@ -179,15 +179,15 @@ public class DroolsContainerTest {
@Test
public void versionList() throws Exception {
// make sure feature log starts out clean
- PolicySessionFeatureApiTest.getLog();
+ PolicySessionFeatureApiMock.getLog();
// trigger exceptions in all feature hooks
- PolicySessionFeatureApiTest.setExceptionTrigger(true);
+ PolicySessionFeatureApiMock.setExceptionTrigger(true);
// run 'globalInit', and verify expected feature hook fired
PolicyContainer.globalInit(new String[0]);
assertEquals(Arrays.asList("globalInit-exception"),
- PolicySessionFeatureApiTest.getLog());
+ PolicySessionFeatureApiMock.getLog());
// initial conditions -- there should be no containers
assertEquals(0, PolicyContainer.getPolicyContainers().size());
@@ -208,7 +208,7 @@ public class DroolsContainerTest {
assertEquals(Arrays.asList("activatePolicySession-exception",
"newPolicySession-exception",
"selectThreadModel-exception"),
- PolicySessionFeatureApiTest.getLog());
+ PolicySessionFeatureApiMock.getLog());
// this container should be on the list
{
@@ -292,10 +292,10 @@ public class DroolsContainerTest {
// verify expected feature hooks fired
assertEquals(Arrays.asList("destroyKieSession-exception"),
- PolicySessionFeatureApiTest.getLog());
+ PolicySessionFeatureApiMock.getLog());
// clear exception trigger
- PolicySessionFeatureApiTest.setExceptionTrigger(false);
+ PolicySessionFeatureApiMock.setExceptionTrigger(false);
}
// final conditions -- there should be no containers
diff --git a/policy-core/src/test/java/org/onap/policy/drools/core/PolicySessionFeatureApiTest.java b/policy-core/src/test/java/org/onap/policy/drools/core/PolicySessionFeatureApiMock.java
index aef4e265..d838f6bd 100644
--- a/policy-core/src/test/java/org/onap/policy/drools/core/PolicySessionFeatureApiTest.java
+++ b/policy-core/src/test/java/org/onap/policy/drools/core/PolicySessionFeatureApiMock.java
@@ -28,7 +28,7 @@ import org.kie.api.runtime.KieSession;
* 'PolicySessionFeatureAPI', and providing a means to indicate
* which hooks have been invoked.
*/
-public class PolicySessionFeatureApiTest implements PolicySessionFeatureAPI {
+public class PolicySessionFeatureApiMock implements PolicySessionFeatureAPI {
// contains the log entries since the most recent 'getLog()' call
private static ArrayList<String> log = new ArrayList<>();
diff --git a/policy-core/src/test/resources/META-INF/services/org.onap.policy.drools.core.PolicySessionFeatureAPI b/policy-core/src/test/resources/META-INF/services/org.onap.policy.drools.core.PolicySessionFeatureAPI
index 6bc87035..3af9beea 100644
--- a/policy-core/src/test/resources/META-INF/services/org.onap.policy.drools.core.PolicySessionFeatureAPI
+++ b/policy-core/src/test/resources/META-INF/services/org.onap.policy.drools.core.PolicySessionFeatureAPI
@@ -1 +1 @@
-org.onap.policy.drools.core.PolicySessionFeatureApiTest
+org.onap.policy.drools.core.PolicySessionFeatureApiMock