public void DifferentUserNameAndPermissionReturnsDefault()
 {
     DefaultProjectAuthorisation authorisation = new DefaultProjectAuthorisation(SecurityRight.Deny,
         new UserPermission("johndoe", SecurityRight.Inherit, SecurityRight.Inherit, SecurityRight.Allow, SecurityRight.Inherit));
     bool result = authorisation.CheckPermission(null, "janedoe", SecurityPermission.SendMessage, SecurityRight.Inherit);
     Assert.AreEqual(false, result);
 }
 public void MatchingUserNameAndPermissionReturnsRight()
 {
     DefaultProjectAuthorisation authorisation = new DefaultProjectAuthorisation(SecurityRight.Deny,
         new UserPermission("johndoe", SecurityRight.Inherit, SecurityRight.Inherit, SecurityRight.Allow, SecurityRight.Inherit));
     bool result = authorisation.CheckPermission(null, "johndoe", SecurityPermission.ForceAbortBuild, SecurityRight.Inherit);
     Assert.AreEqual(true, result);
 }