public async void HttpDeleteSendJsonWithResponseTest() { ResponseBase result = await _client.Patch() .Url("http://localhost:3000/ping_pong") .Send(); uint statusCode = result.StatusCode(); var content = result.Content <Content>(); Assert.Equal(200u, statusCode); Assert.Equal("pong_patch", content.message); }
public async void HttpPostSendJsonWithResponseTest() { var message = new Content { message = "ping" }; ResponseBase result = await _client.Post().Url("http://localhost:3000/ping_pong") .AddJson <Content>(message) .Send(); uint statusCode = result.StatusCode(); var content = result.Content <Content>(); Assert.Equal(200u, statusCode); Assert.Equal("pong", content.message); }