Skip to content

Commit

Permalink
canonical name test fixed: google doesn't report real hostnames anymo…
Browse files Browse the repository at this point in the history
…re, so let's use angryip.org
  • Loading branch information
angryziber committed May 25, 2014
1 parent f754477 commit 0eedd62
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/net/azib/ipscan/fetchers/HostnameFetcherTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
*/
package net.azib.ipscan.fetchers;

import static org.junit.Assert.*;
import net.azib.ipscan.core.ScanningSubject;
import org.junit.Before;
import org.junit.Test;

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

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

import net.azib.ipscan.core.ScanningSubject;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;

/**
* HostnameFetcherTest
Expand All @@ -32,7 +32,7 @@ public void testScan() throws UnknownHostException {
assertEquals(InetAddress.getLocalHost().getCanonicalHostName(), fetcher.scan(new ScanningSubject(InetAddress.getLocalHost())));

try {
InetAddress googleAddress = InetAddress.getByName("www.google.com");
InetAddress googleAddress = InetAddress.getByName("angryip.org");
assertEquals(googleAddress.getCanonicalHostName(), fetcher.scan(new ScanningSubject(googleAddress)));
}
catch (UnknownHostException e) { /* ignore - test is running in off-line environment */ }
Expand Down

0 comments on commit 0eedd62

Please sign in to comment.