summaryrefslogtreecommitdiffstats
path: root/appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2017-04-08 14:36:17 -0700
committerGary Wu <gary.i.wu@huawei.com>2017-04-19 01:20:39 +0000
commitc9373d8f5809fe650c30832e9409282cb34688f8 (patch)
tree5a45528f254e3347328e3fe6ce1851cf51e98012 /appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test
parenta8d6915645c780c9e0eef189fb72d45635b581a0 (diff)
Refactor Status to be immutable
Change Status class to be immutable. Add convenience method to convert from a LCMCommandStatus to a Status object. Change-Id: I9e47750d15b5ee0f5649b2fabf6387aa12ff9c9d Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
Diffstat (limited to 'appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test')
-rw-r--r--appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test/java/org/openecomp/appc/executor/TestCommandExecutionTask.java9
1 files changed, 3 insertions, 6 deletions
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..d1adb21b2 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
@@ -192,9 +192,7 @@ public class TestCommandExecutionTask {
requestContext.setAction(action);
runtimeContext.setRpcName(action.name().toLowerCase());
commonHeader.setApiVer(API_VERSION);
- Status status = new Status();
- status.setCode(100);
- responseContext.setStatus(status);
+ responseContext.setStatus(new Status(100, null));
commonHeader.setRequestId(responseId);
responseContext.setPayload(payload);
commonHeader.setTimestamp(new Date());
@@ -247,7 +245,7 @@ public class TestCommandExecutionTask {
ResponseContext responseContext = createResponseContextWithSuObjects();
wfResponse.setResponseContext(responseContext);
responseContext.setPayload("");
- wfResponse.getResponseContext().getStatus().setCode(100);
+ wfResponse.getResponseContext().setStatus(new Status(100, null));
return wfResponse;
}
@@ -301,9 +299,8 @@ public class TestCommandExecutionTask {
ResponseContext responseContext = new ResponseContext();
CommonHeader commonHeader = new CommonHeader();
Flags flags = new Flags();
- Status status = new Status();
responseContext.setCommonHeader(commonHeader);
- responseContext.setStatus(status);
+ responseContext.setStatus(new Status(0, null));
commonHeader.setFlags(flags);
return responseContext;
}