private void CheckWithoutContentType(IHttpRequestContentPattern contentPattern, byte[] rightContentBytes, string rightContentType) { contentPattern.IsMatch(rightContentBytes, rightContentType).ShouldBeEquivalentTo(true); contentPattern.IsMatch(GenBytes(), rightContentType).ShouldBeEquivalentTo(false); contentPattern.IsMatch(rightContentBytes, GenString()).ShouldBeEquivalentTo(true); contentPattern.IsMatch(GenBytes(), GenString()).ShouldBeEquivalentTo(false); }
public IHttpRequestMock Content(IHttpRequestContentPattern httpRequestContentPattern) { if (httpRequestContentPattern == null) { throw new ArgumentNullException(nameof(httpRequestContentPattern)); } httpRequestMock.Content = httpRequestContentPattern; return(this); }
public void TestAny() { IHttpRequestContentPattern contentPattern = ContentPattern.Any(); contentPattern.IsMatch(GenBytes(), GenString()).ShouldBeEquivalentTo(true); }