public void AverageCashTestGood() { UserId = SetupUser1(); UserBridge.ChangeUserTotalProfit(UserId, 1000); UserBridge.ChangeUserNumOfGames(UserId, 10); Assert.AreEqual(100, UserBridge.GetUserAvgCashGain(UserId)); UserBridge.DeleteUser(UserId); }
private int[] CreateUsersWithNumOfGames(int numOfUsers) { int[] userIds = new int[numOfUsers]; int maxInt = Int32.MaxValue; Random rand = new Random(); //setup users for (int i = 0; i < userIds.Length; i++) { int id = rand.Next(); userIds[i] = id; RegisterUserToDB(id); UserBridge.ChangeUserNumOfGames(id, maxInt); maxInt--; } return(userIds); }