UserEditor implements IsWidget,
                                   org.uberfire.ext.security.management.client.editor.user.UserEditor { public UserEditor setEditButtonVisible(boolean isVisible) { view.setEditButtonVisible(isVisible); return this; } @Inject  UserEditor(final ClientUserSystemManager userSystemManager,
                      final UserAttributesEditor userAttributesEditor,
                      final UserAssignedGroupsExplorer userAssignedGroupsExplorer,
                      final UserAssignedGroupsEditor userAssignedGroupsEditor,
                      final UserAssignedRolesExplorer userAssignedRolesExplorer,
                      final UserAssignedRolesEditor userAssignedRolesEditor,
                      final ACLViewer aclViewer,
                      final Event<OnEditEvent> onEditEvent,
                      final Event<OnShowEvent> onShowEvent,
                      final Event<OnDeleteEvent> onDeleteEvent,
                      final Event<OnChangePasswordEvent> onChangePasswordEvent,
                      final View view); @PostConstruct void init(); @Override Widget asWidget(); @Override String identifier(); @Override UserAttributesEditor attributesEditor(); @Override UserAssignedGroupsExplorer groupsExplorer(); @Override org.uberfire.ext.security.management.client.editor.user.UserAssignedRolesExplorer rolesExplorer(); UserAssignedGroupsEditor groupsEditor(); UserAssignedRolesEditor rolesEditor(); @Override void show(final User user); @Override void edit(final User user); @Override void flush(); @Override User getValue(); @Override void setViolations(final Set<ConstraintViolation<User>> violations); void clear(); UserEditor setEditButtonVisible(boolean isVisible); UserEditor setDeleteButtonVisible(boolean isVisible); UserEditor setChangePasswordButtonVisible(boolean isVisible); UserEditor setAttributesEditorVisible(boolean isVisible); UserEditor setAddToGroupsButtonVisible(boolean isVisible); UserEditor setPermissionsVisible(boolean isVisible); ACLViewer getACLViewer(); boolean canAssignGroups(); boolean canAssignRoles(); public View view; }
@Test public void testSetEditButtonVisible() { presenter.setEditButtonVisible(true); verify(view, times(1)).setEditButtonVisible(true); verify(view, times(0)).setAddToGroupsButtonVisible(anyBoolean()); verify(view, times(0)).setAttributesEditorVisible(anyBoolean()); verify(view, times(0)).setChangePasswordButtonVisible(anyBoolean()); verify(view, times(0)).setDeleteButtonVisible(anyBoolean()); verify(view, times(0)).setUsername(anyString()); }