Bump versions to 0.21.7-SNAPSHOT
[bgpcep.git] / bgp / extensions / evpn / src / test / java / org / opendaylight / protocol / bgp / evpn / impl / TableTypeActivatorTest.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.protocol.bgp.evpn.impl;
9
10 import static org.junit.Assert.assertEquals;
11
12 import org.junit.Test;
13 import org.opendaylight.protocol.bgp.openconfig.spi.BGPTableTypeRegistryConsumer;
14 import org.opendaylight.protocol.bgp.parser.BgpTableTypeImpl;
15 import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.types.rev151009.L2VPNEVPN;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev200120.EvpnSubsequentAddressFamily;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev200120.L2vpnAddressFamily;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.BgpTableType;
19
20 public class TableTypeActivatorTest {
21     private static final BgpTableType EVPN = new BgpTableTypeImpl(
22             L2vpnAddressFamily.VALUE, EvpnSubsequentAddressFamily.VALUE);
23
24     @Test
25     public void testActivator() {
26         var registry = BGPTableTypeRegistryConsumer.of(new TableTypeActivator());
27         assertEquals(L2VPNEVPN.VALUE, registry.getAfiSafiType(EVPN));
28         assertEquals(EVPN, registry.getTableType(L2VPNEVPN.VALUE));
29     }
30 }