diff options
Diffstat (limited to 'feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java')
-rw-r--r-- | feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java index 219aa0fb..7ccbd1f2 100644 --- a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java +++ b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java @@ -76,11 +76,11 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest { assertSame(controllerSupport.getController(), ((PolicyTypeDroolsController) fsm.getController( new ToscaPolicyTypeIdentifier( - ControllerSupport.POLICY_TYPE, ControllerSupport.POLICY_TYPE_VERSION))) + ControllerSupport.POLICY_TYPE_LEGACY_OP, ControllerSupport.POLICY_TYPE_VERSION))) .controllers().get(0)); fsm.stop(controllerSupport.getController()); - assertNull(fsm.getController(new ToscaPolicyTypeIdentifier(ControllerSupport.POLICY_TYPE, + assertNull(fsm.getController(new ToscaPolicyTypeIdentifier(ControllerSupport.POLICY_TYPE_LEGACY_OP, ControllerSupport.POLICY_TYPE_VERSION))); fsm.shutdown(); @@ -211,11 +211,11 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest { assertTrue(fsm.policiesMap.isEmpty()); fsm.start(controllerSupport.getController()); - assertEquals(3, fsm.policyTypesMap.size()); + assertEquals(4, fsm.policyTypesMap.size()); assertTrue(fsm.policiesMap.isEmpty()); assertTrue(fsm.update(update)); - assertEquals(3, fsm.policyTypesMap.size()); + assertEquals(4, fsm.policyTypesMap.size()); assertEquals(1, fsm.policiesMap.size()); assertEquals(fsm.policiesMap.get(toscaPolicy.getIdentifier()), toscaPolicy); assertEquals(PdpState.PASSIVE, fsm.state()); @@ -229,7 +229,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest { update.setPdpSubgroup(null); update.setPolicies(Collections.emptyList()); assertTrue(fsm.update(update)); - assertEquals(3, fsm.policyTypesMap.size()); + assertEquals(4, fsm.policyTypesMap.size()); assertEquals(0, fsm.policiesMap.size()); assertEquals(PdpState.PASSIVE, fsm.state()); assertEquals(interval, fsm.getStatusTimerSeconds()); @@ -241,6 +241,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest { fsm.shutdown(); } + @Test public void testStateChange() throws CoderException, IOException { /* no name */ @@ -269,11 +270,11 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest { controllerSupport.getController().start(); fsm.start(controllerSupport.getController()); - assertEquals(3, fsm.policyTypesMap.size()); + assertEquals(4, fsm.policyTypesMap.size()); assertTrue(fsm.policiesMap.isEmpty()); assertTrue(fsm.update(update)); - assertEquals(3, fsm.policyTypesMap.size()); + assertEquals(4, fsm.policyTypesMap.size()); assertEquals(1, fsm.policiesMap.size()); assertEquals(fsm.policiesMap.get(toscaPolicy.getIdentifier()), toscaPolicy); assertEquals(PdpState.PASSIVE, fsm.state()); |