public void Evaluate_should_succeed_for_valid_roles() { _perm.Roles.Add("foo"); var result = LocalPermissionService.Evaluate(_perm, new[] { "foo" }); result.Should().BeTrue(); }
public void Evaluate_should_fail_for_invalid_roles() { var result = LocalPermissionService.Evaluate(_perm, new[] { "foo" }); result.Should().BeFalse(); }
public void Evaluate_should_require_roles() { Action a = () => LocalPermissionService.Evaluate(_perm, null); a.Should().Throw <ArgumentNullException>(); }