示例#1
0
        protected internal SecurableResourceInfo(Url url)
        {
            if (url == null)
            {
                throw new ArgumentNullException("url");
            }

            Url = url;
            SecurityRequirements = new ResourceSecurityInfo();
        }
示例#2
0
        public void it_should_merge_specifications()
        {
            var other = new ResourceSecurityInfo().Deny(ExpectedClaim, ExpectedValue);

            _resourceSecurityInfo.Allow(ExpectedClaim, ExpectedValue);

            _resourceSecurityInfo = _resourceSecurityInfo.OverrideWith(other);

            _resourceSecurityInfo.Allowed.Should().BeEmpty();
            _resourceSecurityInfo.Denied[ExpectedClaim].Should().Contain(ExpectedValue);
        }
示例#3
0
 public void Teardown()
 {
     _resourceSecurityInfo = null;
 }
示例#4
0
 public void Setup()
 {
     _resourceSecurityInfo = new ResourceSecurityInfo();
 }