@Test public void testInvalidCompletion() { editorHelper.setValid( true ); defPage.isComplete( new Callback<Boolean>() { @Override public void callback( Boolean result ) { assertTrue( result ); } } ); when( mainPanelView.getDriverClass() ).thenReturn( "SomeWrongClassName" ); editorHelper.onDriverClassChange(); defPage.isComplete( new Callback<Boolean>() { @Override public void callback( Boolean result ) { assertFalse( result ); } } ); }
@Override public void isComplete(Callback<Boolean> callback) { boolean complete = editorHelper.isNameValid() && editorHelper.isDriverClassValid() && editorHelper.isGroupIdValid() && editorHelper.isArtifactIdValid() && editorHelper.isVersionValid(); callback.callback(complete); }
DriverDefPage implements WizardPage,
                   DriverDefPageView.Presenter { @Override public void isComplete(Callback<Boolean> callback) { boolean complete = editorHelper.isNameValid() && editorHelper.isDriverClassValid() && editorHelper.isGroupIdValid() && editorHelper.isArtifactIdValid() && editorHelper.isVersionValid(); callback.callback(complete); } }
DriverDefPage implements WizardPage,
                   DriverDefPageView.Presenter { @Override public void isComplete(Callback<Boolean> callback) { boolean complete = editorHelper.isNameValid() && editorHelper.isDriverClassValid() && editorHelper.isGroupIdValid() && editorHelper.isArtifactIdValid() && editorHelper.isVersionValid(); callback.callback(complete); } @Inject  DriverDefPage(final DriverDefPageView view,
                         final DriverDefMainPanel mainPanel,
                         final DriverDefEditorHelper editorHelper,
                         final Event<WizardPageStatusChangeEvent> statusChangeEvent); }
DriverDefPage implements WizardPage,
                   DriverDefPageView.Presenter { @Override public void isComplete(Callback<Boolean> callback) { boolean complete = editorHelper.isNameValid() && editorHelper.isDriverClassValid() && editorHelper.isGroupIdValid() && editorHelper.isArtifactIdValid() && editorHelper.isVersionValid(); callback.callback(complete); } @Inject  DriverDefPage(final DriverDefPageView view,
                         final DriverDefMainPanel mainPanel,
                         final DriverDefEditorHelper editorHelper,
                         final Event<WizardPageStatusChangeEvent> statusChangeEvent); void setDriverDef(DriverDef driverDef); @Override String getTitle(); @Override void isComplete(Callback<Boolean> callback); @Override void initialise(); @Override void prepareView(); @Override Widget asWidget(); void notifyChange(); void setComplete(boolean complete); void clear(); }
DriverDefPage implements WizardPage,
                   DriverDefPageView.Presenter { @Override public void isComplete(Callback<Boolean> callback) { boolean complete = editorHelper.isNameValid() && editorHelper.isDriverClassValid() && editorHelper.isGroupIdValid() && editorHelper.isArtifactIdValid() && editorHelper.isVersionValid(); callback.callback(complete); } @Inject  DriverDefPage(final DriverDefPageView view,
                         final DriverDefMainPanel mainPanel,
                         final DriverDefEditorHelper editorHelper,
                         final Event<WizardPageStatusChangeEvent> statusChangeEvent); void setDriverDef(DriverDef driverDef); @Override String getTitle(); @Override void isComplete(Callback<Boolean> callback); @Override void initialise(); @Override void prepareView(); @Override Widget asWidget(); void notifyChange(); void setComplete(boolean complete); void clear();  }