public async Task GetLocationQuery_GetLocationByCity_Executes_Failure(string invalidCity) { // Arrange IGetLocationQuery query = new GetLocationQuery(); // Act & Assert await Assert.ThrowsAsync <LocationByCityNotFoundError>(async() => await query.GetLocationByCity(invalidCity)); }
public async Task GetLocationQuery_GetLocationByCity_Executes_Successfully(string city) { // Arrange IGetLocationQuery query = new GetLocationQuery(); // Act var response = await query.GetLocationByCity(city); // Assert Assert.Equal(city, response.Title); }