public async Task RequestCountryByName_AllReturnedPropertiesAreEqualsToExpected(string countryName) { string url = TestHelpers.GetCountryByNameUrlBuilder(countryName); var response = await url.GetJsonAsync <List <CountryTestModel> >(); CountryTestModel actualUkraine = response.First(); CountryTestModel expectedUkraine = TestHelpers.ConvertJsonToCountryTestModel(ukraineResponseJsonName); actualUkraine.Should().BeEquivalentTo(expectedUkraine); }
public async Task RequestCountryByNameAndFilterByFields_OnlyFilteredFieldsShouldBeReturned(string countryName, string queryName, string queryValues) { string url = TestHelpers.GetCountryByNameUrlBuilder(countryName).SetQueryParam(queryName, queryValues); var response = await url.GetJsonAsync <List <CountryTestModel> >(); CountryTestModel actualUkraine = response.First(); CountryTestModel expectedUkraine = TestHelpers.ConvertJsonToCountryTestModel(ukraineResponseWithThreeFieldsOnlyJsonName); actualUkraine.Should().BeEquivalentTo(expectedUkraine); }