DecisionTableXLSEditorPresenter extends KieEditor<DecisionTableXLSContent> implements DecisionTableXLSEditorView.Presenter { @OnStartup public void onStartup(final ObservablePath path, final PlaceRequest place) { ClientResourceType type = getType(path); super.init(path, place, type); view.init(this); view.setupUploadWidget(type); } @Inject  DecisionTableXLSEditorPresenter(final DecisionTableXLSEditorView baseView,
                                           final DecisionTableXLSResourceType decisionTableXLSResourceType,
                                           final DecisionTableXLSXResourceType decisionTableXLSXResourceType,
                                           final BusyIndicatorView busyIndicatorView,
                                           final ValidationPopup validationPopup,
                                           final Caller<DecisionTableXLSService> decisionTableXLSService,
                                           final Caller<MetadataService> metadataService); @OnStartup void onStartup(final ObservablePath path,
                          final PlaceRequest place); @Override void onUpload(); @Override void onUploadSuccess(); @Override void onSourceTabSelected(); @OnClose @Override void onClose(); @WorkbenchPartTitleDecoration IsWidget getTitle(); @WorkbenchPartTitle String getTitleText(); @WorkbenchPartView IsWidget getWidget(); @WorkbenchMenu void getMenus(final Consumer<Menus> menusConsumer); static final String EDITOR_ID; }
@Test public void testXLSSetup() throws Exception { presenter.onStartup(XLSPath, mock(PlaceRequest.class)); verify(view).init(presenter); verify(view).setupUploadWidget(decisionTableXLSResourceType); verify(view).setPath(any(Path.class)); verify(view).setReadOnly(false); }
@Test public void testXLSXSetup() throws Exception { presenter.onStartup(XLSXPath, mock(PlaceRequest.class)); verify(view).init(presenter); verify(view).setupUploadWidget(decisionTableXLSXResourceType); verify(view).setPath(any(Path.class)); verify(view).setReadOnly(false); }