Examples of PrevHost


Examples of net.azib.ipscan.gui.actions.GotoMenuActions.PrevHost

  public void prevHostFindsLastHost() throws Exception {
        when(table.getItemCount()).thenReturn(10);
    when(table.getSelectionIndex()).thenReturn(-1);
        when(results.getResult(9).getType()).thenReturn(ResultType.WITH_PORTS);
        when(table.setFocus()).thenReturn(true);
    new PrevHost(table, ResultType.ALIVE).handleEvent(null);
        verify(table).setFocus();
        verify(table).setSelection(9);
    }
View Full Code Here

Examples of net.azib.ipscan.gui.actions.GotoMenuActions.PrevHost

    when(table.getItemCount()).thenReturn(25);
    when(table.getSelectionIndex()).thenReturn(0);
        when(results.getResult(24).getType()).thenReturn(ResultType.DEAD);
        when(results.getResult(23).getType()).thenReturn(ResultType.ALIVE);
        when(table.getSelectionIndex()).thenReturn(-1);
    new PrevHost(table, ResultType.ALIVE).handleEvent(null);
        verify(table).setFocus();
        verify(table).setSelection(23);
    }
View Full Code Here

Examples of net.azib.ipscan.gui.actions.GotoMenuActions.PrevHost

    @Test
    public void prevHostDoesntFindAnything() {
    when(table.getItemCount()).thenReturn(1);
    when(table.getSelectionIndex()).thenReturn(-1);
        when(results.getResult(0).getType()).thenReturn(ResultType.DEAD);
        new PrevHost(table, ResultType.ALIVE).handleEvent(null);
        verify(table, never()).setSelection(anyInt());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.