public async Task Should_Get_All_Customers() { //var client = await _factory.GetAuthenticatedClientAsync(); var response = await _authenticatedClient.GetAsync("/api/customers/getall"); response.EnsureSuccessStatusCode(); var vm = await E2ETestsUtilities.GetResponseContent <CustomersListVm>(response); vm.ShouldBeOfType <CustomersListVm>(); vm.Customers.ShouldNotBeEmpty(); }
public async Task Should_Get_A_Customer_With_Valid_Id() { //var client = await _factory.GetAuthenticatedClientAsync(); var validId = 1; var response = await _authenticatedClient.GetAsync($"/api/customers/get/{validId}"); response.EnsureSuccessStatusCode(); var customer = await E2ETestsUtilities.GetResponseContent <CustomerDetailVm>(response); Assert.Equal(validId, customer.Id); }