diff options
Diffstat (limited to 'plugins/plugins-executor')
4 files changed, 25 insertions, 5 deletions
diff --git a/plugins/plugins-executor/plugins-executor-java/src/test/java/org/onap/policy/apex/plugins/executor/java/JavaExecutorParametersTest.java b/plugins/plugins-executor/plugins-executor-java/src/test/java/org/onap/policy/apex/plugins/executor/java/JavaExecutorParametersTest.java index 847146b8b..1e1dbf7ed 100644 --- a/plugins/plugins-executor/plugins-executor-java/src/test/java/org/onap/policy/apex/plugins/executor/java/JavaExecutorParametersTest.java +++ b/plugins/plugins-executor/plugins-executor-java/src/test/java/org/onap/policy/apex/plugins/executor/java/JavaExecutorParametersTest.java @@ -25,7 +25,7 @@ import static org.junit.Assert.assertNotNull; import org.junit.Test; /** - * Test the JavaExecutorParameters class + * Test the JavaExecutorParameters class. */ public class JavaExecutorParametersTest { diff --git a/plugins/plugins-executor/plugins-executor-java/src/test/java/org/onap/policy/apex/plugins/executor/java/JavaStateFinalizerExecutorTest.java b/plugins/plugins-executor/plugins-executor-java/src/test/java/org/onap/policy/apex/plugins/executor/java/JavaStateFinalizerExecutorTest.java index c8522547a..6638e7183 100644 --- a/plugins/plugins-executor/plugins-executor-java/src/test/java/org/onap/policy/apex/plugins/executor/java/JavaStateFinalizerExecutorTest.java +++ b/plugins/plugins-executor/plugins-executor-java/src/test/java/org/onap/policy/apex/plugins/executor/java/JavaStateFinalizerExecutorTest.java @@ -51,6 +51,9 @@ import org.onap.policy.common.parameters.ParameterService; * */ public class JavaStateFinalizerExecutorTest { + /** + * Initiate Parameters. + */ @Before public void initiateParameters() { ParameterService.register(new DistributorParameters()); @@ -59,6 +62,9 @@ public class JavaStateFinalizerExecutorTest { ParameterService.register(new EngineParameters()); } + /** + * Clear down Parameters. + */ @After public void clearParameters() { ParameterService.deregister(ContextParameterConstants.DISTRIBUTOR_GROUP_NAME); @@ -90,9 +96,11 @@ public class JavaStateFinalizerExecutorTest { try { parentStateExcutor = new StateExecutor(new ExecutorFactoryImpl()); } catch (StateMachineException e) { + fail("test should not throw an exception here"); } + AxState state = new AxState(); - parentStateExcutor.setContext(null, state , internalContext); + parentStateExcutor.setContext(null, state, internalContext); AxStateFinalizerLogic stateFinalizerLogic = new AxStateFinalizerLogic(); jsfe.setContext(parentStateExcutor, stateFinalizerLogic, internalContext); @@ -116,7 +124,7 @@ public class JavaStateFinalizerExecutorTest { fail("test should throw an exception here"); } catch (Exception jtseException) { assertEquals("state finalizer logic failed to run for state finalizer \"NULL:0.0.0:NULL:NULL\"", - jtseException.getMessage()); + jtseException.getMessage()); } AxEvent axEvent = new AxEvent(new AxArtifactKey("Event", "0.0.1")); @@ -126,7 +134,7 @@ public class JavaStateFinalizerExecutorTest { fail("test should throw an exception here"); } catch (Exception jtseException) { assertEquals("state finalizer logic failed to run for state finalizer \"NULL:0.0.0:NULL:NULL\"", - jtseException.getMessage()); + jtseException.getMessage()); } stateFinalizerLogic.setLogic("org.onap.policy.apex.plugins.executor.java.DummyJavaStateFinalizerLogic"); @@ -136,7 +144,7 @@ public class JavaStateFinalizerExecutorTest { fail("test should throw an exception here"); } catch (Exception jtseException) { assertEquals("execute-post: state finalizer logic execution failure on state \"NULL:0.0.0:NULL:NULL\" " - + "on finalizer logic NULL:0.0.0:NULL:NULL", jtseException.getMessage()); + + "on finalizer logic NULL:0.0.0:NULL:NULL", jtseException.getMessage()); } state.getStateOutputs().put("SelectedOutputIsMe", null); diff --git a/plugins/plugins-executor/plugins-executor-java/src/test/java/org/onap/policy/apex/plugins/executor/java/JavaTaskExecutorTest.java b/plugins/plugins-executor/plugins-executor-java/src/test/java/org/onap/policy/apex/plugins/executor/java/JavaTaskExecutorTest.java index 74d0c8260..f3ea1ce4d 100644 --- a/plugins/plugins-executor/plugins-executor-java/src/test/java/org/onap/policy/apex/plugins/executor/java/JavaTaskExecutorTest.java +++ b/plugins/plugins-executor/plugins-executor-java/src/test/java/org/onap/policy/apex/plugins/executor/java/JavaTaskExecutorTest.java @@ -45,6 +45,9 @@ import org.onap.policy.common.parameters.ParameterService; * */ public class JavaTaskExecutorTest { + /** + * Initiate Parameters. + */ @Before public void initiateParameters() { ParameterService.register(new DistributorParameters()); @@ -52,6 +55,9 @@ public class JavaTaskExecutorTest { ParameterService.register(new PersistorParameters()); } + /** + * Clear Parameters. + */ @After public void clearParameters() { ParameterService.deregister(ContextParameterConstants.DISTRIBUTOR_GROUP_NAME); diff --git a/plugins/plugins-executor/plugins-executor-java/src/test/java/org/onap/policy/apex/plugins/executor/java/JavaTaskSelectExecutorTest.java b/plugins/plugins-executor/plugins-executor-java/src/test/java/org/onap/policy/apex/plugins/executor/java/JavaTaskSelectExecutorTest.java index dbb250f8a..64dfaea10 100644 --- a/plugins/plugins-executor/plugins-executor-java/src/test/java/org/onap/policy/apex/plugins/executor/java/JavaTaskSelectExecutorTest.java +++ b/plugins/plugins-executor/plugins-executor-java/src/test/java/org/onap/policy/apex/plugins/executor/java/JavaTaskSelectExecutorTest.java @@ -45,6 +45,9 @@ import org.onap.policy.common.parameters.ParameterService; * */ public class JavaTaskSelectExecutorTest { + /** + * Initiate Parameters. + */ @Before public void initiateParameters() { ParameterService.register(new DistributorParameters()); @@ -52,6 +55,9 @@ public class JavaTaskSelectExecutorTest { ParameterService.register(new PersistorParameters()); } + /** + * Clear Parameters. + */ @After public void clearParameters() { ParameterService.deregister(ContextParameterConstants.DISTRIBUTOR_GROUP_NAME); |