public void no_filters_means_that_everything_is_revoked()
        {
            var sut    = new NamespaceFilter();
            var actual = sut.IsSatisfiedBy(typeof(NoFilter));

            actual.Should().BeFalse();
        }
示例#2
0
        public void no_filters_means_that_everything_is_revoked()
        {
            var sut    = new NamespaceFilter();
            var actual = sut.IsSatisfiedBy(typeof(NoFilter));

            Assert.AreEqual(actual, false);
        }
        public void child_ns_is_configured_to_be_allowed__so_allow_it()
        {
            var sut = new NamespaceFilter();

            sut.Allow("Griffin", true);
            var actual = sut.IsSatisfiedBy(typeof(NoFilter));

            actual.Should().BeTrue();
        }
示例#4
0
        public void child_ns_is_configured_to_NOT_be_allowed__so_dont_allow_it()
        {
            var sut = new NamespaceFilter();

            sut.Allow("MicroServer", false);
            var actual = sut.IsSatisfiedBy(typeof(NoFilter));

            Assert.AreEqual(actual, false);
        }
        public void allow_root_but_reject_specific_child()
        {
            var sut = new NamespaceFilter();

            sut.Revoke(typeof(NoFilter).Namespace, false);
            sut.Allow("Griffin", true);
            var actual = sut.IsSatisfiedBy(typeof(NoFilter));

            actual.Should().BeFalse("because a specific filter was set");
        }
        public void allow_root_but_reject_specific_child__make_sure_that_the_root_is_allowed()
        {
            var sut = new NamespaceFilter();

            sut.Revoke(typeof(NoFilter).Namespace, false);
            sut.Allow("Griffin", true);
            var actual = sut.IsSatisfiedBy(typeof(GuidFactory));

            actual.Should().BeTrue();
        }
示例#7
0
        public void allow_root_but_reject_specific_child()
        {
            var sut = new NamespaceFilter();

            sut.Revoke(typeof(NoFilter).Namespace, false);
            sut.Allow("MicroServer", true);
            var actual = sut.IsSatisfiedBy(typeof(NoFilter));

            Assert.AreEqual(actual, false, "because a specific filter was set");
        }
示例#8
0
        public void allow_root_but_reject_specific_child__make_sure_that_the_root_is_allowed()
        {
            var sut = new NamespaceFilter();

            sut.Revoke(typeof(NoFilter).Namespace, false);
            sut.Allow("MicroServer", true);
            var actual = sut.IsSatisfiedBy(typeof(Guid));

            Assert.AreEqual(actual, true);
        }