Changing Intent Ids to use explicit id assignment
Change-Id: I5a4bff87842c37a869e7691b353529eaefc929db
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 f69e479..4b47734 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,6 +20,7 @@
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;
@@ -43,7 +44,7 @@
/**
* Unit tests for the LinkCollectionIntent class.
*/
-public class LinkCollectionIntentTest {
+public class LinkCollectionIntentTest extends IntentTest {
final ConnectPoint egress = NetTestTools.connectPoint("egress", 3);
final TrafficSelector selector = new IntentTestsMocks.MockSelector();
@@ -60,7 +61,7 @@
/**
* Tests equals(), hashCode() and toString() methods.
*/
- @Test
+ @Test @Ignore("Equality is based on ids, which will be different")
public void testEquals() {
final HashSet<Link> links1 = new HashSet<>();
@@ -167,4 +168,26 @@
final List<Constraint> createdConstraints = collectionIntent.constraints();
assertThat(createdConstraints, hasSize(0));
}
+
+ @Override
+ protected Intent createOne() {
+ HashSet<Link> links1 = new HashSet<>();
+ links1.add(link("src", 1, "dst", 2));
+ return new LinkCollectionIntent(APP_ID,
+ selector,
+ treatment,
+ links1,
+ egress);
+ }
+
+ @Override
+ protected Intent createAnother() {
+ HashSet<Link> links2 = new HashSet<>();
+ links2.add(link("src", 1, "dst", 3));
+ return new LinkCollectionIntent(APP_ID,
+ selector,
+ treatment,
+ links2,
+ egress);
+ }
}