Ejemplo n.º 1
0
 @Test
 public void testOwnerInvalid() {
   ownerAce.setConsumerPermission(Permission.YES);
   AceValidator validator = new AceValidator(masterAce, mediatorAce, ownerAce);
   assertFalse("modified owner is invalid", validator.isOwnerValid());
 }
Ejemplo n.º 2
0
 @Test
 public void testMediatorInvalidPossibleTrusLevels() {
   mediatorAce.setPossibleRequiredTrustLevels(new TrustLevel[] {TrustLevel.HIGH, TrustLevel.MID});
   AceValidator validator = new AceValidator(masterAce, mediatorAce, ownerAce);
   assertFalse("modified mediator is not valid", validator.isMediatorValid());
 }
Ejemplo n.º 3
0
 @Test
 public void testOwnerValid() {
   AceValidator validator = new AceValidator(masterAce, mediatorAce, ownerAce);
   assertTrue("initial owner is valid", validator.isOwnerValid());
 }
Ejemplo n.º 4
0
 @Test
 public void testMediatorInvalidPossiblePermissions() {
   mediatorAce.setPossibleConsumerPermissions(new Permission[] {Permission.YES, Permission.ASK});
   AceValidator validator = new AceValidator(masterAce, mediatorAce, ownerAce);
   assertFalse("modified mediator is not valid", validator.isMediatorValid());
 }