use of org.jgroups.stack.IpAddressUUID in project JGroups by belaban.
the class IpAddressTest method testInequality.
public void testInequality() throws Exception {
IpAddress tmp = null;
assert !a.equals(d);
assert !c.equals(d);
assert !a.equals(f);
assert !e.equals(f);
assert !f.equals(g);
assert !(a.equals(tmp));
tmp = new IpAddressUUID("localhost", 5555);
assert a.equals(tmp);
assert tmp.equals(a);
}
use of org.jgroups.stack.IpAddressUUID in project JGroups by belaban.
the class IpAddressTest method testEquality.
public void testEquality() throws Exception {
Assert.assertEquals(a, b);
Assert.assertEquals(c, b);
Assert.assertEquals(a, e);
Assert.assertEquals(c, e);
assert !j.equals(k);
assert !k.equals(j);
assert a.equals(j);
assert j.equals(a);
IpAddress tmp = new IpAddressUUID("localhost", 5555);
assert !tmp.equals(j);
}
use of org.jgroups.stack.IpAddressUUID in project JGroups by belaban.
the class IpAddressTest method testCompareTo.
public void testCompareTo() throws UnknownHostException {
Assert.assertEquals(0, a.compareTo(b));
assert a.compareTo(d) < 0;
assert d.compareTo(a) > 0;
assert j.compareTo(k) != 0;
IpAddressUUID tmp = new IpAddressUUID("localhost", 5556);
assert tmp.compareTo(j) != 0;
tmp = new IpAddressUUID("localhost", 5555);
assert tmp.compareTo(j) != 0;
assert tmp.compareTo(a) == 0;
assert a.compareTo(tmp) == 0;
}
use of org.jgroups.stack.IpAddressUUID in project wildfly by wildfly.
the class AddressSerializerTestCase method test.
private static void test(Tester<Address> tester) throws IOException {
UUID uuid = UUID.randomUUID();
InetSocketAddress address = new InetSocketAddress(InetAddress.getLoopbackAddress(), Short.MAX_VALUE);
IpAddress ipAddress = new IpAddress(address);
IpAddressUUID ipAddressUUID = new IpAddressUUID(address);
tester.test(uuid);
tester.test(ipAddress);
tester.test(ipAddressUUID);
}
Aggregations