use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.of.migration.test.model.rev150210.KnockKnockInput in project controller by opendaylight.
the class CrossBrokerRpcTest method bindingRoutedRpcProvider_DomInvokerTest.
@Test
public void bindingRoutedRpcProvider_DomInvokerTest() throws Exception {
//
knockService.registerPath(TestContext.class, //
BA_NODE_A_ID).registerPath(TestContext.class, //
BA_NODE_B_ID).setKnockKnockResult(knockResult(true, "open"));
OpendaylightOfMigrationTestModelService baKnockInvoker = providerRegistry.getRpcService(OpendaylightOfMigrationTestModelService.class);
assertNotSame(knockService, baKnockInvoker);
KnockKnockInput knockKnockA = //
knockKnock(BA_NODE_A_ID).setQuestion("who's there?").build();
ContainerNode knockKnockDom = toDomRpc(KNOCK_KNOCK_QNAME, knockKnockA);
assertNotNull(knockKnockDom);
DOMRpcResult domResult = biRpcInvoker.invokeRpc(KNOCK_KNOCK_PATH, knockKnockDom).get();
assertNotNull(domResult);
assertNotNull("DOM result is successful.", domResult.getResult());
assertTrue("Bidning Add Flow RPC was captured.", knockService.getReceivedKnocks().containsKey(BA_NODE_A_ID));
assertEquals(knockKnockA, knockService.getReceivedKnocks().get(BA_NODE_A_ID).iterator().next());
}
Aggregations