use of org.opendaylight.protocol.bgp.rib.impl.state.BGPStateCollector in project bgpcep by opendaylight.
the class RibImplTest method testRibImpl.
@Test
public void testRibImpl() throws ExecutionException, InterruptedException {
final RibImpl ribImpl = new RibImpl(extension, dispatcher, policyProvider, codecsRegistry, new BGPStateCollector(), domDataBroker);
ribImpl.start(createGlobal(), "rib-test", tableTypeRegistry);
verify(domDataBroker).getExtensions();
assertEquals("RIBImpl{bgpId=Ipv4Address{_value=127.0.0.1}, localTables=[BgpTableTypeImpl [" + "getAfi()=interface org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types." + "rev200120.Ipv4AddressFamily, " + "getSafi()=interface org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types." + "rev200120.UnicastSubsequentAddressFamily]]}", ribImpl.toString());
assertEquals(Collections.singleton(new TablesKey(Ipv4AddressFamily.class, UnicastSubsequentAddressFamily.class)), ribImpl.getLocalTablesKeys());
assertNotNull(ribImpl.getService());
assertNotNull(ribImpl.getInstanceIdentifier());
assertEquals(AS, ribImpl.getLocalAs());
assertEquals(BGP_ID, ribImpl.getBgpIdentifier());
assertEquals(Collections.singleton(TABLE_TYPE), ribImpl.getLocalTables());
assertEquals(dispatcher, ribImpl.getDispatcher());
assertEquals(extension, ribImpl.getRibExtensions());
assertNotNull(ribImpl.getRibSupportContext());
assertNotNull(ribImpl.getCodecsRegistry());
ribImpl.stop().get();
}
Aggregations