Adding Intent API tests
diff --git a/core/api/src/test/java/org/onlab/onos/net/intent/MultiPointToSinglePointIntentTest.java b/core/api/src/test/java/org/onlab/onos/net/intent/MultiPointToSinglePointIntentTest.java
new file mode 100644
index 0000000..d971ba2
--- /dev/null
+++ b/core/api/src/test/java/org/onlab/onos/net/intent/MultiPointToSinglePointIntentTest.java
@@ -0,0 +1,30 @@
+package org.onlab.onos.net.intent;
+
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * Suite of tests of the multi-to-single point intent descriptor.
+ */
+public class MultiPointToSinglePointIntentTest extends ConnectivityIntentTest {
+
+ @Test
+ public void basics() {
+ MultiPointToSinglePointIntent intent = createOne();
+ assertEquals("incorrect id", IID, intent.getId());
+ assertEquals("incorrect match", MATCH, intent.getTrafficSelector());
+ assertEquals("incorrect ingress", PS1, intent.getIngressPorts());
+ assertEquals("incorrect egress", P2, intent.getEgressPort());
+ }
+
+ @Override
+ protected MultiPointToSinglePointIntent createOne() {
+ return new MultiPointToSinglePointIntent(IID, MATCH, NOP, PS1, P2);
+ }
+
+ @Override
+ protected MultiPointToSinglePointIntent createAnother() {
+ return new MultiPointToSinglePointIntent(IID, MATCH, NOP, PS2, P1);
+ }
+}