@Test public void prepareContent() { scenarioSimulationEditorKogitoWrapperSpy.prepareContent(resolveCallBackMock, rejectCallbackFnMock); verify(scenarioSimulationEditorKogitoWrapperSpy, times(1)).synchronizeColumnsDimension(eq(simulationGridPanelMock), eq(backgroundGridPanelMock)); verify(scenarioSimulationEditorKogitoWrapperSpy, times(1)).marshallContent(eq(scenarioSimulationModelMock), eq(resolveCallBackMock)); verify(scenarioSimulationEditorPresenterMock, never()).sendNotification(any(), any()); }
public void prepareContent(Promise.PromiseExecutorCallbackFn.ResolveCallbackFn<String> success, Promise.PromiseExecutorCallbackFn.RejectCallbackFn failure) { try { synchronizeColumnsDimension(scenarioSimulationEditorPresenter.getContext().getScenarioGridPanelByGridWidget(GridWidget.SIMULATION), scenarioSimulationEditorPresenter.getContext().getScenarioGridPanelByGridWidget(GridWidget.BACKGROUND)); marshallContent(scenarioSimulationEditorPresenter.getModel(), success); } catch (Exception e) { scenarioSimulationEditorPresenter.sendNotification(e.getMessage(), NotificationEvent.NotificationType.ERROR); failure.onInvoke(e.getMessage()); } }
ScenarioSimulationEditorKogitoWrapper extends MultiPageEditorContainerPresenter<ScenarioSimulationModel> implements ScenarioSimulationEditorWrapper { public void prepareContent(Promise.PromiseExecutorCallbackFn.ResolveCallbackFn<String> success, Promise.PromiseExecutorCallbackFn.RejectCallbackFn failure) { try { synchronizeColumnsDimension(scenarioSimulationEditorPresenter.getContext().getScenarioGridPanelByGridWidget(GridWidget.SIMULATION), scenarioSimulationEditorPresenter.getContext().getScenarioGridPanelByGridWidget(GridWidget.BACKGROUND)); marshallContent(scenarioSimulationEditorPresenter.getModel(), success); } catch (Exception e) { scenarioSimulationEditorPresenter.sendNotification(e.getMessage(), NotificationEvent.NotificationType.ERROR); failure.onInvoke(e.getMessage()); } } }
ScenarioSimulationEditorKogitoWrapper extends MultiPageEditorContainerPresenter<ScenarioSimulationModel> implements ScenarioSimulationEditorWrapper { public void prepareContent(Promise.PromiseExecutorCallbackFn.ResolveCallbackFn<String> success, Promise.PromiseExecutorCallbackFn.RejectCallbackFn failure) { try { synchronizeColumnsDimension(scenarioSimulationEditorPresenter.getContext().getScenarioGridPanelByGridWidget(GridWidget.SIMULATION), scenarioSimulationEditorPresenter.getContext().getScenarioGridPanelByGridWidget(GridWidget.BACKGROUND)); marshallContent(scenarioSimulationEditorPresenter.getModel(), success); } catch (Exception e) { scenarioSimulationEditorPresenter.sendNotification(e.getMessage(), NotificationEvent.NotificationType.ERROR); failure.onInvoke(e.getMessage()); } } ScenarioSimulationEditorKogitoWrapper(); @Inject  ScenarioSimulationEditorKogitoWrapper(
            final ScenarioSimulationEditorPresenter scenarioSimulationEditorPresenter,
            final FileMenuBuilder fileMenuBuilder,
            final PlaceManager placeManager,
            final MultiPageEditorContainerView multiPageEditorContainerView,
            final AuthoringEditorDock authoringWorkbenchDocks,
            final Promises promises,
            final KogitoDMNService dmnTypeService,
            final KogitoAsyncPackageDataModelOracle kogitoOracle,
            final TranslationService translationService,
            final ScenarioSimulationKogitoCreationPopupPresenter scenarioSimulationKogitoCreationPopupPresenter,
            final KogitoScenarioSimulationBuilder scenarioSimulationBuilder,
            final ScenarioSimulationKogitoDocksHandler scenarioSimulationKogitoDocksHandler); }
