示例#1
0
        public void RunAndHaveRightWinner()
        {
            Cup sut = new Cup(FakeMovieGenerator.GetDefaultMovieList());

            sut.Run();

            Assert.Matches(sut.SemiFinal.Winners[0].Title, "Vingadores: Guerra Infinita");
        }
示例#2
0
        public void RunAndHaveRightMoviesForSemiFinal()
        {
            Cup sut = new Cup(FakeMovieGenerator.GetDefaultMovieList());

            sut.Run();

            Assert.Matches(sut.FirstPhase.Winners[0].Title, "Vingadores: Guerra Infinita");
            Assert.Matches(sut.FirstPhase.Winners[1].Title, "Thor: Ragnarok");
            Assert.Matches(sut.FirstPhase.Winners[2].Title, "Os Incríveis 2");
            Assert.Matches(sut.FirstPhase.Winners[3].Title, "Jurassic World: Reino Ameaçado");
        }
示例#3
0
        public void RunAndHaveTheRightMovieOrder()
        {
            Cup sut = new Cup(FakeMovieGenerator.GetDefaultMovieList());

            Assert.Matches(sut.Movies[0].Title, "Deadpool 2");
            Assert.Matches(sut.Movies[1].Title, "Han Solo: Uma História Star Wars");
            Assert.Matches(sut.Movies[2].Title, "Hereditário");
            Assert.Matches(sut.Movies[3].Title, "Jurassic World: Reino Ameaçado");
            Assert.Matches(sut.Movies[4].Title, "Oito Mulheres e um Segredo");
            Assert.Matches(sut.Movies[5].Title, "Os Incríveis 2");
            Assert.Matches(sut.Movies[6].Title, "Thor: Ragnarok");
            Assert.Matches(sut.Movies[7].Title, "Vingadores: Guerra Infinita");
        }
示例#4
0
        public void HaveTheRightNumberOfMatchesAfterRun()
        {
            var firstPhase = new FirstPhase(FakeMovieGenerator.GetDefaultMovieList());

            Assert.Equal(4, firstPhase.Matches.Count);
        }
示例#5
0
 public void ThrowExceptionIfNumberOfMoviesIsWrong()
 {
     Assert.Throws <InvalidNumberOfMoviesException>(() => new FirstPhase(FakeMovieGenerator.GetListWithTwoMovies()));
 }
示例#6
0
        public void HaveTheRightNumberOfMatchesAfterRun()
        {
            var semiFinal = new SemiFinal(FakeMovieGenerator.GetListWithFourMovies());

            Assert.Equal(2, semiFinal.Matches.Count);
        }
示例#7
0
        public void HaveTheRightNumberOfMatchesAfterRun()
        {
            var final = new Final(FakeMovieGenerator.GetListWithTwoMovies());

            Assert.Equal(1, final.Matches.Count);
        }
示例#8
0
 public void ThrowExceptionIfNumberOfMoviesIsWrong()
 {
     Assert.Throws <InvalidNumberOfMoviesException>(() => new Final(FakeMovieGenerator.GetDefaultMovieList()));
 }
示例#9
0
 public void ThrowExceptionWhenNumberOfMoviesIsNotCorrect()
 {
     Assert.Throws <InvalidNumberOfMoviesException>(() => new Cup(FakeMovieGenerator.GetListWithTwoMovies()));
 }