use of org.opendaylight.protocol.bgp.rib.mock.BGPMock in project bgpcep by opendaylight.
the class ParserToSalTest method setUp.
@Before
public void setUp() throws Exception {
super.setUp();
final String hexMessages = "/bgp_hex.txt";
final List<byte[]> bgpMessages = HexDumpBGPFileParser.parseMessages(ParserToSalTest.class.getResourceAsStream(hexMessages));
this.mock = new BGPMock(new EventBus("test"), ServiceLoaderBGPExtensionProviderContext.getSingletonInstance().getMessageRegistry(), Lists.newArrayList(fixMessages(bgpMessages)));
Mockito.doReturn(GlobalEventExecutor.INSTANCE.newSucceededFuture(null)).when(this.dispatcher).createReconnectingClient(Mockito.any(InetSocketAddress.class), Mockito.anyInt(), Mockito.any(KeyMapping.class));
this.ext1 = new SimpleRIBExtensionProviderContext();
this.ext2 = new SimpleRIBExtensionProviderContext();
this.baseact = new RIBActivator();
this.lsact = new org.opendaylight.protocol.bgp.linkstate.impl.RIBActivator();
this.baseact.startRIBExtensionProvider(this.ext1);
this.lsact.startRIBExtensionProvider(this.ext2);
this.codecsRegistry = CodecsRegistryImpl.create(this.bindingCodecTreeFactory, GeneratedClassLoadingStrategy.getTCCLClassLoadingStrategy());
}
Aggregations