blob: eebd3d81086421c8ad848fc93cbbd6d2ae4b6e18 [file] [log] [blame]
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07001/*
2 * Copyright 2014 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
Brian O'Connorf3d06162014-10-02 15:54:12 -070016package org.onlab.onos.net.intent;
17
18import org.junit.Test;
19
20import static org.junit.Assert.assertEquals;
21
22/**
23 * Suite of tests of the single-to-multi point intent descriptor.
24 */
25public class SinglePointToMultiPointIntentTest extends ConnectivityIntentTest {
26
27 @Test
28 public void basics() {
29 SinglePointToMultiPointIntent intent = createOne();
Thomas Vachuskac96058a2014-10-20 23:00:16 -070030 assertEquals("incorrect id", APPID, intent.appId());
tom85258ee2014-10-07 00:10:02 -070031 assertEquals("incorrect match", MATCH, intent.selector());
32 assertEquals("incorrect ingress", P1, intent.ingressPoint());
33 assertEquals("incorrect egress", PS2, intent.egressPoints());
Brian O'Connorf3d06162014-10-02 15:54:12 -070034 }
35
36 @Override
37 protected SinglePointToMultiPointIntent createOne() {
Thomas Vachuskac96058a2014-10-20 23:00:16 -070038 return new SinglePointToMultiPointIntent(APPID, MATCH, NOP, P1, PS2);
Brian O'Connorf3d06162014-10-02 15:54:12 -070039 }
40
41 @Override
42 protected SinglePointToMultiPointIntent createAnother() {
Thomas Vachuskac96058a2014-10-20 23:00:16 -070043 return new SinglePointToMultiPointIntent(APPID, MATCH, NOP, P2, PS1);
Brian O'Connorf3d06162014-10-02 15:54:12 -070044 }
45}