public void Should_return_correct_content_when_buffered() { var contentProducer = new StreamContentProducer(stream, length); var content = new ContentProducerContent(contentProducer, CancellationToken.None); content.ReadAsByteArrayAsync().Result.Should().Equal(stream.ToArray()); }
public void Should_have_correct_content_length_header() { var contentProducer = new StreamContentProducer(stream, length); var content = new ContentProducerContent(contentProducer, CancellationToken.None); content.Headers.ContentLength.Should().Be(length); }