Unit test refactoring
- removed tests no longer useful now that all Intent objects are unique
- fixed intent object equality tests
- enabled several immutable base class tests
- renamed several Test....java classes to ...Test.Java to
match project best practices
Change-Id: Ic829d6d39556d2f63323f5e82f3807dba86c62ec
diff --git a/utils/misc/src/test/java/org/onlab/packet/IpAddressTest.java b/utils/misc/src/test/java/org/onlab/packet/IpAddressTest.java
index 7d6a5de..7c07b07 100644
--- a/utils/misc/src/test/java/org/onlab/packet/IpAddressTest.java
+++ b/utils/misc/src/test/java/org/onlab/packet/IpAddressTest.java
@@ -15,18 +15,18 @@
*/
package org.onlab.packet;
-import com.google.common.net.InetAddresses;
-import com.google.common.testing.EqualsTester;
-import org.junit.Ignore;
+import java.net.InetAddress;
+
import org.junit.Test;
-import java.net.InetAddress;
+import com.google.common.net.InetAddresses;
+import com.google.common.testing.EqualsTester;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
-import static org.onlab.junit.ImmutableClassChecker.assertThatClassIsImmutable;
+import static org.onlab.junit.ImmutableClassChecker.assertThatClassIsImmutableBaseClass;
/**
* Tests for class {@link IpAddress}.
@@ -35,10 +35,9 @@
/**
* Tests the immutability of {@link IpAddress}.
*/
- @Ignore("The class is not pure immutable, because it is not 'final'")
@Test
public void testImmutable() {
- assertThatClassIsImmutable(IpAddress.class);
+ assertThatClassIsImmutableBaseClass(IpAddress.class);
}
/**
diff --git a/utils/misc/src/test/java/org/onlab/packet/IpPrefixTest.java b/utils/misc/src/test/java/org/onlab/packet/IpPrefixTest.java
index 91a4d49..ba765b1 100644
--- a/utils/misc/src/test/java/org/onlab/packet/IpPrefixTest.java
+++ b/utils/misc/src/test/java/org/onlab/packet/IpPrefixTest.java
@@ -15,17 +15,17 @@
*/
package org.onlab.packet;
-import com.google.common.testing.EqualsTester;
-import org.junit.Ignore;
import org.junit.Test;
+import com.google.common.testing.EqualsTester;
+
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
-import static org.onlab.junit.ImmutableClassChecker.assertThatClassIsImmutable;
+import static org.onlab.junit.ImmutableClassChecker.assertThatClassIsImmutableBaseClass;
/**
* Tests for class {@link IpPrefix}.
@@ -34,10 +34,9 @@
/**
* Tests the immutability of {@link IpPrefix}.
*/
- @Ignore("The class is not pure immutable, because it is not 'final'")
@Test
public void testImmutable() {
- assertThatClassIsImmutable(IpPrefix.class);
+ assertThatClassIsImmutableBaseClass(IpPrefix.class);
}
/**