blob: 2fb76352534a73420b9000e201d84cb2d3947df2 [file] [log] [blame]
Thejaswi N Ke3977222015-10-30 23:13:12 +05301/*
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 */
Ray Milkey753ad632015-11-06 08:46:33 -080016package org.onosproject.bgpio.types.attr;
Thejaswi N Ke3977222015-10-30 23:13:12 +053017
18import org.junit.Test;
Thejaswi N Ke3977222015-10-30 23:13:12 +053019
20import com.google.common.testing.EqualsTester;
21
22/**
23 * Test for MPLS protocol mask attribute.
24 */
25public class BgpLinkAttrProtectionTypeTest {
26 boolean bExtraTraffic = true;
27 boolean bUnprotected = true;
28 boolean bShared = true;
29 boolean bDedOneIstoOne = true;
30 boolean bDedOnePlusOne = true;
31 boolean bEnhanced = true;
32
33 boolean bExtraTraffic1 = false;
34 boolean bUnprotected1 = false;
35 boolean bShared1 = false;
36 boolean bDedOneIstoOne1 = false;
37 boolean bDedOnePlusOne1 = false;
38 boolean bEnhanced1 = false;
39
40 private final BgpLinkAttrProtectionType data = BgpLinkAttrProtectionType
41 .of(bExtraTraffic, bUnprotected, bShared, bDedOneIstoOne,
42 bDedOnePlusOne, bEnhanced);
43 private final BgpLinkAttrProtectionType sameAsData = BgpLinkAttrProtectionType
44 .of(bExtraTraffic, bUnprotected, bShared, bDedOneIstoOne,
45 bDedOnePlusOne, bEnhanced);
46 private final BgpLinkAttrProtectionType diffData = BgpLinkAttrProtectionType
47 .of(bExtraTraffic1, bUnprotected1, bShared1, bDedOneIstoOne1,
48 bDedOnePlusOne1, bEnhanced1);
49
50 @Test
51 public void basics() {
52
53 new EqualsTester().addEqualityGroup(data, sameAsData)
54 .addEqualityGroup(diffData).testEquals();
55 }
Ray Milkey753ad632015-11-06 08:46:33 -080056}