/// <summary> /// Asserts whether <paramref name="actual"/> corresponds to <paramref name="calculationScenario"/>. /// </summary> /// <param name="calculationScenario">The original <see cref="MacroStabilityInwardsCalculationScenario"/>.</param> /// <param name="actual">The actual <see cref="ChartDataCollection"/>.</param> /// <exception cref="AssertionException">Thrown when <paramref name="actual"/> /// does not correspond to <paramref name="calculationScenario"/>.</exception> public static void AssertChartData(MacroStabilityInwardsCalculationScenario calculationScenario, ChartDataCollection actual) { Assert.AreEqual(nrOfChartData, actual.Collection.Count()); MacroStabilityInwardsViewChartDataAssert.AssertSurfaceLineChartData(calculationScenario.InputParameters.SurfaceLine, actual.Collection.ElementAt(surfaceLineIndex)); MacroStabilityInwardsViewChartDataAssert.AssertSoilProfileChartData(calculationScenario.InputParameters.SoilProfileUnderSurfaceLine, calculationScenario.InputParameters.StochasticSoilProfile.SoilProfile.Name, true, actual.Collection.ElementAt(soilProfileIndex)); }
/// <summary> /// Asserts whether <paramref name="actual"/> corresponds to the input of <paramref name="calculationScenario"/>. /// </summary> /// <param name="calculationScenario">The original <see cref="MacroStabilityInwardsCalculationScenario"/>.</param> /// <param name="actual">The actual <see cref="ChartDataCollection"/>.</param> /// <exception cref="AssertionException">Thrown when <paramref name="actual"/> /// does not correspond to <paramref name="calculationScenario"/>.</exception> public static void AssertInputChartData(MacroStabilityInwardsCalculationScenario calculationScenario, ChartDataCollection actual) { Assert.AreEqual(nrOfChartData, actual.Collection.Count()); MacroStabilityInwardsViewChartDataAssert.AssertSurfaceLineChartData(calculationScenario.InputParameters.SurfaceLine, actual.Collection.ElementAt(surfaceLineIndex)); MacroStabilityInwardsViewChartDataAssert.AssertSoilProfileChartData(calculationScenario.InputParameters.SoilProfileUnderSurfaceLine, calculationScenario.InputParameters.StochasticSoilProfile.SoilProfile.Name, true, actual.Collection.ElementAt(soilProfileIndex)); AssertWaternetChartData(DerivedMacroStabilityInwardsInput.GetWaternetExtreme(calculationScenario.InputParameters, new GeneralMacroStabilityInwardsInput(), RoundedDouble.NaN), (ChartDataCollection)actual.Collection.ElementAt(waternetZonesExtremeIndex)); AssertWaternetChartData(DerivedMacroStabilityInwardsInput.GetWaternetDaily(calculationScenario.InputParameters, new GeneralMacroStabilityInwardsInput()), (ChartDataCollection)actual.Collection.ElementAt(waternetZonesDailyIndex)); }