25ced61f01930f1ed4b34eefdb05f0e039bbdb04
[onosfw.git] /
1 /*
2  * Copyright 2015 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  */
16 package org.onosproject.bgpio.types.attr;
17
18 import java.util.ArrayList;
19
20 import org.junit.Test;
21
22 import com.google.common.testing.EqualsTester;
23
24 /**
25  * Test for BGP prefix route tag attribute.
26  */
27 public class BgpPrefixAttrRouteTagTest {
28     ArrayList<Integer> maxUnResBandwidth = new ArrayList<Integer>();
29     ArrayList<Integer> maxUnResBandwidth1 = new ArrayList<Integer>();
30
31     private final BgpPrefixAttrRouteTag isisData = BgpPrefixAttrRouteTag
32             .of(maxUnResBandwidth);
33     private final BgpPrefixAttrRouteTag sameAsIsisData = BgpPrefixAttrRouteTag
34             .of(maxUnResBandwidth);
35     private final BgpPrefixAttrRouteTag isisDiff = BgpPrefixAttrRouteTag
36             .of(maxUnResBandwidth1);
37
38     @Test
39     public void basics() {
40
41         maxUnResBandwidth.add(new Integer(1));
42         maxUnResBandwidth.add(new Integer(2));
43         maxUnResBandwidth.add(new Integer(3));
44         maxUnResBandwidth.add(new Integer(4));
45
46         maxUnResBandwidth1.add(new Integer(1));
47         maxUnResBandwidth1.add(new Integer(2));
48         maxUnResBandwidth1.add(new Integer(3));
49         maxUnResBandwidth1.add(new Integer(1));
50
51         new EqualsTester().addEqualityGroup(isisData, sameAsIsisData)
52                 .addEqualityGroup(isisDiff).testEquals();
53     }
54 }