blob: b06aee5c14d1b2fbc165235c3b430cd7b1e863b3 [file] [log] [blame]
Thejaswi N K04e46122015-11-24 18:22:10 +05301/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2015-present Open Networking Laboratory
Thejaswi N K04e46122015-11-24 18:22:10 +05303 *
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 */
16package org.onosproject.bgpio.types.attr;
17
18import java.util.ArrayList;
19
20import org.junit.Test;
21
22import com.google.common.testing.EqualsTester;
23
24/**
25 * Test for BGP prefix route tag attribute.
26 */
27public 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}