I added several more extension methods, as they make using of this library way easier. The changes allow for settings commonly used properties of HTTP Request/Response like Method, Content Type, Body, Content Length.
I also updated the Readme as it lacked simple how-to example.
Example
var context = new HttpContextMock()
.SetupUrl("http://localhost:8000/path")
.SetupRequestMethod("POST")
.SetupRequestContentType("application/json")
.SetupRequestBody(new MemoryStream(data))
.SetupRequestContentLength(data.Length)
.SetupResponseContentType("application/json")
.SetupResponseBody(new MemoryStream(data))
.SetupResponseContentLength(data.Length);
I added several more extension methods, as they make using of this library way easier. The changes allow for settings commonly used properties of HTTP Request/Response like Method, Content Type, Body, Content Length.
I also updated the Readme as it lacked simple how-to example.
Example