UserAttributesEditor implements IsWidget,
                                             org.uberfire.ext.security.management.client.editor.user.UserAttributesEditor { public void clear() { userAttributesProvider.getList().clear(); attributes = null; isEditMode = false; } @Inject  UserAttributesEditor(final ClientUserSystemManager userSystemManager,
                                final ConfirmBox confirmBox,
                                final Event<CreateUserAttributeEvent> createUserAttributeEventEvent,
                                final Event<UpdateUserAttributeEvent> updateUserAttributeEventEvent,
                                final Event<DeleteUserAttributeEvent> deleteUserAttributeEventEvent,
                                final Event<OnErrorEvent> errorEvent,
                                final NewUserAttributeEditor newUserAttributeEditor,
                                final View view); @PostConstruct void init(); @Override void show(final User user); @Override void edit(final User user); @Override void flush(); @Override Map<String, String> getValue(); @Override void setViolations(Set<ConstraintViolation<User>> constraintViolations); void clear(); @Override Widget asWidget(); public View view; }
@Test public void testClear() { presenter.attributes = new HashMap<UserManager.UserAttribute, String>(); presenter.isEditMode = true; presenter.clear(); assertNull(presenter.attributes); assertFalse(presenter.isEditMode); verify(view, times(0)).init(presenter); verify(view, times(0)).initWidgets(any(NewUserAttributeEditor.View.class)); verify(view, times(0)).getColumnCount(); verify(view, times(0)).setColumnSortHandler(any(ColumnSortEvent.ListHandler.class)); verify(view, times(0)).addColumn(any(Column.class), anyString()); verify(view, times(0)).redraw(); verify(view, times(0)).removeColumn(anyInt()); verify(view, times(0)).setCanCreate(anyBoolean()); verify(view, times(0)).showEmpty(); }