Sho SHIMIZU | 15ed4fd | 2014-08-05 14:40:42 -0700 | [diff] [blame] | 1 | package net.onrc.onos.api.newintent; |
| 2 | |
| 3 | import org.junit.Test; |
| 4 | |
| 5 | import static org.junit.Assert.assertEquals; |
| 6 | |
| 7 | /** |
| 8 | * Suite of tests of the single-to-multi point intent descriptor. |
| 9 | */ |
| 10 | public class SinglePointToMultiPointIntentTest extends ConnectivityIntentTest { |
| 11 | |
| 12 | @Test |
| 13 | public void basics() { |
| 14 | SinglePointToMultiPointIntent intent = createOne(); |
| 15 | assertEquals("incorrect id", IID, intent.getId()); |
| 16 | assertEquals("incorrect match", MATCH, intent.getMatch()); |
| 17 | assertEquals("incorrect ingress", P1, intent.getIngressPort()); |
| 18 | assertEquals("incorrect egress", PS2, intent.getEgressPorts()); |
| 19 | } |
| 20 | |
| 21 | @Override |
| 22 | protected SinglePointToMultiPointIntent createOne() { |
| 23 | return new SinglePointToMultiPointIntent(IID, MATCH, NOP, P1, PS2); |
| 24 | } |
| 25 | |
| 26 | @Override |
| 27 | protected SinglePointToMultiPointIntent createAnother() { |
| 28 | return new SinglePointToMultiPointIntent(IID, MATCH, NOP, P2, PS1); |
| 29 | } |
| 30 | } |