blob: 83bec15ef0b41246cb37fac31da88324dcff6a33 [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 multi-to-single point intent descriptor.
9 */
10public class MultiPointToSinglePointIntentTest extends ConnectivityIntentTest {
11
12 @Test
13 public void basics() {
14 MultiPointToSinglePointIntent intent = createOne();
Thomas Vachuskac96058a2014-10-20 23:00:16 -070015 assertEquals("incorrect id", APPID, intent.appId());
tom85258ee2014-10-07 00:10:02 -070016 assertEquals("incorrect match", MATCH, intent.selector());
17 assertEquals("incorrect ingress", PS1, intent.ingressPoints());
18 assertEquals("incorrect egress", P2, intent.egressPoint());
Brian O'Connorf3d06162014-10-02 15:54:12 -070019 }
20
21 @Override
22 protected MultiPointToSinglePointIntent createOne() {
Thomas Vachuskac96058a2014-10-20 23:00:16 -070023 return new MultiPointToSinglePointIntent(APPID, MATCH, NOP, PS1, P2);
Brian O'Connorf3d06162014-10-02 15:54:12 -070024 }
25
26 @Override
27 protected MultiPointToSinglePointIntent createAnother() {
Thomas Vachuskac96058a2014-10-20 23:00:16 -070028 return new MultiPointToSinglePointIntent(APPID, MATCH, NOP, PS2, P1);
Brian O'Connorf3d06162014-10-02 15:54:12 -070029 }
30}