コード例 #1
0
        public void GetSinglePlayerTest()
        {
            //Arrange
            SwingDataController swingDataController = new SwingDataController();
            Player expectedPlayer = swingDataController.GetLeaderboard()[0];

            //Act
            Player singlePlayer = swingDataController.GetSinglePlayer("Kri");


            //Assert
            Assert.AreEqual(expectedPlayer.PlayerId, singlePlayer.PlayerId);
        }
コード例 #2
0
        public void GetPlayersFromDatabase()
        {
            //Arrange
            SwingDataController swingDataController = new SwingDataController();
            int expectedCount = 0;


            //Act
            List <Player> playerList = swingDataController.GetLeaderboard();

            //Assert
            Assert.AreNotEqual(expectedCount, playerList.Count);
        }