public async Task FollowAndApplyInDistinctSteps() { var link = new Link() {Target = new Uri("http://example.org/")}; var client = new HttpClient(new FakeHandler() { Response = new HttpResponseMessage() { StatusCode = HttpStatusCode.NotFound } }); var clientState = new ClientApplicationState(); await client.FollowLinkAsync(link) .ApplyRepresentationToAsync(clientState); Assert.Equal(HttpStatusCode.NotFound, clientState.StatusCode); }
public async Task FollowAndApplyInDistinctSteps() { var link = new Link() { Target = new Uri("http://example.org/") }; var client = new HttpClient(new FakeHandler() { Response = new HttpResponseMessage() { StatusCode = HttpStatusCode.NotFound } }); var clientState = new ClientApplicationState(); await client.FollowLinkAsync(link) .ApplyRepresentationToAsync(clientState); Assert.Equal(HttpStatusCode.NotFound, clientState.StatusCode); }