public void WhenStreamIsNull_ThrowsArgumentException()
        {
            // Arrange

            // Act
            Action act = () => _sut.Process(null);

            // Assert
            act.Should().Throw <ArgumentNullException>().And.ParamName.Should().Be("stream");
        }
        public void WhenStreamIsNull_ReturnNull()
        {
            // Arrange

            // Act
            var result = _sut.Process(null);

            // Assert
            result.Should().Be(null);
        }
Beispiel #3
0
 public T Execute <T>(IResponseStreamProcessor <T> processor)
 {
     using (var response = _request.GetResponse())
         using (var stream = response.GetResponseStream())
         {
             return(processor.Process(stream));
         }
 }