@Test public void testCreate_WithWizard() { final String fileName = "fileName"; final Package pkg = mock(Package.class); final Path resourcesPath = PathFactory.newPath("resources", "default: when(pkg.getPackageMainResourcesPath()).thenReturn(resourcesPath); when(options.isUsingWizard()).thenReturn(true); when(options.getTableFormat()).thenReturn(TableFormat.EXTENDED_ENTRY); when(options.getHitPolicy()).thenReturn(GuidedDecisionTable52.HitPolicy.FIRST_HIT); handler.create(pkg, fileName, newResourcePresenter); verify(wizardBean, times(1)).setContent(pathCaptor.capture(), fileNameCaptor.capture(), eq(TableFormat.EXTENDED_ENTRY), eq(GuidedDecisionTable52.HitPolicy.FIRST_HIT), any(AsyncPackageDataModelOracle.class), any(NewGuidedDecisionTableWizard.GuidedDecisionTableWizardHandler.class)); }
@Override public void create(final Package pkg, final String baseFileName, final NewResourcePresenter presenter) { this.newResourcePresenter = presenter; if (!options.isUsingWizard()) { createEmptyDecisionTable(pkg.getPackageMainResourcesPath(), baseFileName); } else { createDecisionTableWithWizard(pkg.getPackageMainResourcesPath(), baseFileName); } }
NewGuidedDecisionTableHandler extends DefaultNewResourceHandler { @Override public void create(final Package pkg, final String baseFileName, final NewResourcePresenter presenter) { this.newResourcePresenter = presenter; if (!options.isUsingWizard()) { createEmptyDecisionTable(pkg.getPackageMainResourcesPath(), baseFileName); } else { createDecisionTableWithWizard(pkg.getPackageMainResourcesPath(), baseFileName); } } }
NewGuidedDecisionTableHandler extends DefaultNewResourceHandler { @Override public void create(final Package pkg, final String baseFileName, final NewResourcePresenter presenter) { this.newResourcePresenter = presenter; if (!options.isUsingWizard()) { createEmptyDecisionTable(pkg.getPackageMainResourcesPath(), baseFileName); } else { createDecisionTableWithWizard(pkg.getPackageMainResourcesPath(), baseFileName); } } NewGuidedDecisionTableHandler(); @Inject  NewGuidedDecisionTableHandler(final PlaceManager placeManager,
                                         final Caller<GuidedDecisionTableEditorService> service,
                                         final GuidedDTableResourceType resourceType,
                                         final GuidedDecisionTableOptions options,
                                         final BusyIndicatorView busyIndicatorView,
                                         final NewGuidedDecisionTableWizardHelper helper); }
NewGuidedDecisionTableHandler extends DefaultNewResourceHandler { @Override public void create(final Package pkg, final String baseFileName, final NewResourcePresenter presenter) { this.newResourcePresenter = presenter; if (!options.isUsingWizard()) { createEmptyDecisionTable(pkg.getPackageMainResourcesPath(), baseFileName); } else { createDecisionTableWithWizard(pkg.getPackageMainResourcesPath(), baseFileName); } } NewGuidedDecisionTableHandler(); @Inject  NewGuidedDecisionTableHandler(final PlaceManager placeManager,
                                         final Caller<GuidedDecisionTableEditorService> service,
                                         final GuidedDTableResourceType resourceType,
                                         final GuidedDecisionTableOptions options,
                                         final BusyIndicatorView busyIndicatorView,
                                         final NewGuidedDecisionTableWizardHelper helper); @Override String getDescription(); @Override IsWidget getIcon(); @Override ResourceTypeDefinition getResourceType(); @Override void create(final Package pkg,
                       final String baseFileName,
                       final NewResourcePresenter presenter); @Override int order(); }
NewGuidedDecisionTableHandler extends DefaultNewResourceHandler { @Override public void create(final Package pkg, final String baseFileName, final NewResourcePresenter presenter) { this.newResourcePresenter = presenter; if (!options.isUsingWizard()) { createEmptyDecisionTable(pkg.getPackageMainResourcesPath(), baseFileName); } else { createDecisionTableWithWizard(pkg.getPackageMainResourcesPath(), baseFileName); } } NewGuidedDecisionTableHandler(); @Inject  NewGuidedDecisionTableHandler(final PlaceManager placeManager,
                                         final Caller<GuidedDecisionTableEditorService> service,
                                         final GuidedDTableResourceType resourceType,
                                         final GuidedDecisionTableOptions options,
                                         final BusyIndicatorView busyIndicatorView,
                                         final NewGuidedDecisionTableWizardHelper helper); @Override String getDescription(); @Override IsWidget getIcon(); @Override ResourceTypeDefinition getResourceType(); @Override void create(final Package pkg,
                       final String baseFileName,
                       final NewResourcePresenter presenter); @Override int order();  }