Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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");
        }