public void TestRafflesOctavesFinal()
        {
            /* ================== Montando Cenario =================== */

            //IRafflesService rafflesService = new RafflesService(GetInMemoryTeamRepository());

            _teamRepository.Add(new Team("Brasil", "BRA"));
            _teamRepository.Add(new Team("Argentina", "ARG"));
            _teamRepository.Add(new Team("Uruguai", "URU"));
            _teamRepository.Add(new Team("Colombia", "COL"));
            _teamRepository.Add(new Team("Paraguai", "PAR"));
            _teamRepository.Add(new Team("Alemanha", "ALE"));
            _teamRepository.Add(new Team("Holanda", "HOL"));
            _teamRepository.Add(new Team("Espanha", "ESP"));
            _teamRepository.Add(new Team("Inglaterra", "ING"));
            _teamRepository.Add(new Team("Belgica", "BEL"));
            _teamRepository.Add(new Team("Croacia", "CRO"));
            _teamRepository.Add(new Team("Italia", "ITA"));
            _teamRepository.Add(new Team("Marrocos", "MAR"));
            _teamRepository.Add(new Team("Nigeria", "NIG"));
            _teamRepository.Add(new Team("Mexico", "Mex"));
            _teamRepository.Add(new Team("Costa Rica", "COS"));

            var selections = _teamRepository.GetAll().ToList();

            /* ================== Execucao =================== */
            var dict = _rafflesService.RafflesOctavesFinal(selections);

            /* ================== Verificacao =================== */

            // Testando com Assert
            Assert.True(dict.ContainsKey("Key:1"));
            Assert.Equal(8, dict.Count);

            // Testando com FluentAssertions
            //dict.Should().ContainKey("Key:1",
            //    $"O objeto esperado não corresponde com ao objeto obtido" +
            //    $" ({dict.ContainsKey("Key:1").ToString()})");
            
        }
Exemple #2
0
 public Dictionary <string, List <Team> > RafflesOctavesFinal(List <Team> selections)
 {
     return(_rafflesService.RafflesOctavesFinal(selections));
 }