use of io.scalecube.services.routing.RouterFactory in project scalecube by scalecube.
the class RoutersTest method test_router_factory.
@Test
public void test_router_factory() {
RouterFactory factory = new RouterFactory(null);
Router router = factory.getRouter(RandomServiceRouter.class);
assertTrue(router != null);
// dummy router will always throw exception thus cannot be created.
Router dummy = factory.getRouter(DummyRouter.class);
assertTrue(dummy == null);
}
Aggregations