blob: 1aeb5bff2bf90e015e0fd7198155d8a3d8390a07 [file] [log] [blame]
Thejaswi N K0fc61342015-11-11 23:47:25 +05301/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2015-present Open Networking Laboratory
Thejaswi N K0fc61342015-11-11 23:47:25 +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.bgp;
17
18import org.junit.Test;
19import org.onosproject.bgpio.types.attr.BgpLinkAttrTeDefaultMetric;
20
21import com.google.common.testing.EqualsTester;
22
23/**
24 * Test for BGP link TE default metric attribute.
25 */
26public class BgpLinkAttrTeDefaultMetricTest {
27 private final int val = 0x010203;
28 private final int val1 = 0x01020304;
29
30 private final BgpLinkAttrTeDefaultMetric data = BgpLinkAttrTeDefaultMetric
31 .of(val);
32 private final BgpLinkAttrTeDefaultMetric sameAsData = BgpLinkAttrTeDefaultMetric
33 .of(val);
34 private final BgpLinkAttrTeDefaultMetric diffData = BgpLinkAttrTeDefaultMetric
35 .of(val1);
36
37 @Test
38 public void basics() {
39 new EqualsTester().addEqualityGroup(data, sameAsData)
40 .addEqualityGroup(diffData).testEquals();
41 }
42}