From 7b9de12e2f41a44c1a1f0941163d817a27da53c3 Mon Sep 17 00:00:00 2001 From: Gary Wu Date: Sun, 9 Apr 2017 15:35:41 -0700 Subject: Refactor CommandExecutorInput to be immutable Change-Id: Iebaf1f35d4229426086c2f2f1a41da2511f8110b Signed-off-by: Gary Wu --- .../java/org/openecomp/appc/executor/TestCommandExecutionTask.java | 4 +--- .../test/java/org/openecomp/appc/executor/TestCommandExecutor.java | 6 ++---- 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test/java/org') diff --git a/appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test/java/org/openecomp/appc/executor/TestCommandExecutionTask.java b/appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test/java/org/openecomp/appc/executor/TestCommandExecutionTask.java index 0504c3998..c26105b75 100644 --- a/appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test/java/org/openecomp/appc/executor/TestCommandExecutionTask.java +++ b/appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test/java/org/openecomp/appc/executor/TestCommandExecutionTask.java @@ -275,10 +275,8 @@ public class TestCommandExecutionTask { } private CommandExecutorInput createCommandExecutorInputWithSubObjects() { - CommandExecutorInput commandExecutorInput = new CommandExecutorInput(); RuntimeContext runtimeContext = createRuntimeContextWithSubObjects(); - commandExecutorInput.setRuntimeContext(runtimeContext); - return commandExecutorInput; + return new CommandExecutorInput(runtimeContext, 0); } private RuntimeContext createRuntimeContextWithSubObjects() { diff --git a/appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test/java/org/openecomp/appc/executor/TestCommandExecutor.java b/appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test/java/org/openecomp/appc/executor/TestCommandExecutor.java index 473e14e88..7b62bfc2d 100644 --- a/appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test/java/org/openecomp/appc/executor/TestCommandExecutor.java +++ b/appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test/java/org/openecomp/appc/executor/TestCommandExecutor.java @@ -135,10 +135,8 @@ public class TestCommandExecutor { } private CommandExecutorInput createCommandExecutorInputWithSubObjects() { - CommandExecutorInput commandExecutorInput = new CommandExecutorInput(); RuntimeContext runtimeContext = new RuntimeContext(); - commandExecutorInput.setRuntimeContext(runtimeContext); - RequestContext requestContext = new RequestContext(); + RequestContext requestContext = new RequestContext(); runtimeContext.setRequestContext(requestContext); CommonHeader commonHeader = new CommonHeader(); requestContext.setCommonHeader(commonHeader); @@ -148,7 +146,7 @@ public class TestCommandExecutor { requestContext.setActionIdentifiers(actionIdentifiers); VNFContext vnfContext = new VNFContext(); runtimeContext.setVnfContext(vnfContext); - return commandExecutorInput; + return new CommandExecutorInput(runtimeContext, 0); } -- cgit 1.2.3-korg