@Test public void testIsCapabilityValid() { when( view.isPlanningCapabilityChecked() ).thenReturn( true, false, true, false ); when( view.isRuleCapabilityChecked() ).thenReturn( true, false, false ); when( view.isProcessCapabilityChecked() ).thenReturn( true, true, false ); assertTrue( presenter.isCapabilityValid() ); assertTrue( presenter.isCapabilityValid() ); assertTrue( presenter.isCapabilityValid() ); assertFalse( presenter.isCapabilityValid() ); }
public boolean isCapabilityValid() { if (view.isPlanningCapabilityChecked() && view.isRuleCapabilityChecked()) { return true; } if (view.isProcessCapabilityChecked() || view.isRuleCapabilityChecked()) { return true; } return false; }
NewTemplatePresenter implements WizardPage { public boolean isCapabilityValid() { if (view.isPlanningCapabilityChecked() && view.isRuleCapabilityChecked()) { return true; } if (view.isProcessCapabilityChecked() || view.isRuleCapabilityChecked()) { return true; } return false; } }
NewTemplatePresenter implements WizardPage { public boolean isCapabilityValid() { if (view.isPlanningCapabilityChecked() && view.isRuleCapabilityChecked()) { return true; } if (view.isProcessCapabilityChecked() || view.isRuleCapabilityChecked()) { return true; } return false; } @Inject  NewTemplatePresenter(final View view,
                                final Caller<SpecManagementService> specManagementService,
                                final Event<WizardPageStatusChangeEvent> wizardPageStatusChangeEvent); }
NewTemplatePresenter implements WizardPage { public boolean isCapabilityValid() { if (view.isPlanningCapabilityChecked() && view.isRuleCapabilityChecked()) { return true; } if (view.isProcessCapabilityChecked() || view.isRuleCapabilityChecked()) { return true; } return false; } @Inject  NewTemplatePresenter(final View view,
                                final Caller<SpecManagementService> specManagementService,
                                final Event<WizardPageStatusChangeEvent> wizardPageStatusChangeEvent); boolean hasProcessCapability(); String getTemplateName(); @PostConstruct void init(); @Override String getTitle(); @Override void isComplete(final Callback<Boolean> callback); void addContentChangeHandler(final ContentChangeHandler contentChangeHandler); @Override void initialise(); @Override void prepareView(); @Override Widget asWidget(); boolean isValid(); boolean isTemplateNameValid(); boolean isCapabilityValid(); void clear(); boolean isRuleCapabilityChecked(); boolean isProcessCapabilityChecked(); boolean isPlanningCapabilityChecked(); View getView(); }
NewTemplatePresenter implements WizardPage { public boolean isCapabilityValid() { if (view.isPlanningCapabilityChecked() && view.isRuleCapabilityChecked()) { return true; } if (view.isProcessCapabilityChecked() || view.isRuleCapabilityChecked()) { return true; } return false; } @Inject  NewTemplatePresenter(final View view,
                                final Caller<SpecManagementService> specManagementService,
                                final Event<WizardPageStatusChangeEvent> wizardPageStatusChangeEvent); boolean hasProcessCapability(); String getTemplateName(); @PostConstruct void init(); @Override String getTitle(); @Override void isComplete(final Callback<Boolean> callback); void addContentChangeHandler(final ContentChangeHandler contentChangeHandler); @Override void initialise(); @Override void prepareView(); @Override Widget asWidget(); boolean isValid(); boolean isTemplateNameValid(); boolean isCapabilityValid(); void clear(); boolean isRuleCapabilityChecked(); boolean isProcessCapabilityChecked(); boolean isPlanningCapabilityChecked(); View getView();  }