ScenarioSimulationEditorKogitoWrapper extends MultiPageEditorContainerPresenter<ScenarioSimulationModel> implements ScenarioSimulationEditorWrapper { public void prepareContent(Promise.PromiseExecutorCallbackFn.ResolveCallbackFn<String> success, Promise.PromiseExecutorCallbackFn.RejectCallbackFn failure) { try { synchronizeColumnsDimension(scenarioSimulationEditorPresenter.getContext().getScenarioGridPanelByGridWidget(GridWidget.SIMULATION), scenarioSimulationEditorPresenter.getContext().getScenarioGridPanelByGridWidget(GridWidget.BACKGROUND)); marshallContent(scenarioSimulationEditorPresenter.getModel(), success); } catch (Exception e) { scenarioSimulationEditorPresenter.sendNotification(e.getMessage(), NotificationEvent.NotificationType.ERROR); failure.onInvoke(e.getMessage()); } } ScenarioSimulationEditorKogitoWrapper(); @Inject  ScenarioSimulationEditorKogitoWrapper(
            final ScenarioSimulationEditorPresenter scenarioSimulationEditorPresenter,
            final FileMenuBuilder fileMenuBuilder,
            final PlaceManager placeManager,
            final MultiPageEditorContainerView multiPageEditorContainerView,
            final AuthoringEditorDock authoringWorkbenchDocks,
            final Promises promises,
            final KogitoDMNService dmnTypeService,
            final KogitoAsyncPackageDataModelOracle kogitoOracle,
            final TranslationService translationService,
            final ScenarioSimulationKogitoCreationPopupPresenter scenarioSimulationKogitoCreationPopupPresenter,
            final KogitoScenarioSimulationBuilder scenarioSimulationBuilder,
            final ScenarioSimulationKogitoDocksHandler scenarioSimulationKogitoDocksHandler); @Override Promise<String> getContent(); @Override Promise setContent(String fullPath, String content); void prepareContent(Promise.PromiseExecutorCallbackFn.ResolveCallbackFn<String> success,
                               Promise.PromiseExecutorCallbackFn.RejectCallbackFn failure); @Override void wrappedRegisterDock(String id, IsWidget widget); @Override void onImport(String fileContents, RemoteCallback<AbstractScesimModel> importCallBack, ErrorCallback<Object> importErrorCallback, AbstractScesimModel<? extends AbstractScesimData> scesimModel); @Override void onExportToCsv(RemoteCallback<String> exportCallBack, ScenarioSimulationHasBusyIndicatorDefaultErrorCallback scenarioSimulationHasBusyIndicatorDefaultErrorCallback, AbstractScesimModel<? extends AbstractScesimData> scesimModel); @Override void onDownloadReportToCsv(RemoteCallback<String> exportCallBack, ScenarioSimulationHasBusyIndicatorDefaultErrorCallback scenarioSimulationHasBusyIndicatorDefaultErrorCallback, SimulationRunMetadata simulationRunMetadata, ScenarioSimulationModel.Type modelType); @Override void validate(Simulation simulation, Settings settings, RemoteCallback<?> callback); @Override void onRefreshedModelContent(SimulationRunResult testResultMessage); @Override void onEditTabSelected(); @Override void addBackgroundPage(final ScenarioGridWidget scenarioGridWidget); @Override void selectSimulationTab(); @Override void selectBackgroundTab(); @Override AbstractScenarioSimulationDocksHandler getScenarioSimulationDocksHandler(); @Override ScenarioSimulationEditorPresenter getScenarioSimulationEditorPresenter(); @Override void resetContentHash(); void onStartup(final PlaceRequest place); void gotoPath(Path path); Path getCurrentPath(); @Override boolean mayClose(); @Override IsWidget getTitle(); @Override MultiPageEditorContainerView getWidget(); FileMenuBuilder getFileMenuBuilder(); void setMenus(final Consumer<Menus> menusConsumer); @Override void onRunScenario(RemoteCallback<SimulationRunResult> refreshModelCallback, ScenarioSimulationHasBusyIndicatorDefaultErrorCallback scenarioSimulationHasBusyIndicatorDefaultErrorCallback, ScesimModelDescriptor simulationDescriptor, Settings settings, List<ScenarioWithIndex> toRun, Background background); @Override Integer getOriginalHash(); }
