public void GetUserActivityTest() { var overallViewModel = new OverallViewModel("1"); //create users var tempUser1 = CreateUser("user1", "User1", true ); var tempUser2 = CreateUser("user2", "User2", true ); //add their stats AddUserStats(overallViewModel, tempUser1, 120, 70, DateTime.Today); AddUserStats(overallViewModel, tempUser2, 60, 60, DateTime.Today); Assert.True(overallViewModel.GetUserActivity("user1").Sum(s => s.TotalNumberOfRequests) == 120); }
public void GetUserActivityTest() { 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 }; overallViewModel.AddUserStats(tempUser1, 120, 70, DateTime.Today); overallViewModel.AddUserStats(tempUser2, 60, 60, DateTime.Today); Assert.True(overallViewModel.GetUserActivity("user1").Sum(s => s.TotalNumberOfRequests) == 120); }