예제 #1
0
        public void no_opinion_about_anything_else()
        {
            var theRule = new DenyConfigRule();

            theRule.IsAllowed(new FubuFile("foo.txt")).ShouldBe(AuthorizationRight.None);
            theRule.IsAllowed(new FubuFile("foo.htm")).ShouldBe(AuthorizationRight.None);
            theRule.IsAllowed(new FubuFile("foo.jpg")).ShouldBe(AuthorizationRight.None);
        }
예제 #2
0
        public void deny_config_files_period()
        {
            var theRule = new DenyConfigRule();

            theRule.IsAllowed(new FubuFile("foo.config")).ShouldBe(AuthorizationRight.Deny);
            theRule.IsAllowed(new FubuFile("web.config")).ShouldBe(AuthorizationRight.Deny);
            theRule.IsAllowed(new FubuFile("foo.asset.config")).ShouldBe(AuthorizationRight.Deny);
        }