private bool MatchExample(HttpRequest request, TransactionExample example) { var payloads = example.GetRequestsCs(); if (!payloads.Any() || request.HttpMethod == "GET") { return(true); } var matchingPayloads = from payload in payloads let isMatch = MatchPayload(request, payload) where isMatch select payload; return(matchingPayloads.Any()); }
public void returns_empty_example_requests_collection() { Assert.IsFalse(_example.GetRequestsCs().Any()); }