aboutsummaryrefslogtreecommitdiffstats
path: root/policy-core/src/test
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2018-11-29 09:33:02 -0500
committerJim Hahn <jrh3@att.com>2018-11-29 09:35:21 -0500
commit2808374bda04dbe709253ca079dfb89d5dbea7dd (patch)
tree87eabdbd07e0d3f0cfcc1b81e230026aa713ba73 /policy-core/src/test
parentdbb701d2aae428e27c0590a42e2d371bb9bca59d (diff)
Remove Factory from various drools-pdp classes
Also merged changes from 'Rename test classes in drools-pdp'. Change-Id: I4d0a3a1b0b5523eadf38d1edb5aa86c404b69d19 Issue-ID: POLICY-1288 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'policy-core/src/test')
-rw-r--r--policy-core/src/test/java/org/onap/policy/drools/core/lock/PolicyResourceLockManagerTest.java27
1 files changed, 3 insertions, 24 deletions
diff --git a/policy-core/src/test/java/org/onap/policy/drools/core/lock/PolicyResourceLockManagerTest.java b/policy-core/src/test/java/org/onap/policy/drools/core/lock/PolicyResourceLockManagerTest.java
index 8acafccf..81b52d16 100644
--- a/policy-core/src/test/java/org/onap/policy/drools/core/lock/PolicyResourceLockManagerTest.java
+++ b/policy-core/src/test/java/org/onap/policy/drools/core/lock/PolicyResourceLockManagerTest.java
@@ -37,12 +37,9 @@ import static org.onap.policy.drools.core.lock.TestingUtils.expectException;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
-import org.junit.AfterClass;
import org.junit.Before;
-import org.junit.BeforeClass;
import org.junit.Test;
import org.onap.policy.drools.core.lock.PolicyResourceLockFeatureApi.OperResult;
-import org.onap.policy.drools.core.lock.PolicyResourceLockManager.Factory;
public class PolicyResourceLockManagerTest {
@@ -59,27 +56,12 @@ public class PolicyResourceLockManagerTest {
private static final String OWNER2 = "owner.two";
private static final String OWNER3 = "owner.three";
- /**
- * Saved at the start of the tests and restored once all tests complete.
- */
- private static Factory saveFactory;
-
private PolicyResourceLockFeatureApi impl1;
private PolicyResourceLockFeatureApi impl2;
private List<PolicyResourceLockFeatureApi> implList;
private PolicyResourceLockManager mgr;
- @BeforeClass
- public static void setUpBeforeClass() {
- saveFactory = PolicyResourceLockManager.getFactory();
- }
-
- @AfterClass
- public static void tearDownAfterClass() {
- PolicyResourceLockManager.setFactory(saveFactory);
- }
-
/**
* Set up.
*/
@@ -94,15 +76,12 @@ public class PolicyResourceLockManagerTest {
// list of feature API implementers
implList = new LinkedList<>(Arrays.asList(impl1, impl2));
- PolicyResourceLockManager.setFactory(new Factory() {
-
+ mgr = new PolicyResourceLockManager() {
@Override
- public List<PolicyResourceLockFeatureApi> getImplementers() {
+ protected List<PolicyResourceLockFeatureApi> getImplementers() {
return implList;
}
- });
-
- mgr = new PolicyResourceLockManager();
+ };
}
/**