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(); }
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(); }
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("MicroServer", true); var actual = sut.IsSatisfiedBy(typeof(Guid)); Assert.AreEqual(actual, true); }