public void AddChampionRecordTest() { List <ScoreRecord> testList = new List <ScoreRecord>(3); MinesweeperMain.AddChampionRecord(testList, "Mitko", 10); MinesweeperMain.AddChampionRecord(testList, "Joro", 14); MinesweeperMain.AddChampionRecord(testList, "Eva", 20); string actual = MinesweeperMain.PrintScoreBoard(testList); Assert.AreEqual <string>("\nScoreboard:\r\n1. Eva --> 20 cells\n2. Joro --> 14 cells\n3. Mitko --> 10 cells\n\r\n", actual); }
public void AddChampionRecordTestMoreRecords() { List <ScoreRecord> testList = new List <ScoreRecord>(6); MinesweeperMain.AddChampionRecord(testList, "Mitko", 10); MinesweeperMain.AddChampionRecord(testList, "Joro", 14); MinesweeperMain.AddChampionRecord(testList, "Eva", 20); MinesweeperMain.AddChampionRecord(testList, "Marko", 10); MinesweeperMain.AddChampionRecord(testList, "Gosho", 14); MinesweeperMain.AddChampionRecord(testList, "Pesho", 20); MinesweeperMain.AddChampionRecord(testList, "Ivo", 10); MinesweeperMain.AddChampionRecord(testList, "Stoyan", 14); MinesweeperMain.AddChampionRecord(testList, "Petko", 20); string actual = MinesweeperMain.PrintScoreBoard(testList); Assert.AreEqual <string>("\nScoreboard:\r\n1. Eva --> 20 cells\n2. Petko --> 20 cells\n3. Pesho --> 20 cells\n4. Stoyan --> 14 cells\n5. Gosho --> 14 cells\n\r\n", actual); }