Search in sources :

Example 1 with TableTypeActivator

use of org.opendaylight.protocol.bgp.linkstate.impl.TableTypeActivator in project bgpcep by opendaylight.

the class TableTypeActivatorTest method testActivator.

@Test
public void testActivator() {
    final TableTypeActivator tableTypeActivator = new TableTypeActivator();
    final SimpleBGPTableTypeRegistryProvider registry = new SimpleBGPTableTypeRegistryProvider();
    tableTypeActivator.startBGPTableTypeRegistryProvider(registry);
    final Optional<Class<? extends AfiSafiType>> afiSafiType = registry.getAfiSafiType(LINKSTATE);
    Assert.assertEquals(LINKSTATE.class, afiSafiType.get());
    final Optional<BgpTableType> tableType = registry.getTableType(LINKSTATE.class);
    Assert.assertEquals(LINKSTATE, tableType.get());
    tableTypeActivator.stopBGPTableTypeRegistryProvider();
    tableTypeActivator.close();
}
Also used : BgpTableType(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev171207.BgpTableType) SimpleBGPTableTypeRegistryProvider(org.opendaylight.protocol.bgp.openconfig.spi.SimpleBGPTableTypeRegistryProvider) TableTypeActivator(org.opendaylight.protocol.bgp.linkstate.impl.TableTypeActivator) AfiSafiType(org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.types.rev151009.AfiSafiType) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 TableTypeActivator (org.opendaylight.protocol.bgp.linkstate.impl.TableTypeActivator)1 SimpleBGPTableTypeRegistryProvider (org.opendaylight.protocol.bgp.openconfig.spi.SimpleBGPTableTypeRegistryProvider)1 AfiSafiType (org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.types.rev151009.AfiSafiType)1 BgpTableType (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev171207.BgpTableType)1