public void DisposeNoopsForNullResponse() { var requestMock = new Mock <Request>(); HttpPipelineMessage message = new HttpPipelineMessage(requestMock.Object, new ResponseClassifier()); message.Dispose(); requestMock.Verify(r => r.Dispose(), Times.Once); }
public void DisposingMessageDisposesTheRequestAndResponse() { var requestMock = new Mock <Request>(); var responseMock = new Mock <Response>(); HttpPipelineMessage message = new HttpPipelineMessage(requestMock.Object, new ResponseClassifier()); message.Response = responseMock.Object; message.Dispose(); requestMock.Verify(r => r.Dispose(), Times.Once); responseMock.Verify(r => r.Dispose(), Times.Once); }