Пример #1
0
        public void LeaderBoardByNumOfGamesTestSad()
        {
            int[] userIds = CreateUsersWithNumOfGames(1); //only 1 user

            List <IUser> users  = UserBridge.GetUsersByNumOfGames();
            int          minLen = Math.Min(users.Count, userIds.Length);

            for (int i = 0; i < minLen; i++)
            {
                int currId = users[i].Id();
                Assert.AreEqual(currId, userIds[i]);
            }
            for (int i = 0; i < userIds.Length; i++)
            {
                UserBridge.DeleteUser(userIds[i]);
            }
        }
Пример #2
0
        public void LeaderBoardByNumOfGamesTestGood()
        {
            int[] userIds = CreateUsersWithNumOfGames(25);

            List <IUser> users = UserBridge.GetUsersByNumOfGames();

            Assert.AreEqual(20, users.Count);
            for (int i = 0; i < 20; i++)
            {
                int currId = users[i].Id();
                Assert.AreEqual(currId, userIds[i]);
            }
            for (int i = 0; i < userIds.Length; i++)
            {
                UserBridge.DeleteUser(userIds[i]);
            }
        }