public void GetOverallNumberOfRequestsForTodayTest() { var overallViewModel = new OverallViewModel(); //create users var tempUser1 = CreateUser("User1", "User1", true); var tempUser2 = CreateUser("User2", "User2", true); // must be zero Assert.AreEqual(overallViewModel.GetOverallNumberOfRequestsForToday(), 0); //add their stats AddUserStats(overallViewModel, tempUser1, 120, 70, DateTime.Today); AddUserStats(overallViewModel, tempUser2, 60, 60, DateTime.Today); // check if today requests are summed Assert.AreEqual(130, overallViewModel.GetOverallNumberOfRequestsForToday()); }
public void GetOverallNumberOfRequestsForTodayTest() { var overallViewModel = new OverallViewModel("1"); var tempUser1 = new User { UserId = "User1", Name = "User1", IsApproved = true }; var tempUser2 = new User { UserId = "User2", Name = "User2", IsApproved = true }; Assert.AreEqual(overallViewModel.GetOverallNumberOfRequestsForToday(), 0); overallViewModel.AddUserStats(tempUser1, 120, 70, DateTime.Today); overallViewModel.AddUserStats(tempUser2, 60, 60, DateTime.Today); Assert.AreEqual(130, overallViewModel.GetOverallNumberOfRequestsForToday()); }