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");
        }
Exemple #2
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");
        }
        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();
        }
Exemple #4
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);
        }