use of org.kie.workbench.common.stunner.core.factory.Factory in project kie-wb-common by kiegroup.
the class FactoryRegistryImplTest method testRegister.
@Test
public void testRegister() {
DefinitionFactory definitionFactory = mock(DefinitionFactory.class);
ElementFactory graphFactory = mock(ElementFactory.class);
DiagramFactory diagramFactory = mock(DiagramFactory.class);
Factory randomFactory = mock(Factory.class);
FactoryRegistryImpl factory = new FactoryRegistryImpl(adapter);
factory.register(definitionFactory);
factory.register(graphFactory);
factory.register(diagramFactory);
factory.register(randomFactory);
Collection<?> factories = factory.getAllFactories();
assertEquals(3, factories.stream().count());
}
Aggregations