コード例 #1
0
        private bool Test(Func <HttpRequestMessage, bool> handler)
        {
            var sut = new CustomMatcher(handler);

            return(sut.Matches(new HttpRequestMessage(HttpMethod.Get,
                                                      "http://tempuri.org/home")));
        }
コード例 #2
0
        public void Matches_uses_supplied_func()
        {
            var flag = false;
            var matcher = new CustomMatcher<string>("", s => { flag = true; return true; });

            matcher.Matches("");

            Assert.IsTrue(flag, "The Func passed into the custom matcher was not called.");
        }
コード例 #3
0
        public void Matches_uses_supplied_func()
        {
            var flag    = false;
            var matcher = new CustomMatcher <string>("", s => { flag = true; return(true); });

            matcher.Matches("");

            Assert.IsTrue(flag, "The Func passed into the custom matcher was not called.");
        }