Package net.azib.ipscan.fetchers

Source Code of net.azib.ipscan.fetchers.IPFetcherTest

/**
*
*/
package net.azib.ipscan.fetchers;

import static org.junit.Assert.assertEquals;

import java.net.InetAddress;
import java.net.UnknownHostException;

import net.azib.ipscan.core.ScanningSubject;

import org.junit.Before;
import org.junit.Test;

/**
* IPFetcherTest
*
* @author Anton Keks
*/
public class IPFetcherTest extends AbstractFetcherTestCase {

  @Before
  public void setUp() throws Exception {
    fetcher = new IPFetcher();
  }
 
  @Test
  public void testScan() throws UnknownHostException {
    assertEquals(InetAddress.getLocalHost().getHostAddress(), fetcher.scan(new ScanningSubject(InetAddress.getLocalHost())).toString());
    assertEquals("255.255.255.255", fetcher.scan(new ScanningSubject(InetAddress.getByName("255.255.255.255"))).toString());
  }

}
TOP

Related Classes of net.azib.ipscan.fetchers.IPFetcherTest

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.