public void EmptyTopScoresBoardTest()
 {
     TopScoresBoard topScoresBoard = new TopScoresBoard();
     string actual = topScoresBoard.GetTopScores();
     //string expected = null;
     //Assert.AreEqual(expected, actual);
 }
        public void OnePlayerTopScoresBoardTest()
        {
            TopScoresBoard topScoresBoard = new TopScoresBoard();

            topScoresBoard.TryToSignInTopPlayerList(new Player("Ivan", 15));

            string actual = topScoresBoard.GetTopScores();
            string expected = "Scoreboard:\r\n1. Ivan --> 15 cells";
            Assert.AreEqual(expected, actual);
        }
        public void FivePlayersTopScoresBoardTest()
        {
            TopScoresBoard topScoresBoard = new TopScoresBoard();

            topScoresBoard.TryToSignInTopPlayerList(new Player("Ivan", 15));
            topScoresBoard.TryToSignInTopPlayerList(new Player("Grigor", 25));
            topScoresBoard.TryToSignInTopPlayerList(new Player("Stefan", 25));
            topScoresBoard.TryToSignInTopPlayerList(new Player("Naiden", 10));
            topScoresBoard.TryToSignInTopPlayerList(new Player("Pesho", 0));

            string actual = topScoresBoard.GetTopScores();
            string expected = "Scoreboard:\r\n" +
                "1. Grigor --> 25 cells\r\n" +
                "2. Stefan --> 25 cells\r\n" +
                "3. Ivan --> 15 cells\r\n" +
                "4. Naiden --> 10 cells\r\n" +
                "5. Pesho --> 0 cells";
            Assert.AreEqual(expected, actual);
        }
示例#4
0
 public Command()
 {
     this.topScoreBoard = new TopScoresBoard();
 }