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/core/api/src/test/java/org/onlab/onos/net/intent/LinkCollectionIntentTest.java b/core/api/src/test/java/org/onlab/onos/net/intent/LinkCollectionIntentTest.java
index 4b47734..f785196 100644
--- a/core/api/src/test/java/org/onlab/onos/net/intent/LinkCollectionIntentTest.java
+++ b/core/api/src/test/java/org/onlab/onos/net/intent/LinkCollectionIntentTest.java
@@ -20,7 +20,6 @@
import java.util.List;
import java.util.Set;
-import org.junit.Ignore;
import org.junit.Test;
import org.onlab.onos.net.ConnectPoint;
import org.onlab.onos.net.Link;
@@ -61,7 +60,7 @@
/**
* Tests equals(), hashCode() and toString() methods.
*/
- @Test @Ignore("Equality is based on ids, which will be different")
+ @Test
public void testEquals() {
final HashSet<Link> links1 = new HashSet<>();
@@ -72,12 +71,6 @@
treatment,
links1,
egress);
- final LinkCollectionIntent sameAsCollectionIntent1 =
- new LinkCollectionIntent(APP_ID,
- selector,
- treatment,
- links1,
- egress);
final HashSet<Link> links2 = new HashSet<>();
links2.add(link("src", 1, "dst", 3));
@@ -89,7 +82,7 @@
egress);
new EqualsTester()
- .addEqualityGroup(collectionIntent1, sameAsCollectionIntent1)
+ .addEqualityGroup(collectionIntent1)
.addEqualityGroup(collectionIntent2)
.testEquals();
}