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 point-to-point intent descriptor. |
| 9 | */ |
| 10 | public class PointToPointIntentTest extends ConnectivityIntentTest { |
| 11 | |
| 12 | @Test |
| 13 | public void basics() { |
| 14 | PointToPointIntent 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", P1, intent.ingressPoint()); |
| 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 PointToPointIntent createOne() { |
Thomas Vachuska | c96058a | 2014-10-20 23:00:16 -0700 | [diff] [blame] | 23 | return new PointToPointIntent(APPID, MATCH, NOP, P1, P2); |
Brian O'Connor | f3d0616 | 2014-10-02 15:54:12 -0700 | [diff] [blame] | 24 | } |
| 25 | |
| 26 | @Override |
| 27 | protected PointToPointIntent createAnother() { |
Thomas Vachuska | c96058a | 2014-10-20 23:00:16 -0700 | [diff] [blame] | 28 | return new PointToPointIntent(APPID, MATCH, NOP, P2, P1); |
Brian O'Connor | f3d0616 | 2014-10-02 15:54:12 -0700 | [diff] [blame] | 29 | } |
| 30 | } |