NewUserAttributeEditor implements IsWidget,
                                               HasRestrictedValues<Collection<String>> { public NewUserAttributeEditor showAddButton() { view.reset().setShowAddButton(true).setShowForm(false); return this; } @Inject  NewUserAttributeEditor(final View view,
                                  final Event<CreateUserAttributeEvent> createUserAttributeEventEvent); @Override Widget asWidget(); @PostConstruct void init(); NewUserAttributeEditor showAddButton(); NewUserAttributeEditor showForm(); NewUserAttributeEditor clear(); @Override void setRestrictedValues(final Collection<String> value); public View view; }
@Test public void testShowAddButton() { presenter.showAddButton(); verify(view, times(0)).init(any(NewUserAttributeEditor.class)); verify(view, times(0)).configure(any(Validator.class), any(Validator.class)); verify(view, times(1)).reset(); verify(view, times(1)).setShowAddButton(true); verify(view, times(1)).setShowForm(false); verify(view, times(0)).createAttributeNameError(anyString(), anyString()); verify(view, times(0)).createAttributeValueError(anyString(), anyString()); }