Package net.azib.ipscan.config

Examples of net.azib.ipscan.config.Labels


    return new IPListExporter();
  }
 
  @Test
  public void testBasic() throws IOException {
    Labels labels = Labels.getInstance();
   
    exporter.start(outputStream, "feederstuff");   
    exporter.setFetchers(new String[] {"fetcher1", labels.get(IPFetcher.ID), "mega long fetcher 2", labels.get(PortsFetcher.ID)});
    exporter.nextAdressResults(new Object[] {"", "123", "", new NumericRangeList(Arrays.asList(1,23,4,5,6,78), true)});
    exporter.end();
   
    assertContains("123:1");
    assertContains("123:23");
View Full Code Here


    // default implementation doesn't work
  }
 
  @Test
  public void testNextAddressResultsWithNullsOrEmptyValues() throws IOException {
    Labels labels = Labels.getInstance();

    exporter.start(outputStream, "feederstuff");
    exporter.setFetchers(new String[] {labels.get(IPFetcher.ID), "fetcher1", labels.get(PortsFetcher.ID)});
    exporter.nextAdressResults(new Object[] {InetAddress.getLocalHost(), null, null});
    exporter.nextAdressResults(new Object[] {InetAddress.getLocalHost(), null, NotAvailable.VALUE});
    exporter.end();
  }
View Full Code Here

    exporter.end();
  }
 
  @Test
  public void testFindFetcherById() {
    Labels labels = Labels.getInstance();
   
    assertEquals(0, IPListExporter.findFetcherById(IPFetcher.ID, new String[] {labels.get(IPFetcher.ID)}));
    assertEquals(3, IPListExporter.findFetcherById(IPFetcher.ID, new String[] {"a", "b", "c", labels.get(IPFetcher.ID)}));
    assertEquals(1, IPListExporter.findFetcherById(PortsFetcher.ID, new String[] {labels.get(PortsFetcher.ID) + "x", labels.get(PortsFetcher.ID), "mmmm"}));
   
    try {
      IPListExporter.findFetcherById(IPFetcher.ID, new String[] {"1", "2"});
      fail();
    }
View Full Code Here

TOP

Related Classes of net.azib.ipscan.config.Labels

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.