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); }
public T Execute <T>(IResponseStreamProcessor <T> processor) { using (var response = _request.GetResponse()) using (var stream = response.GetResponseStream()) { return(processor.Process(stream)); } }