コード例 #1
0
 @Test
 public void testConnectionURLChange() {
   when(view.getConnectionURL()).thenReturn(CONNECTION_URL);
   // emulates the presenter method executed from the UI.
   mainPanel.onConnectionURLChange();
   verify(view, times(1)).getConnectionURL();
   // the handler should have been invoked and collected the expected value.
   assertEquals(CONNECTION_URL, connectionURL);
 }
コード例 #2
0
 @Test
 public void testGetConnectionURL() {
   when(view.getConnectionURL()).thenReturn(CONNECTION_URL);
   assertEquals(CONNECTION_URL, mainPanel.getConnectionURL());
 }