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 unreserved bandwidth attribute.
27 public class BgpLinkAttrUnRsrvdLinkBandwidthTest {
28 ArrayList<Float> maxUnResBandwidth = new ArrayList<Float>();
29 ArrayList<Float> maxUnResBandwidth1 = new ArrayList<Float>();
32 private final BgpLinkAttrUnRsrvdLinkBandwidth isisData = BgpLinkAttrUnRsrvdLinkBandwidth
33 .of(maxUnResBandwidth, sType);
34 private final BgpLinkAttrUnRsrvdLinkBandwidth sameAsIsisData = BgpLinkAttrUnRsrvdLinkBandwidth
35 .of(maxUnResBandwidth, sType);
36 private final BgpLinkAttrUnRsrvdLinkBandwidth isisDiff = BgpLinkAttrUnRsrvdLinkBandwidth
37 .of(maxUnResBandwidth1, sType);
40 public void basics() {
42 maxUnResBandwidth.add(new Float(1));
43 maxUnResBandwidth.add(new Float(2));
44 maxUnResBandwidth.add(new Float(3));
45 maxUnResBandwidth.add(new Float(4));
47 maxUnResBandwidth1.add(new Float(1));
48 maxUnResBandwidth1.add(new Float(2));
49 maxUnResBandwidth1.add(new Float(3));
50 maxUnResBandwidth1.add(new Float(1));
52 new EqualsTester().addEqualityGroup(isisData, sameAsIsisData)
53 .addEqualityGroup(isisDiff).testEquals();