@Test public void testGenerateIncludedModels() { final List<Import> imports = asList(mock(Import.class), mock(Import.class)); final List<BaseIncludedModelActiveRecord> expectedIncludedModels = asList(mock(BaseIncludedModelActiveRecord.class), mock(BaseIncludedModelActiveRecord.class)); when(factory.makeIncludedModels(imports)).thenReturn(expectedIncludedModels); doReturn(imports).when(stateProvider).getImports(); final List<BaseIncludedModelActiveRecord> actualIncludedModels = stateProvider.generateIncludedModels(); assertEquals(expectedIncludedModels, actualIncludedModels); }
@Override public List<BaseIncludedModelActiveRecord> generateIncludedModels() { return factory.makeIncludedModels(getImports()); }
IncludedModelsPageStateProviderImpl implements IncludedModelsPageStateProvider { @Override public List<BaseIncludedModelActiveRecord> generateIncludedModels() { return factory.makeIncludedModels(getImports()); } }
IncludedModelsPageStateProviderImpl implements IncludedModelsPageStateProvider { @Override public List<BaseIncludedModelActiveRecord> generateIncludedModels() { return factory.makeIncludedModels(getImports()); } IncludedModelsPageStateProviderImpl(); @Inject  IncludedModelsPageStateProviderImpl(final DMNGraphUtils dmnGraphUtils,
                                               final IncludedModelsFactory factory,
                                               final DMNDiagramsSession dmnDiagramsSession); }
IncludedModelsPageStateProviderImpl implements IncludedModelsPageStateProvider { @Override public List<BaseIncludedModelActiveRecord> generateIncludedModels() { return factory.makeIncludedModels(getImports()); } IncludedModelsPageStateProviderImpl(); @Inject  IncludedModelsPageStateProviderImpl(final DMNGraphUtils dmnGraphUtils,
                                               final IncludedModelsFactory factory,
                                               final DMNDiagramsSession dmnDiagramsSession); @Override String getCurrentDiagramNamespace(); @Override List<BaseIncludedModelActiveRecord> generateIncludedModels(); List<Import> getImports(); Optional<Diagram> getDiagram(); }
IncludedModelsPageStateProviderImpl implements IncludedModelsPageStateProvider { @Override public List<BaseIncludedModelActiveRecord> generateIncludedModels() { return factory.makeIncludedModels(getImports()); } IncludedModelsPageStateProviderImpl(); @Inject  IncludedModelsPageStateProviderImpl(final DMNGraphUtils dmnGraphUtils,
                                               final IncludedModelsFactory factory,
                                               final DMNDiagramsSession dmnDiagramsSession); @Override String getCurrentDiagramNamespace(); @Override List<BaseIncludedModelActiveRecord> generateIncludedModels(); List<Import> getImports(); Optional<Diagram> getDiagram();  }