Brian O'Connor | f3d0616 | 2014-10-02 15:54:12 -0700 | [diff] [blame] | 1 | package org.onlab.onos.net.intent; |
| 2 | |
| 3 | import org.junit.Test; |
| 4 | |
| 5 | import static org.junit.Assert.assertEquals; |
| 6 | |
| 7 | /** |
| 8 | * Suite of tests of the multi-to-single point intent descriptor. |
| 9 | */ |
| 10 | public class MultiPointToSinglePointIntentTest extends ConnectivityIntentTest { |
| 11 | |
| 12 | @Test |
| 13 | public void basics() { |
| 14 | MultiPointToSinglePointIntent intent = createOne(); |
| 15 | assertEquals("incorrect id", IID, intent.getId()); |
| 16 | assertEquals("incorrect match", MATCH, intent.getTrafficSelector()); |
| 17 | assertEquals("incorrect ingress", PS1, intent.getIngressPorts()); |
| 18 | assertEquals("incorrect egress", P2, intent.getEgressPort()); |
| 19 | } |
| 20 | |
| 21 | @Override |
| 22 | protected MultiPointToSinglePointIntent createOne() { |
| 23 | return new MultiPointToSinglePointIntent(IID, MATCH, NOP, PS1, P2); |
| 24 | } |
| 25 | |
| 26 | @Override |
| 27 | protected MultiPointToSinglePointIntent createAnother() { |
| 28 | return new MultiPointToSinglePointIntent(IID, MATCH, NOP, PS2, P1); |
| 29 | } |
| 30 | } |