NewUserAttributeEditor implements IsWidget,
                                               HasRestrictedValues<Collection<String>> { void onNewAttributeClick() { showForm(); } @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 testOnNewAttributeClick() { presenter.showForm(); 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(false); verify(view, times(1)).setShowForm(true); verify(view, times(0)).createAttributeNameError(anyString(), anyString()); verify(view, times(0)).createAttributeValueError(anyString(), anyString()); }