Ejemplo n.º 1
0
 public void EmptyTopScoresBoardTest()
 {
     TopScoresBoard topScoresBoard = new TopScoresBoard();
     string actual = topScoresBoard.GetTopScores();
     //string expected = null;
     //Assert.AreEqual(expected, actual);
 }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
 public Command()
 {
     this.topScoreBoard = new TopScoresBoard();
 }