Example #1
0
        public async Task Test_BufferedCountriesIterationRepository_GetCountrieIterationAsync_Return_Null_When_Called_With_Unexisting_String()
        {
            BufferedCountriesIterationRepository repo = new BufferedCountriesIterationRepository(new HRStubCountriesGetter());
            CountriesIteration retour = await repo.GetCountrieIterationAsync("ZZZZZ");

            Assert.IsNull(retour);
        }
Example #2
0
        public async Task Test_BufferedCountriesIterationRepository_GetCountrieIterationAsync_Return_Iteration2_When_Called_With_2()
        {
            BufferedCountriesIterationRepository repo = new BufferedCountriesIterationRepository(new HRStubCountriesGetter());
            CountriesIteration retour = await repo.GetCountrieIterationAsync("2");

            Assert.AreEqual("3", retour.iterationKey);
            Assert.AreEqual(250, retour.finalItemsCount);
            Assert.IsNotNull(retour.countries);
            Assert.AreEqual(101, retour.countries.Count);
        }
Example #3
0
        public async Task Test_BufferedCountriesIterationRepository_GetCountrieIterationAsync_Return_FirstIteration_When_Called_With_Empty_String()
        {
            BufferedCountriesIterationRepository repo = new BufferedCountriesIterationRepository(new HRStubCountriesGetter());
            CountriesIteration retour = await repo.GetCountrieIterationAsync("");

            Assert.IsNotNull(retour);
            //Test de la première itération
            Assert.AreEqual("1", retour.iterationKey);
            Assert.AreEqual(250, retour.finalItemsCount);
            Assert.IsNull(retour.countries);
        }