예제 #1
0
 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);
 }
예제 #2
0
        public IHttpRequestMock Content(IHttpRequestContentPattern httpRequestContentPattern)
        {
            if (httpRequestContentPattern == null)
            {
                throw new ArgumentNullException(nameof(httpRequestContentPattern));
            }

            httpRequestMock.Content = httpRequestContentPattern;
            return(this);
        }
예제 #3
0
        public void TestAny()
        {
            IHttpRequestContentPattern contentPattern = ContentPattern.Any();

            contentPattern.IsMatch(GenBytes(), GenString()).ShouldBeEquivalentTo(true);
        }