public void GetSeriesData_Happy_Path() { //Arrange //Act var result = _api.GetSeriesData(); //Assert Assert.NotNull(result); }
public void StoreWeeklyData() { var weeklyDataList = _apiIntegration.GetSeriesData(); var daysCount = int.Parse(_configuration.GetSection("AppSettings:DaysCount").Value); var existingData = _seriesRepository.GetList(DateTime.Now.AddDays(daysCount * -1), DateTime.Now); var newList = weeklyDataList.Where(w => existingData.All(e => e.CreatedDate != w.ParsedDate)).ToList(); foreach (var seriesData in newList) { var series = new SeriesData() { CreatedDate = seriesData.ParsedDate, Value = seriesData.value }; _seriesRepository.Save(series.CreatedDate, series.Value, false); } }