public void ShouldKeepAllDriversWhenSamePoints()
        {
            var winDriver1 = new Race("Australian Grand Prix", TestData.Driver1, TestData.Driver2, TestData.Driver3);
            var winDriver2 = new Race("Malaysian Grand Prix", TestData.Driver2, TestData.Driver1, TestData.Driver3);
            var exEquoLeaderBoard = new Leaderboard(winDriver1, winDriver2);

            var rankings = exEquoLeaderBoard.DriverRankings();

            CollectionAssert.AreEqual(
                new List<string> {TestData.Driver2.Name, TestData.Driver1.Name, TestData.Driver3.Name},
                rankings);
        }
Esempio n. 2
0
        public void ShouldKeepAllDriversWhenSamePoints()
        {
            var winDriver1        = new Race("Australian Grand Prix", TestData.Driver1, TestData.Driver2, TestData.Driver3);
            var winDriver2        = new Race("Malaysian Grand Prix", TestData.Driver2, TestData.Driver1, TestData.Driver3);
            var exEquoLeaderBoard = new Leaderboard(winDriver1, winDriver2);

            var rankings = exEquoLeaderBoard.DriverRankings();

            CollectionAssert.AreEqual(
                new List <string> {
                TestData.Driver2.Name, TestData.Driver1.Name, TestData.Driver3.Name
            },
                rankings);
        }