コード例 #1
0
        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());
        }
コード例 #2
0
        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);
        }