Пример #1
0
        public void TestListTeamsSemiFinal()
        {
            /* ================== Montando Cenario =================== */

            _teamRepository.Add(new Team("Brasil", "BRA"));
            _teamRepository.Add(new Team("Argentina", "ARG"));
            _teamRepository.Add(new Team("Uruguai", "URU"));
            _teamRepository.Add(new Team("Colombia", "COL"));

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

            /* ================== Execucao =================== */
            var finals = _matchService.PlaySemiFinal(_rafflesService.RafflesSemiFinal(selections));

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

            // Testando com Assert
            Assert.NotEmpty(finals);
            Assert.Equal(2, finals.Count);

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