Exemplo n.º 1
0
        public void no_opinion_about_anything_else()
        {
            var theRule = new DenyConfigRule();

            theRule.IsAllowed(new FubuFile("foo.txt", null)).ShouldEqual(AuthorizationRight.None);
            theRule.IsAllowed(new FubuFile("foo.htm", null)).ShouldEqual(AuthorizationRight.None);
            theRule.IsAllowed(new FubuFile("foo.jpg", null)).ShouldEqual(AuthorizationRight.None);
        }
Exemplo n.º 2
0
        public void deny_config_files_period()
        {
            var theRule = new DenyConfigRule();

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