コード例 #1
0
 @Test
 public void testDriverChange() {
   when(view.getDriver()).thenReturn(DRIVER_UUID);
   // emulates the presenter method executed from the UI.
   mainPanel.onDriverChange();
   verify(view, times(1)).getDriver();
   // the handler should have been invoked and collected the expected value.
   assertEquals(DRIVER_UUID, driver);
 }
コード例 #2
0
 @Test
 public void testGetDriver() {
   when(view.getDriver()).thenReturn(DRIVER_UUID);
   assertEquals(DRIVER_UUID, mainPanel.getDriver());
 }