public Task CanConnectToTestServer() => _apiHelper.InTheContextOfAnAnonymousUser( async httpClient => { // Act var response = await httpClient .GetAsync("health"); // Assert response.StatusCode.ShouldBe(HttpStatusCode.OK); });
public Task RequestingTheApiRootShouldReturnProperHypermediaLinksWhenNotLoggedIn() => _apiHelper.InTheContextOfAnAnonymousUser( async httpClient => { // Act var response = await httpClient .GetAsync(httpClient.BaseAddress); // Assert var expectedLinks = new List <string> { LinkNames.Auth.Login, LinkNames.Auth.Register }; await response.ShouldBeAResource <ApiRootResource>(expectedLinks); });