@Test public void testOwnerInvalid() { ownerAce.setConsumerPermission(Permission.YES); AceValidator validator = new AceValidator(masterAce, mediatorAce, ownerAce); assertFalse("modified owner is invalid", validator.isOwnerValid()); }
@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()); }
@Test public void testOwnerValid() { AceValidator validator = new AceValidator(masterAce, mediatorAce, ownerAce); assertTrue("initial owner is valid", validator.isOwnerValid()); }
@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()); }