public void OneBattlePickWinnerEnsureHigherEloScore() { var eloWinner = new EloShow() { RankableObject = new Show("Breaking Bad", 1) }; var eloLoser= new EloShow() { RankableObject = new Show("The Simpsons", 2) }; RumbleShow rumble = new RumbleShow(new List<IElo>() { eloWinner, eloLoser }); var battles = rumble.GetListOfBattles(); foreach (var battle in battles) { battle.SetWinner(eloWinner); } rumble.UpdateEloScoresInAllBattles(); Assert.IsTrue(eloWinner.Ranking > eloLoser.Ranking); }
static void Main(string[] args) { while (true) { EloShow show1 = new EloShow(new Show("Breaking Bad", 1)); EloShow show2 = new EloShow(new Show("The Simpsons", 2)); EloShow show3 = new EloShow(new Show("Game Of Thrones", 3)); EloShow show4 = new EloShow(new Show("The X-Files", 4)); EloShow show5 = new EloShow(new Show("Will & Grace", 5)); EloShow show6 = new EloShow(new Show("Futurama", 6)); EloShow show7 = new EloShow(new Show("American Dad", 7)); EloShow show8 = new EloShow(new Show("Seinfeld", 8)); EloShow show9 = new EloShow(new Show("Fraiser", 9)); EloShow show10 = new EloShow(new Show("Friends", 10)); EloShow show11 = new EloShow(new Show("70s Show", 11)); EloShow show12 = new EloShow(new Show("Cheers", 12)); List<IElo> elos = new List<IElo>() { }; elos.Add(show1); elos.Add(show2); elos.Add(show3); elos.Add(show4); elos.Add(show5); elos.Add(show6); elos.Add(show7); elos.Add(show8); elos.Add(show9); elos.Add(show10); elos.Add(show11); elos.Add(show12); RumbleShow rumble = new RumbleShow(elos); rumble.FightWithFirstAlwaysWinner(); Console.ReadLine(); } }