Examples of modifyPrincipals()


Examples of gabriel.components.context.AccessContext.modifyPrincipals()

    ownable.expects(once()).method("getOwner").will(returnValue(new Principal("NotOwner")));

    AccessContext context = new OwnerAccessContext((Ownable) ownable.proxy());
    Set principals = new HashSet();
    principals.add(new Principal("TestOwner"));
    context.modifyPrincipals(principals);
    assertTrue("Owner principal was not added to list.",
        !principals.contains(new Principal("Owner")));
  }

  public void testModifyPrincipalsIfOwner() {
View Full Code Here

Examples of gabriel.components.context.AccessContext.modifyPrincipals()


    AccessContext context = new OwnerAccessContext((Ownable) ownable.proxy());
    Set principals = new HashSet();
    principals.add(new Principal("TestOwner"));
    context.modifyPrincipals(principals);
    assertTrue("Owner principal was added to list.",
        principals.contains(new Principal("Owner")));
  }
}
View Full Code Here

Examples of gabriel.components.context.OwnerAccessContext.modifyPrincipals()

    ownable.expects(once()).method("getOwner").will(returnValue(new Principal("NotOwner")));

    AccessContext context = new OwnerAccessContext((Ownable) ownable.proxy());
    Set principals = new HashSet();
    principals.add(new Principal("TestOwner"));
    context.modifyPrincipals(principals);
    assertTrue("Owner principal was not added to list.",
        !principals.contains(new Principal("Owner")));
  }

  public void testModifyPrincipalsIfOwner() {
View Full Code Here

Examples of gabriel.components.context.OwnerAccessContext.modifyPrincipals()


    AccessContext context = new OwnerAccessContext((Ownable) ownable.proxy());
    Set principals = new HashSet();
    principals.add(new Principal("TestOwner"));
    context.modifyPrincipals(principals);
    assertTrue("Owner principal was added to list.",
        principals.contains(new Principal("Owner")));
  }
}
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.