2 * Copyright 2015 Open Networking Laboratory
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 package org.onosproject.bgpio.types.attr;
18 import java.util.ArrayList;
20 import org.junit.Test;
22 import com.google.common.testing.EqualsTester;
25 * Test for BGP prefix route tag attribute.
27 public class BgpPrefixAttrRouteTagTest {
28 ArrayList<Integer> maxUnResBandwidth = new ArrayList<Integer>();
29 ArrayList<Integer> maxUnResBandwidth1 = new ArrayList<Integer>();
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);
39 public void basics() {
41 maxUnResBandwidth.add(new Integer(1));
42 maxUnResBandwidth.add(new Integer(2));
43 maxUnResBandwidth.add(new Integer(3));
44 maxUnResBandwidth.add(new Integer(4));
46 maxUnResBandwidth1.add(new Integer(1));
47 maxUnResBandwidth1.add(new Integer(2));
48 maxUnResBandwidth1.add(new Integer(3));
49 maxUnResBandwidth1.add(new Integer(1));
51 new EqualsTester().addEqualityGroup(isisData, sameAsIsisData)
52 .addEqualityGroup(isisDiff).testEquals();