@Test public void testLoadContentSuccess() throws Exception { final RuleModellerActionPlugin pluginOne = mock(RuleModellerActionPlugin.class); final RuleModellerActionPlugin pluginTwo = mock(RuleModellerActionPlugin.class); doAnswer(invocationOnMock -> { final Consumer<RuleModellerActionPlugin> consumer = invocationOnMock.getArgumentAt(0, Consumer.class); consumer.accept(pluginOne); consumer.accept(pluginTwo); return null; }).when(actionPluginInstance).forEach(any()); presenter.loadContent(); verify(kieEditorWrapperView).clear(); verify(kieEditorWrapperView).addMainEditorPage(view); verify(kieEditorWrapperView).addOverviewPage(any(), any()); verify(kieEditorWrapperView).addImportsTab(eq(importsWidgetPresenter)); verify(kieEditorWrapperView).addSourcePage(any()); verify(oracleFactory).makeAsyncPackageDataModelOracle(resourcePath, ruleModel, payload); verify(overviewWidgetPresenter).setContent(overview, resourcePath); verify(importsWidgetPresenter).setContent(oracle, imports, false); verify(view).hideBusyIndicator(); verify(view).setContent(eq(ruleModel), pluginsListCaptor.capture(), eq(oracle), eq(ruleNamesServiceCaller), eq(false), eq(false)); Assertions.assertThat(pluginsListCaptor.getValue()).containsExactly(pluginOne, pluginTwo); }
protected void loadContent() { view.showLoading(); getService().call(getModelSuccessCallback(), getNoSuchFileExceptionErrorCallback()).loadContent(getVersionRecordManager().getCurrentPath()); }
GuidedRuleEditorPresenter extends KieEditor<RuleModel> { protected void loadContent() { view.showLoading(); getService().call(getModelSuccessCallback(), getNoSuchFileExceptionErrorCallback()).loadContent(getVersionRecordManager().getCurrentPath()); } }
GuidedRuleEditorPresenter extends KieEditor<RuleModel> { protected void loadContent() { view.showLoading(); getService().call(getModelSuccessCallback(), getNoSuchFileExceptionErrorCallback()).loadContent(getVersionRecordManager().getCurrentPath()); } @Inject  GuidedRuleEditorPresenter(final GuidedRuleEditorView view); }
GuidedRuleEditorPresenter extends KieEditor<RuleModel> { protected void loadContent() { view.showLoading(); getService().call(getModelSuccessCallback(), getNoSuchFileExceptionErrorCallback()).loadContent(getVersionRecordManager().getCurrentPath()); } @Inject  GuidedRuleEditorPresenter(final GuidedRuleEditorView view); @OnStartup void onStartup(final ObservablePath path,
                          final PlaceRequest place); @Override void onSourceTabSelected(); void handleImportAddedEvent(@Observes ImportAddedEvent event); void handleImportRemovedEvent(@Observes ImportRemovedEvent event); @OnClose @Override void onClose(); @OnMayClose boolean mayClose(); @WorkbenchPartTitle String getTitleText(); @WorkbenchPartTitleDecoration IsWidget getTitle(); @WorkbenchPartView IsWidget getWidget(); @WorkbenchMenu void getMenus(final Consumer<Menus> menusConsumer); }
GuidedRuleEditorPresenter extends KieEditor<RuleModel> { protected void loadContent() { view.showLoading(); getService().call(getModelSuccessCallback(), getNoSuchFileExceptionErrorCallback()).loadContent(getVersionRecordManager().getCurrentPath()); } @Inject  GuidedRuleEditorPresenter(final GuidedRuleEditorView view); @OnStartup void onStartup(final ObservablePath path,
                          final PlaceRequest place); @Override void onSourceTabSelected(); void handleImportAddedEvent(@Observes ImportAddedEvent event); void handleImportRemovedEvent(@Observes ImportRemovedEvent event); @OnClose @Override void onClose(); @OnMayClose boolean mayClose(); @WorkbenchPartTitle String getTitleText(); @WorkbenchPartTitleDecoration IsWidget getTitle(); @WorkbenchPartView IsWidget getWidget(); @WorkbenchMenu void getMenus(final Consumer<Menus> menusConsumer); static final String EDITOR_ID; }