Package gwtappcontainer.server.apis.admin

Examples of gwtappcontainer.server.apis.admin.AdminAPI.unassignRoleToUser()


      resp = api.assignRoleToUser("dummy", "dummy", null);
      } catch (APIException ex) {
        assertTrue(ex.statusCode == Status.ERROR_LOGIN_REQUIRED);
      }
     
      resp = api.unassignRoleToUser("dummy", "dummy", null);
      assertTrue(resp.statusCode == Status.ERROR_LOGIN_REQUIRED);
    }
   
    @Test
    public void adminCanAddUserAssignUnassignRole() {
View Full Code Here


      assertTrue(resp.statusCode == Status.SUCCESS);
     
      resp = api.assignRoleToUser(email, role, user);
      assertTrue(resp.statusCode == Status.SUCCESS);
     
      resp = api.unassignRoleToUser(email, role, user);
      assertTrue(resp.statusCode == Status.SUCCESS);
    }
   
    @Test
    public void assigningExistingRoleGivesResourceAlreadyExistsError() {
View Full Code Here

      assertTrue(resp.statusCode == Status.SUCCESS);
     
      resp = api.assignRoleToUser(email, role, user);
      assertTrue(resp.statusCode == Status.SUCCESS);
     
      resp = api.unassignRoleToUser(email, role, user);
      assertTrue(resp.statusCode == Status.SUCCESS);
     
      //try to unassign again
      resp = api.unassignRoleToUser(email, role, user);
      assertTrue(resp.statusCode == Status.ERROR_RESOURCE_DOES_NOT_EXIST);           
View Full Code Here

     
      resp = api.unassignRoleToUser(email, role, user);
      assertTrue(resp.statusCode == Status.SUCCESS);
     
      //try to unassign again
      resp = api.unassignRoleToUser(email, role, user);
      assertTrue(resp.statusCode == Status.ERROR_RESOURCE_DOES_NOT_EXIST);           
    }
   
    @Test
    public void addingExistingEmailGivesResourceAlreadyExistsError() {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.