use of org.opennms.core.network.IPAddressRange in project opennms by OpenNMS.
the class SnmpEventInfoTest method testPreceedsRange.
@Test
public void testPreceedsRange() {
IPAddressRange r = new IPAddressRange("192.168.1.10", "192.168.1.20");
assertTrue(r.comesBefore(new IPAddressRange("192.168.1.21", "192.168.1.30")));
assertTrue(r.comesBefore(new IPAddressRange("192.168.1.21", "192.168.1.21")));
assertFalse(r.comesBefore(new IPAddressRange("192.168.1.20", "192.168.1.30")));
assertFalse(r.comesBefore(new IPAddressRange("192.168.1.7", "192.168.1.9")));
}
Aggregations