blob: 426a3d9841ad5c95a8e22edc3f79e3869bec0476 [file] [log] [blame]
Brian O'Connorf3d06162014-10-02 15:54:12 -07001package org.onlab.onos.net.intent;
2
3import org.junit.Test;
4
5import static org.junit.Assert.assertEquals;
6
7/**
8 * Suite of tests of the point-to-point intent descriptor.
9 */
10public class PointToPointIntentTest extends ConnectivityIntentTest {
11
12 @Test
13 public void basics() {
14 PointToPointIntent intent = createOne();
15 assertEquals("incorrect id", IID, intent.getId());
16 assertEquals("incorrect match", MATCH, intent.getTrafficSelector());
17 assertEquals("incorrect ingress", P1, intent.getIngressPort());
18 assertEquals("incorrect egress", P2, intent.getEgressPort());
19 }
20
21 @Override
22 protected PointToPointIntent createOne() {
23 return new PointToPointIntent(IID, MATCH, NOP, P1, P2);
24 }
25
26 @Override
27 protected PointToPointIntent createAnother() {
28 return new PointToPointIntent(IID, MATCH, NOP, P2, P1);
29 }
30}