public async Task Test_BufferedCountriesIterationRepository_GetCountriesIterationByRegionAsync_Return_Null_When_Called_With_Unexisting_Region() { BufferedCountriesIterationRepository repo = new BufferedCountriesIterationRepository(new HRStubCountriesGetter()); CountriesIteration retour = await repo.GetCountriesIterationByRegionAsync("ZZZZZZ"); Assert.AreEqual("", retour.iterationKey); Assert.IsTrue(retour.finalItemsCount == 0); Assert.IsNotNull(retour.countries); Assert.IsTrue(retour.countries.Count == 0); }
public async Task Test_BufferedCountriesIterationRepository_GetCountriesIterationByRegionAsync_Return_AllEuropean_Countries_When_Called_With_Europe() { BufferedCountriesIterationRepository repo = new BufferedCountriesIterationRepository(new HRStubCountriesGetter()); CountriesIteration retour = await repo.GetCountriesIterationByRegionAsync("Europe"); Assert.AreEqual("", retour.iterationKey); Assert.IsTrue(retour.finalItemsCount > 0); Assert.IsNotNull(retour.countries); Assert.IsTrue(retour.countries.Count > 0); foreach (CountryModel iter in retour.countries) { Assert.AreEqual("Europe", iter.region); } }