@Test public void testCreateAndClose() { List<String> groups = Arrays.asList("AAA", "BBB", "CCC", "DDD"); List<String> users = Arrays.asList("aaa", "bbb", "ccc"); doNothing().when(view).hide(); when(subject.getValue()).thenReturn("QWERTY!"); when(body.getValue()).thenReturn("QWERTY!"); NotificationRow test = new NotificationRow(); doNothing().when(view).hide(); when(customerBinder.getModel()).thenReturn(test); when(notCompleted.getValue()).thenReturn(NOT_STARTED_NOTIFY.getAlias()); when(typeSelect.getSelectedItem()).thenReturn(notCompleted); when(searchSelectionReplyToHandler.getSelectedValue()).thenReturn("admin"); when(searchSelectionFromHandler.getSelectedValue()).thenReturn("admin"); when(multipleLiveSearchSelectionHandlerGroups.getSelectedValues()).thenReturn(groups); when(multipleLiveSearchSelectionHandlerUsers.getSelectedValues()).thenReturn(users); view.createOrEdit(notificationWidgetViewImpl, test); view.close(); Assert.assertNotEquals("QWERTY!", test.getSubject()); Assert.assertNotEquals("QWERTY!", test.getBody()); Assert.assertNotEquals("admin", test.getReplyTo()); Assert.assertNotEquals("admin", test.getFrom()); Assert.assertNotEquals(NOT_STARTED_NOTIFY, test.getType()); Assert.assertNotEquals(groups, test.getGroups()); Assert.assertNotEquals(users, test.getUsers()); }
@Override public void createOrEdit(NotificationWidgetView parent, NotificationRow row) { view.createOrEdit(parent, row); }
NotificationEditorWidget implements IsWidget,
                                                 NotificationEditorWidgetView.Presenter { @Override public void createOrEdit(NotificationWidgetView parent, NotificationRow row) { view.createOrEdit(parent, row); } }
NotificationEditorWidget implements IsWidget,
                                                 NotificationEditorWidgetView.Presenter { @Override public void createOrEdit(NotificationWidgetView parent, NotificationRow row) { view.createOrEdit(parent, row); } @Inject  NotificationEditorWidget(NotificationEditorWidgetView view,
                                    ClientTranslationService translationService); }
NotificationEditorWidget implements IsWidget,
                                                 NotificationEditorWidgetView.Presenter { @Override public void createOrEdit(NotificationWidgetView parent, NotificationRow row) { view.createOrEdit(parent, row); } @Inject  NotificationEditorWidget(NotificationEditorWidgetView view,
                                    ClientTranslationService translationService); @Override Widget asWidget(); @Override String getNameHeader(); @Override String getFromLabel(); @Override String getExpirationLabel(Expiration type); @Override void createOrEdit(NotificationWidgetView parent, NotificationRow row); @Override void ok(String emails); @Override String clearEmails(String emails); void setReadOnly(boolean readOnly); @Override void setRepeatNotificationVisibility(boolean isVisible); @Override void setRepeatNotificationInvisibility(boolean isInvisible); @Override void setNotificationPanelDivVisibility(boolean isVisible); @Override void addUsers(List<String> users); @Override void addGroups(List<String> groups); @Override void addFrom(String from); @Override void addReplyTo(String replyTo); @Override Expiration parseExpiration(String expirationAt, Expiration expiration); @Override void setExpiration(Expiration expiration, NotificationRow row); @Override String getRepeatCount(String repeatable); @Override void setExpirationDateTime(String expiresAt); @Override Date parseDate(String date); @Override String clearTimeZone(String value); @Override NotificationType getNotificationType(boolean isNotStarted); @Override boolean isRepeatable(String repeatable); @Override String minuteOrMonth(MatchResult match); }
NotificationEditorWidget implements IsWidget,
                                                 NotificationEditorWidgetView.Presenter { @Override public void createOrEdit(NotificationWidgetView parent, NotificationRow row) { view.createOrEdit(parent, row); } @Inject  NotificationEditorWidget(NotificationEditorWidgetView view,
                                    ClientTranslationService translationService); @Override Widget asWidget(); @Override String getNameHeader(); @Override String getFromLabel(); @Override String getExpirationLabel(Expiration type); @Override void createOrEdit(NotificationWidgetView parent, NotificationRow row); @Override void ok(String emails); @Override String clearEmails(String emails); void setReadOnly(boolean readOnly); @Override void setRepeatNotificationVisibility(boolean isVisible); @Override void setRepeatNotificationInvisibility(boolean isInvisible); @Override void setNotificationPanelDivVisibility(boolean isVisible); @Override void addUsers(List<String> users); @Override void addGroups(List<String> groups); @Override void addFrom(String from); @Override void addReplyTo(String replyTo); @Override Expiration parseExpiration(String expirationAt, Expiration expiration); @Override void setExpiration(Expiration expiration, NotificationRow row); @Override String getRepeatCount(String repeatable); @Override void setExpirationDateTime(String expiresAt); @Override Date parseDate(String date); @Override String clearTimeZone(String value); @Override NotificationType getNotificationType(boolean isNotStarted); @Override boolean isRepeatable(String repeatable); @Override String minuteOrMonth(MatchResult match);  }