public void Test_Get_Activities_For_Week()
        {
            MonthSummary month = new MonthSummary(today, (List <VisualActivity>)visualActivities);

            var result = month.getActivitiesForThisWeek((List <VisualActivity>)visualActivities);

            Assert.AreEqual(7, result.Count);
        }
        public PartialViewResult LoadTablePartial(DateTime date)
        {
            if (!User.Identity.IsAuthenticated)
            {
                MonthSummary           exampleMonthSummary = ExampleData.GetMonthSummary();
                IList <VisualActivity> exampleActivities   = exampleMonthSummary.getActivitiesForThisWeek(exampleMonthSummary.Activites);
                return(PartialView("_TablePartial", exampleActivities));
            }

            _httpContextHelper.Context = HttpContext;
            string accessToken = _httpContextHelper.getAccessToken();
            int    stravaId    = Convert.ToInt32(User.FindFirst("stravaId").Value);
            var    user        = getUpdatedUserActivities(accessToken, stravaId);

            MonthSummary           monthSummary = new MonthSummary(date, user.VisualActivities.ToList());
            IList <VisualActivity> activities   = monthSummary.getActivitiesForThisWeek(monthSummary.Activites);

            return(PartialView("_TablePartial", activities));
        }