@Test public void testPageInitialization() { modelerServiceCaller = new CallerMock<DataModelerService>(modelerService); ValuePairEditorPage editorPage = new ValuePairEditorPage(view, valuePairEditorProvider, modelerServiceCaller, wizardPageStatusChangeEvent); editorPage.prepareView(); AnnotationDefinition annotationDefinition = DriverUtils.buildAnnotationDefinition(Entity.class); AnnotationValuePairDefinition valuePairDefinition = annotationDefinition.getValuePair("name"); when(valuePairEditorProvider.getValuePairEditor(valuePairDefinition)).thenReturn(valuePairEditor); editorPage.init(annotationDefinition, valuePairDefinition, ElementType.FIELD, kieModule); verify(view, times(1)).setValuePairEditor(valuePairEditor); WizardTestUtil.assertPageComplete(true, editorPage); }
public void init(AnnotationDefinition annotationDefinition, AnnotationValuePairDefinition valuePairDefinition, ElementType target, KieModule project) { this.annotationDefinition = annotationDefinition; setValuePairDefinition(valuePairDefinition); this.target = target; this.project = project; setStatus(isRequired() ? PageStatus.NOT_VALIDATED : PageStatus.VALIDATED); }
ValuePairEditorPage extends CreateAnnotationWizardPage implements ValuePairEditorPageView.Presenter { public void init(AnnotationDefinition annotationDefinition, AnnotationValuePairDefinition valuePairDefinition, ElementType target, KieModule project) { this.annotationDefinition = annotationDefinition; setValuePairDefinition(valuePairDefinition); this.target = target; this.project = project; setStatus(isRequired() ? PageStatus.NOT_VALIDATED : PageStatus.VALIDATED); } }
ValuePairEditorPage extends CreateAnnotationWizardPage implements ValuePairEditorPageView.Presenter { public void init(AnnotationDefinition annotationDefinition, AnnotationValuePairDefinition valuePairDefinition, ElementType target, KieModule project) { this.annotationDefinition = annotationDefinition; setValuePairDefinition(valuePairDefinition); this.target = target; this.project = project; setStatus(isRequired() ? PageStatus.NOT_VALIDATED : PageStatus.VALIDATED); } @Inject  ValuePairEditorPage(ValuePairEditorPageView view,
                               ValuePairEditorProvider valuePairEditorProvider,
                               Caller<DataModelerService> modelerService,
                               Event<WizardPageStatusChangeEvent> wizardPageStatusChangeEvent); }
ValuePairEditorPage extends CreateAnnotationWizardPage implements ValuePairEditorPageView.Presenter { public void init(AnnotationDefinition annotationDefinition, AnnotationValuePairDefinition valuePairDefinition, ElementType target, KieModule project) { this.annotationDefinition = annotationDefinition; setValuePairDefinition(valuePairDefinition); this.target = target; this.project = project; setStatus(isRequired() ? PageStatus.NOT_VALIDATED : PageStatus.VALIDATED); } @Inject  ValuePairEditorPage(ValuePairEditorPageView view,
                               ValuePairEditorProvider valuePairEditorProvider,
                               Caller<DataModelerService> modelerService,
                               Event<WizardPageStatusChangeEvent> wizardPageStatusChangeEvent); @Override Widget asWidget(); void init(AnnotationDefinition annotationDefinition,
                     AnnotationValuePairDefinition valuePairDefinition, ElementType target, KieModule project); String getStringValue(); AnnotationValuePairDefinition getValuePairDefinition(); Object getCurrentValue(); @Override void onValidate(); @Override void onValueChange(); }
ValuePairEditorPage extends CreateAnnotationWizardPage implements ValuePairEditorPageView.Presenter { public void init(AnnotationDefinition annotationDefinition, AnnotationValuePairDefinition valuePairDefinition, ElementType target, KieModule project) { this.annotationDefinition = annotationDefinition; setValuePairDefinition(valuePairDefinition); this.target = target; this.project = project; setStatus(isRequired() ? PageStatus.NOT_VALIDATED : PageStatus.VALIDATED); } @Inject  ValuePairEditorPage(ValuePairEditorPageView view,
                               ValuePairEditorProvider valuePairEditorProvider,
                               Caller<DataModelerService> modelerService,
                               Event<WizardPageStatusChangeEvent> wizardPageStatusChangeEvent); @Override Widget asWidget(); void init(AnnotationDefinition annotationDefinition,
                     AnnotationValuePairDefinition valuePairDefinition, ElementType target, KieModule project); String getStringValue(); AnnotationValuePairDefinition getValuePairDefinition(); Object getCurrentValue(); @Override void onValidate(); @Override void onValueChange();  }