blob: 0d7fc2e1e5e5ec7dfa00fabbc407655e52795bf2 [file] [log] [blame]
Shashikanth VHfe2fb202016-02-05 18:45:07 +05301/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2016-present Open Networking Laboratory
Shashikanth VHfe2fb202016-02-05 18:45:07 +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.protocol.flowspec;
17
18import org.junit.Test;
Shashikanth VHfe2fb202016-02-05 18:45:07 +053019import com.google.common.testing.EqualsTester;
20
21/**
22 * Test for BgpFsDestinationPrefix flow specification component.
23 */
24public class BgpFlowSpecPrefixTest {
Shashikanth VH26fd38a2016-04-26 18:11:37 +053025 private String routeKey1 = "flowRoute1";
26 private String routeKey2 = "flowRoute2";
Shashikanth VHfe2fb202016-02-05 18:45:07 +053027
Shashikanth VH26fd38a2016-04-26 18:11:37 +053028 private final BgpFlowSpecRouteKey tlv1 = new BgpFlowSpecRouteKey(routeKey1);
29 private final BgpFlowSpecRouteKey sameAsTlv1 = new BgpFlowSpecRouteKey(routeKey1);
30 private final BgpFlowSpecRouteKey tlv2 = new BgpFlowSpecRouteKey(routeKey2);
Shashikanth VHfe2fb202016-02-05 18:45:07 +053031
32 @Test
33 public void testEquality() {
34 new EqualsTester()
35 .addEqualityGroup(tlv1, sameAsTlv1)
36 .addEqualityGroup(tlv2)
37 .testEquals();
38 }
39}