public void LeaderBoardByTotalProfitTestGood() { int[] userIds = CreateUsersWithTotalProfit(25); List <IUser> users = UserBridge.GetUsersByTotalProfit(); Assert.AreEqual(20, users.Count); for (int i = 0; i < users.Count; i++) { int currId = users[i].Id(); Assert.AreEqual(currId, userIds[i]); } for (int i = 0; i < userIds.Length; i++) { UserBridge.DeleteUser(userIds[i]); } }
public void LeaderBoardByTotalProfitTestSad() { int[] userIds = CreateUsersWithTotalProfit(1); //only 1 user List <IUser> users = UserBridge.GetUsersByTotalProfit(); 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]); } }