@Test public void testIsComplete() { when(view.getRuntimeName()).thenReturn(EMPTY_STRING); when(view.getImageStreamsURL()).thenReturn(EMPTY_STRING); when(view.getSecretsFileURL()).thenReturn(EMPTY_STRING); presenter.isComplete(Assert::assertFalse); when(view.getRuntimeName()).thenReturn(RUNTIME_NAME_VALUE); when(openShiftClientService.isValidProjectName(RUNTIME_NAME_VALUE)).thenReturn(true); presenter.onRuntimeNameChange(); presenter.isComplete(Assert::assertFalse); when(view.getImageStreamsURL()).thenReturn(DEFAULT_OPEN_SHIFT_IMAGE_STREAMS_VALUE); presenter.isComplete(Assert::assertFalse); when(view.getSecretsFileURL()).thenReturn(DEFAULT_OPEN_SHIFT_SECRETS_VALUE); presenter.isComplete(Assert::assertFalse); when(view.getTemplateURL()).thenReturn(DEFAULT_OPEN_SHIFT_TEMPLATE_VALUE); when(openShiftClientService.getTemplateModel(DEFAULT_OPEN_SHIFT_TEMPLATE_VALUE)).thenReturn(templateDescriptorModel); presenter.onTemplateURLChange(); presenter.isComplete(Assert::assertFalse); requiredTemplateParams.forEach(param -> param.setValue("some value")); presenter.isComplete(Assert::assertTrue); }
@Override public void isComplete(final Callback<Boolean> callback) { boolean isValid = isRuntimeValid() && isTemplateValid() && isParamsValid() && isImageStreamsURLValid() && isSecretsFileURLValid(); callback.callback(isValid); }
TemplateParamsFormPresenter extends AbstractHasContentChangeHandlers implements PipelineParamsForm { @Override public void isComplete(final Callback<Boolean> callback) { boolean isValid = isRuntimeValid() && isTemplateValid() && isParamsValid() && isImageStreamsURLValid() && isSecretsFileURLValid(); callback.callback(isValid); } }
TemplateParamsFormPresenter extends AbstractHasContentChangeHandlers implements PipelineParamsForm { @Override public void isComplete(final Callback<Boolean> callback) { boolean isValid = isRuntimeValid() && isTemplateValid() && isParamsValid() && isImageStreamsURLValid() && isSecretsFileURLValid(); callback.callback(isValid); } @Inject  TemplateParamsFormPresenter(final View view,
                                       final TemplateParamsTablePresenter paramsEditorPresenter,
                                       final TranslationService translationService,
                                       final PopupHelper popupHelper,
                                       final Caller<OpenShiftClientService> openShiftClientService,
                                       final OpenShiftClientValidationService openShiftClientValidationService); }
TemplateParamsFormPresenter extends AbstractHasContentChangeHandlers implements PipelineParamsForm { @Override public void isComplete(final Callback<Boolean> callback) { boolean isValid = isRuntimeValid() && isTemplateValid() && isParamsValid() && isImageStreamsURLValid() && isSecretsFileURLValid(); callback.callback(isValid); } @Inject  TemplateParamsFormPresenter(final View view,
                                       final TemplateParamsTablePresenter paramsEditorPresenter,
                                       final TranslationService translationService,
                                       final PopupHelper popupHelper,
                                       final Caller<OpenShiftClientService> openShiftClientService,
                                       final OpenShiftClientValidationService openShiftClientValidationService); @PostConstruct void init(); @Override String getWizardTitle(); @Override View getView(); @Override Map<String, String> buildParams(); @Override void initialise(); @Override void prepareView(); @Override void isComplete(final Callback<Boolean> callback); @Override void clear(); }
TemplateParamsFormPresenter extends AbstractHasContentChangeHandlers implements PipelineParamsForm { @Override public void isComplete(final Callback<Boolean> callback) { boolean isValid = isRuntimeValid() && isTemplateValid() && isParamsValid() && isImageStreamsURLValid() && isSecretsFileURLValid(); callback.callback(isValid); } @Inject  TemplateParamsFormPresenter(final View view,
                                       final TemplateParamsTablePresenter paramsEditorPresenter,
                                       final TranslationService translationService,
                                       final PopupHelper popupHelper,
                                       final Caller<OpenShiftClientService> openShiftClientService,
                                       final OpenShiftClientValidationService openShiftClientValidationService); @PostConstruct void init(); @Override String getWizardTitle(); @Override View getView(); @Override Map<String, String> buildParams(); @Override void initialise(); @Override void prepareView(); @Override void isComplete(final Callback<Boolean> callback); @Override void clear(); static final String PARAM_DELIMITER; static final String PARAM_ASSIGNER; static final String CONTAINER_DELIMITER; static final String RESOURCE_TEMPLATE_PARAM_VALUES; static final String RESOURCE_TEMPLATE_URI; static final String RESOURCE_SECRETS_URI; static final String RESOURCE_STREAMS_URI; static final String APPLICATION_NAME; static final String PROJECT_NAME; static final String SERVICE_NAME; static final String KIE_SERVER_CONTAINER_DEPLOYMENT; static final String IMAGE_STREAM_NAMESPACE_TEMPLATE_PARAM; static final String APPLICATION_NAME_TEMPLATE_PARAM; static final String SERVICE_NAME_SUFFIX; static final String HORNETQ_QUEUES; static final String HORNETQ_TOPICS; static final String HORNETQ_CLUSTER_PASSWORD; }