2 * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.protocol.bgp.evpn.impl;
10 import static org.junit.Assert.assertEquals;
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;
20 public class TableTypeActivatorTest {
21 private static final BgpTableType EVPN = new BgpTableTypeImpl(
22 L2vpnAddressFamily.VALUE, EvpnSubsequentAddressFamily.VALUE);
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));