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(); |
Thomas Vachuska | c96058a | 2014-10-20 23:00:16 -0700 | [diff] [blame^] | 15 | assertEquals("incorrect id", APPID, intent.appId()); |
tom | 85258ee | 2014-10-07 00:10:02 -0700 | [diff] [blame] | 16 | assertEquals("incorrect match", MATCH, intent.selector()); |
| 17 | assertEquals("incorrect ingress", PS1, intent.ingressPoints()); |
| 18 | assertEquals("incorrect egress", P2, intent.egressPoint()); |
Brian O'Connor | f3d0616 | 2014-10-02 15:54:12 -0700 | [diff] [blame] | 19 | } |
| 20 | |
| 21 | @Override |
| 22 | protected MultiPointToSinglePointIntent createOne() { |
Thomas Vachuska | c96058a | 2014-10-20 23:00:16 -0700 | [diff] [blame^] | 23 | return new MultiPointToSinglePointIntent(APPID, MATCH, NOP, PS1, P2); |
Brian O'Connor | f3d0616 | 2014-10-02 15:54:12 -0700 | [diff] [blame] | 24 | } |
| 25 | |
| 26 | @Override |
| 27 | protected MultiPointToSinglePointIntent createAnother() { |
Thomas Vachuska | c96058a | 2014-10-20 23:00:16 -0700 | [diff] [blame^] | 28 | return new MultiPointToSinglePointIntent(APPID, MATCH, NOP, PS2, P1); |
Brian O'Connor | f3d0616 | 2014-10-02 15:54:12 -0700 | [diff] [blame] | 29 | } |
| 30 | } |