Permalink
Browse files

Fixed Inet4AddressConverterTest and InetAddressConverterTest

  • Loading branch information...
1 parent fc6932b commit 75c7bcbd417b220a2e68b7928ba0581c5e9a7a75 @joschi committed Feb 22, 2012
View
2 src/test/java/com/github/joschi/jadconfig/converters/Inet4AddressConverterTest.java
@@ -31,7 +31,7 @@ public void setUp() {
@Test
public void testConvertFrom() throws UnknownHostException {
- Assert.assertEquals(InetAddress.getLocalHost(), converter.convertFrom(INET4ADDRESS_LOCALHOST));
+ Assert.assertEquals(InetAddress.getByName(INET4ADDRESS_LOCALHOST), converter.convertFrom(INET4ADDRESS_LOCALHOST));
Assert.assertEquals(InetAddress.getByName(INET4ADDRESS_EXAMPLE_COM), converter.convertFrom(INET4ADDRESS_EXAMPLE_COM));
}
View
2 src/test/java/com/github/joschi/jadconfig/converters/InetAddressConverterTest.java
@@ -51,7 +51,7 @@ public void testConvertTo() throws UnknownHostException {
Assert.assertEquals(InetAddress.getByName("example.com").getCanonicalHostName(), converter.convertTo(InetAddress.getByName("example.com")));
Assert.assertEquals(loopbackCanonicalHostName, converter.convertTo(InetAddress.getLocalHost()));
- Assert.assertEquals(loopbackCanonicalHostName, converter.convertTo(InetAddress.getByName("")));
+ Assert.assertEquals(InetAddress.getByName("").getCanonicalHostName(), converter.convertTo(InetAddress.getByName("")));
}
@Test(expected = ParameterException.class)

0 comments on commit 75c7bcb

Please sign in to comment.