diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2018-07-05 18:26:06 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2018-07-09 10:39:33 +0200 |
commit | 7945610fd5eb08165568cbcdf74adb45e8b2fd83 (patch) | |
tree | 6cc0e832d4bce6e1fc76ec3b1018c7b2e2f27879 /server/sonar-ce-task | |
parent | deafa95ac4fe407e22e5ad56ecdbbb2e0105e24a (diff) | |
download | sonarqube-7945610fd5eb08165568cbcdf74adb45e8b2fd83.tar.gz sonarqube-7945610fd5eb08165568cbcdf74adb45e8b2fd83.zip |
fix varargs and unchecked called warnings
Diffstat (limited to 'server/sonar-ce-task')
-rw-r--r-- | server/sonar-ce-task/src/test/java/org/sonar/ce/task/container/TaskContainerImplTest.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/server/sonar-ce-task/src/test/java/org/sonar/ce/task/container/TaskContainerImplTest.java b/server/sonar-ce-task/src/test/java/org/sonar/ce/task/container/TaskContainerImplTest.java index 5360c7a1ac6..e74552bae36 100644 --- a/server/sonar-ce-task/src/test/java/org/sonar/ce/task/container/TaskContainerImplTest.java +++ b/server/sonar-ce-task/src/test/java/org/sonar/ce/task/container/TaskContainerImplTest.java @@ -25,16 +25,16 @@ import org.sonar.core.platform.ComponentContainer; import org.sonar.core.platform.ContainerPopulator; import static org.assertj.core.api.Assertions.assertThat; -import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.spy; import static org.mockito.Mockito.verify; public class TaskContainerImplTest { private ComponentContainer parent = new ComponentContainer(); - private ContainerPopulator populator = mock(ContainerPopulator.class); + private ContainerPopulator<TaskContainer> populator = spy(new DummyContainerPopulator()); @Test(expected = NullPointerException.class) public void constructor_fails_fast_on_null_container() { - new TaskContainerImpl(null, mock(ContainerPopulator.class)); + new TaskContainerImpl(null, populator); } @Test(expected = NullPointerException.class) @@ -111,4 +111,10 @@ public class TaskContainerImplTest { } + private static class DummyContainerPopulator implements ContainerPopulator<TaskContainer> { + @Override + public void populateContainer(TaskContainer container) { + + } + } } |