@Test public void runnerShouldBeUpdated() { Runner runner1 = mock(Runner.class); when(runner1.getRAM()).thenReturn(MB_500.getValue()); reset(view); presenter.update(runner1); verify(view).setName(runner1.getTitle()); verify(view).setType(runner1.getType()); verify(runner1).getRAM(); verify(view).selectMemory(500); verify(view).selectScope(runner1.getScope()); }
@Before public void setUp() { when(resources.runnerInProgress()).thenReturn(svgResource); when(resources.runnerInQueue()).thenReturn(svgResource); when(resources.runnerFailed()).thenReturn(svgResource); when(resources.runnerTimeout()).thenReturn(svgResource); when(resources.runnerDone()).thenReturn(svgResource); when(resources.runnerDone()).thenReturn(svgResource); when(resources.erase()).thenReturn(svgResource); when(resources.runnerCss().whiteColor()).thenReturn(TEXT); when(itemWidget.getImagePanel()).thenReturn(imagePanel); runnerWidget = new RunnerWidget(itemWidget, resources, selectionManager); when(resources.runnerCss()).thenReturn(css); when(runner.getTitle()).thenReturn(TEXT); when(runner.getRAM()).thenReturn(512); when(runner.getCreationTime()).thenReturn(TEXT); runnerWidget.setDelegate(delegate); }