public void ShouldSample_RegexMatches(string path, bool expected) { var unit = new RegexSamplingFilter("hello", true); var request = Mock.Of <HttpRequest>(r => r.Path == path); unit.ShouldSample(request).Should().Be(expected); }
public void ShouldSample_NullRequest() { var unit = new RegexSamplingFilter("Anything", true); unit.Invoking(u => u.ShouldSample(null)) .Should() .Throw <ArgumentNullException>( "beacuse we supplied a null HttpRequest"); }