private bool Test(Func <HttpRequestMessage, bool> handler) { var sut = new CustomMatcher(handler); return(sut.Matches(new HttpRequestMessage(HttpMethod.Get, "http://tempuri.org/home"))); }
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."); }
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."); }