public void WhenActivitiesExistShouldSetDayActivityCount()
        {
            MemoryDataContext.Clear();
            InsertDefaultAthlete();
            Assert.AreEqual(0, MemoryDataContext.Queryable<Run>().Count());

            var e = new RunDataAccess();

            var monthQuery = new MonthQuery
            {
                Athlete = _athlete,
                Month = 1,
                WeekStartsOnMonday = true,
                Year = 2009
            };
            monthQuery.CalculateDateRange();

            InsertPersistentRun(monthQuery.Start);
            InsertPersistentRun(monthQuery.End);
            InsertPersistentRun(monthQuery.End);

            monthQuery = e.GetMonthQuery(monthQuery);

            Assert.AreEqual(1, monthQuery.DayActivities.First().ActivityCount);
            Assert.AreEqual(2, monthQuery.DayActivities.Last().ActivityCount);
        }
        public void ShouldReturn42EmptyDayActivities()
        {
            MemoryDataContext.Clear();
            InsertDefaultAthlete();
            Assert.AreEqual(0, MemoryDataContext.Queryable<Run>().Count());
            var e = new RunDataAccess();

            var monthQuery = new MonthQuery
                        {
                            Athlete = _athlete,
                            Month = 11,
                            WeekStartsOnMonday = true,
                            Year = 2009
                        };

            monthQuery = e.GetMonthQuery(monthQuery);

            foreach (var dayActivity in monthQuery.DayActivities)
            {
                Assert.AreEqual(0, dayActivity.ActivityCount);
            }
            Assert.AreEqual(42, monthQuery.DayActivities.Count);
        }