use of elemental2.dom.HTMLButtonElement in project kie-wb-common by kiegroup.
the class NotificationEditorWidgetTest method setUp.
@Before
public void setUp() throws Exception {
super.setUp();
GwtMockito.initMocks(this);
BaseModal modal = mock(BaseModal.class);
taskExpiration = mock(Select.class);
setFieldValue(view, "taskExpiration", taskExpiration);
Option notStarted = mock(Option.class);
notCompleted = mock(Option.class);
customerBinder = mock(DataBinder.class);
searchSelectionReplyToHandler = mock(SingleLiveSearchSelectionHandler.class);
searchSelectionFromHandler = mock(SingleLiveSearchSelectionHandler.class);
multipleLiveSearchSelectionHandlerUsers = mock(MultipleLiveSearchSelectionHandler.class);
multipleLiveSearchSelectionHandlerGroups = mock(MultipleLiveSearchSelectionHandler.class);
notCompletedInput = mock(HTMLInputElement.class);
notStartedInput = mock(HTMLInputElement.class);
incorrectEmail = mock(ParagraphElement.class);
doNothing().when(view).markEmailsAsCorrect();
doNothing().when(modal).hide();
doNothing().when(modal).show();
doNothing().when(notificationEvent).fire(any(NotificationEvent.class));
presenter = new NotificationEditorWidget(view, translationService);
doCallRealMethod().when(typeSelect).setValue(any(String.class));
doCallRealMethod().when(typeSelect).getValue();
doCallRealMethod().when(view).setReadOnly(any(boolean.class));
doNothing().when(view).createOrEdit(any(NotificationWidgetView.class), any(NotificationRow.class));
doNothing().when(view).ok();
setFieldValue(view, "modal", modal);
setFieldValue(view, "body", body);
setFieldValue(view, "customerBinder", customerBinder);
setFieldValue(view, "notCompletedInput", notCompletedInput);
setFieldValue(view, "notStartedInput", notStartedInput);
setFieldValue(view, "subject", subject);
setFieldValue(view, "emails", subject);
setFieldValue(view, "searchSelectionFromHandler", searchSelectionFromHandler);
setFieldValue(view, "searchSelectionReplyToHandler", searchSelectionReplyToHandler);
setFieldValue(view, "multipleLiveSearchSelectionHandlerUsers", multipleLiveSearchSelectionHandlerUsers);
setFieldValue(view, "multipleLiveSearchSelectionHandlerGroups", multipleLiveSearchSelectionHandlerGroups);
setFieldValue(view, "notificationEvent", notificationEvent);
setFieldValue(view, "validator", validator);
setFieldValue(view, "closeButton", new HTMLButtonElement());
setFieldValue(view, "okButton", new HTMLButtonElement());
setFieldValue(view, "customerBinder", customerBinder);
setFieldValue(view, "typeSelect", typeSelect);
setFieldValue(view, "notStarted", notStarted);
setFieldValue(view, "notCompleted", notCompleted);
setFieldValue(view, "incorrectEmail", incorrectEmail);
doCallRealMethod().when(body).setValue(any(String.class));
doCallRealMethod().when(body).getValue();
doCallRealMethod().when(subject).setValue(any(String.class));
doCallRealMethod().when(subject).getValue();
doCallRealMethod().when(typeSelect).setValue(any(String.class));
doCallRealMethod().when(typeSelect).getValue();
setFieldValue(liveSearchReplyToDropDown, "view", liveSearchDropDownView);
when(validator.validate(any(NotificationRow.class))).thenReturn(Collections.EMPTY_SET);
doNothing().when(liveSearchReplyToDropDown).setSelectedItem(any(String.class));
doCallRealMethod().when(view).init(any(NotificationEditorWidgetView.Presenter.class));
when(translationService.getValue(any(String.class))).thenReturn("Notification");
}
Aggregations