aboutsummaryrefslogtreecommitdiffstats
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-07 21:13:53 -0700
committerGary Wu <gary.i.wu@huawei.com>2017-04-19 01:20:20 +0000
commit443143f685a4a45cce32bb468c279d9a700dff6f (patch)
treed4f31bebda4244cc1a176769fb05be33afbc5cf1 /appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test
parenta8d6915645c780c9e0eef189fb72d45635b581a0 (diff)
Parameterize raw generic type CommandTask<M>
Change-Id: I935d39537b83d1daaa63cee86d6fb83c49a5011f 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.java3
-rw-r--r--appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test/java/org/openecomp/appc/executor/TestCommandExecutor.java4
2 files changed, 3 insertions, 4 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..cd0167934 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
@@ -132,8 +132,7 @@ public class TestCommandExecutionTask {
@Test
public void testFactory(){
- CommandTask task;
- task = factory.getExecutionTask("Configure");
+ CommandTask<? extends CommandRequest> task = factory.getExecutionTask("Configure");
assertEquals(LCMCommandTask.class,task.getClass() );
task = factory.getExecutionTask("Sync");
assertEquals(LCMReadonlyCommandTask.class,task.getClass() );
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..43e9357b1 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
@@ -78,8 +78,8 @@ public class TestCommandExecutor {
commandExecutor.setExecutionQueueService(executionQueueService);
LCMCommandTask lcmCommandTask = Mockito.mock(LCMCommandTask.class);
LCMReadonlyCommandTask LCMReadonlyCommandTask = Mockito.mock(LCMReadonlyCommandTask.class);
- Mockito.when(executionTaskFactory.getExecutionTask("Configure")).thenReturn(lcmCommandTask);
- Mockito.when(executionTaskFactory.getExecutionTask("Sync")).thenReturn(LCMReadonlyCommandTask);
+ Mockito.doReturn(lcmCommandTask).when(executionTaskFactory).getExecutionTask("Configure");
+ Mockito.doReturn(LCMReadonlyCommandTask).when(executionTaskFactory).getExecutionTask("Sync");
// Mockito.when(executionQueueService.putMessage((Runnable) Mockito.anyObject(),Mockito.anyLong(),(TimeUnit)Mockito.anyObject())).thenReturn(true);
}