ScenarioSimulationEditorKogitoWrapper extends MultiPageEditorContainerPresenter<ScenarioSimulationModel> implements ScenarioSimulationEditorWrapper { public void prepareContent(Promise.PromiseExecutorCallbackFn.ResolveCallbackFn<String> success, Promise.PromiseExecutorCallbackFn.RejectCallbackFn failure) { try { synchronizeColumnsDimension(scenarioSimulationEditorPresenter.getContext().getScenarioGridPanelByGridWidget(GridWidget.SIMULATION), scenarioSimulationEditorPresenter.getContext().getScenarioGridPanelByGridWidget(GridWidget.BACKGROUND)); marshallContent(scenarioSimulationEditorPresenter.getModel(), success); } catch (Exception e) { scenarioSimulationEditorPresenter.sendNotification(e.getMessage(), NotificationEvent.NotificationType.ERROR); failure.onInvoke(e.getMessage()); } } ScenarioSimulationEditorKogitoWrapper(); @Inject  ScenarioSimulationEditorKogitoWrapper(
            final ScenarioSimulationEditorPresenter scenarioSimulationEditorPresenter,
            final FileMenuBuilder fileMenuBuilder,
            final PlaceManager placeManager,
            final MultiPageEditorContainerView multiPageEditorContainerView,
            final AuthoringEditorDock authoringWorkbenchDocks,
            final Promises promises,
            final KogitoDMNService dmnTypeService,
            final KogitoAsyncPackageDataModelOracle kogitoOracle,
            final TranslationService translationService,
            final ScenarioSimulationKogitoCreationPopupPresenter scenarioSimulationKogitoCreationPopupPresenter,
            final KogitoScenarioSimulationBuilder scenarioSimulationBuilder,
            final ScenarioSimulationKogitoDocksHandler scenarioSimulationKogitoDocksHandler); @Override Promise<String> getContent(); @Override Promise setContent(String fullPath, String content); void prepareContent(Promise.PromiseExecutorCallbackFn.ResolveCallbackFn<String> success,
                               Promise.PromiseExecutorCallbackFn.RejectCallbackFn failure); @Override void wrappedRegisterDock(String id, IsWidget widget); @Override void onImport(String fileContents, RemoteCallback<AbstractScesimModel> importCallBack, ErrorCallback<Object> importErrorCallback, AbstractScesimModel<? extends AbstractScesimData> scesimModel); @Override void onExportToCsv(RemoteCallback<String> exportCallBack, ScenarioSimulationHasBusyIndicatorDefaultErrorCallback scenarioSimulationHasBusyIndicatorDefaultErrorCallback, AbstractScesimModel<? extends AbstractScesimData> scesimModel); @Override void onDownloadReportToCsv(RemoteCallback<String> exportCallBack, ScenarioSimulationHasBusyIndicatorDefaultErrorCallback scenarioSimulationHasBusyIndicatorDefaultErrorCallback, SimulationRunMetadata simulationRunMetadata, ScenarioSimulationModel.Type modelType); @Override void validate(Simulation simulation, Settings settings, RemoteCallback<?> callback); @Override void onRefreshedModelContent(SimulationRunResult testResultMessage); @Override void onEditTabSelected(); @Override void addBackgroundPage(final ScenarioGridWidget scenarioGridWidget); @Override void selectSimulationTab(); @Override void selectBackgroundTab(); @Override AbstractScenarioSimulationDocksHandler getScenarioSimulationDocksHandler(); @Override ScenarioSimulationEditorPresenter getScenarioSimulationEditorPresenter(); @Override void resetContentHash(); void onStartup(final PlaceRequest place); void gotoPath(Path path); Path getCurrentPath(); @Override boolean mayClose(); @Override IsWidget getTitle(); @Override MultiPageEditorContainerView getWidget(); FileMenuBuilder getFileMenuBuilder(); void setMenus(final Consumer<Menus> menusConsumer); @Override void onRunScenario(RemoteCallback<SimulationRunResult> refreshModelCallback, ScenarioSimulationHasBusyIndicatorDefaultErrorCallback scenarioSimulationHasBusyIndicatorDefaultErrorCallback, ScesimModelDescriptor simulationDescriptor, Settings settings, List<ScenarioWithIndex> toRun, Background background); @Override Integer getOriginalHash();  }