Package gwtappcontainer.testhelpers

Examples of gwtappcontainer.testhelpers.MockGateKeeper


      //2. add a role and ensure it gives status code as insufficient permission
      //3. rename a role and ensure it gives status code as insufficient permission
    //3. delete a role and ensure it gives status code as insufficient permission
     
      //1. create a gatekeeper that allows developer
    MockGateKeeper mockGateKeeper = new MockGateKeeper();
    mockGateKeeper.allowRoleToUser("test@example.com", Role.PORTAL_ADMIN);
      AdminAPI api = new AdminAPI();
      api.setGateKeeper(mockGateKeeper);
     
      //2. add a role
      User user = UserServiceFactory.getUserService().getCurrentUser();
View Full Code Here


   

  @Test
    public void roleSavedInUpperCase() {
      AdminAPI api = new AdminAPI();
      MockGateKeeper mockGateKeeper = new MockGateKeeper();
    mockGateKeeper.allowRoleToUser("test@example.com", Role.DEVELOPER);
      api.setGateKeeper(mockGateKeeper);
                 
      User user = UserServiceFactory.getUserService().getCurrentUser();
      api.addRole("testdummy", user);
     
View Full Code Here

TOP

Related Classes of gwtappcontainer.testhelpers.MockGateKeeper

Copyright © 2018 www.massapicom. 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.