public void GetCurrentWeekNumber_ShouldBeNewWeek() { List <WeeklyStats> stats = repoLayer.GetWeeklyStats(serviceLayer.GetConnection()); repoLayer.ClearWeeklyStats(serviceLayer.GetConnection()); foreach (WeeklyStats stat in stats) { stat.WeekDate = stat.WeekDate.AddDays(-8); repoLayer.InsertWeeklyStats(serviceLayer.GetConnection(), stat); } serviceLayer.GetCurrentWeekNumber().Should().Be(6); }
/// <summary> /// Insert some weekly stats /// </summary> /// <param name="stats"></param> /// <returns></returns> public bool SaveWeekStats(WeeklyStats stats) { repoLayer.InsertWeeklyStats(connection, stats); return(true); }