コード例 #1
0
        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");
        }
コード例 #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");
        }
コード例 #3
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("Griffin", true);
            var actual = sut.IsSatisfiedBy(typeof(GuidFactory));

            actual.Should().BeTrue();
        }
コード例 #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);
        }