Package net.azib.ipscan.core.ScanningResultList

Examples of net.azib.ipscan.core.ScanningResultList.StopScanningListener


    assertNull(scanningResults.getFetchers());
  }
 
  @Test
  public void testScanInfoCompletedNormally() throws Exception {
    StopScanningListener stopListener = scanningResults.new StopScanningListener();
    assertFalse(scanningResults.getScanInfo().isCompletedNormally());
   
    stopListener.transitionTo(ScanningState.IDLE, Transition.COMPLETE);
    assertTrue(scanningResults.getScanInfo().isCompletedNormally());

    stopListener.transitionTo(ScanningState.KILLING, Transition.STOP);
    assertFalse(scanningResults.getScanInfo().isCompletedNormally());
  }
View Full Code Here


    assertFalse(scanInfo.isCompletedNormally());
    long scanTime1 = scanInfo.getScanTime();
    assertTrue("Scanning has just begun", scanTime1 >= 0 && scanTime1 <= 10);
   
    Thread.sleep(10);
    scanningResults.new StopScanningListener().transitionTo(ScanningState.IDLE, Transition.COMPLETE);
    assertTrue(scanInfo.isCompletedNormally());
    long scanTime2 = scanInfo.getScanTime();
    assertTrue("Scanning has just finished", scanTime2 >= 10 && scanTime1 <= 20);
    assertTrue(scanTime1 != scanTime2);
    Thread.sleep(10);
View Full Code Here

TOP

Related Classes of net.azib.ipscan.core.ScanningResultList.StopScanningListener

Copyright © 2018 www.massapicom. 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.