public void MooreForecast() { // Arrange var hardware = _hContext.HardwareConfigurations.ToList(); // Act var mf = new MooreForecasting(Component.CPUSpeed, hardware); var foo = mf.GetResults(); // Assert Microsoft.VisualStudio.TestTools.UnitTesting.Assert.IsTrue(foo.Count > 23); }
private Tuple <Component, ChartItem, ChartItem> GetMooreCharts(Component component, List <Hardware> allHardware, int forecastMonths) { HardwareForecast hardwareForecast = new HardwareForecast(component, allHardware); List <ForecastResult> hardwareResult = hardwareForecast.GenerateFutureForecast(forecastMonths); MooreForecasting mooreForecast = new MooreForecasting(component, allHardware, forecastMonths); List <ForecastResult> mooreResult = mooreForecast.GetResults(); ChartItem hardwareChart = new ChartItem(component.GetDisplayName(), false, 2, hardwareResult.ToList()); ChartItem mooreChart = new ChartItem(component.GetDisplayName() + "Moore", false, 2, mooreResult.Where(x => x.Date >= hardwareResult.Min(y => y.Date)).ToList()); return(new Tuple <Component, ChartItem, ChartItem>(component, hardwareChart, mooreChart)); }