public void CreateActiveCircleRadiusChartData_ReturnsChartLineData() { // Call ChartLineData data = MacroStabilityInwardsChartDataFactory.CreateActiveCircleRadiusChartData(); // Assert CollectionAssert.IsEmpty(data.Points); Assert.AreEqual("Radius actieve cirkel", data.Name); AssertEqualStyle(data.Style, Color.Gray, 1, ChartLineDashStyle.Dash); }
/// <summary> /// Creates a new instance of <see cref="MacroStabilityInwardsOutputChartControl"/>. /// </summary> /// <param name="data">The calculation to show the output for.</param> /// <param name="generalInput">General calculation parameters that are the same across all calculations.</param> /// <param name="getNormativeAssessmentLevelFunc"><see cref="Func{TResult}"/> for obtaining the normative assessment level.</param> /// <exception cref="ArgumentNullException">Thrown when any input parameter is <c>null</c>.</exception> public MacroStabilityInwardsOutputChartControl(MacroStabilityInwardsCalculationScenario data, GeneralMacroStabilityInwardsInput generalInput, Func <RoundedDouble> getNormativeAssessmentLevelFunc) { if (data == null) { throw new ArgumentNullException(nameof(data)); } if (generalInput == null) { throw new ArgumentNullException(nameof(generalInput)); } if (getNormativeAssessmentLevelFunc == null) { throw new ArgumentNullException(nameof(getNormativeAssessmentLevelFunc)); } this.data = data; this.generalInput = generalInput; this.getNormativeAssessmentLevelFunc = getNormativeAssessmentLevelFunc; InitializeComponent(); chartDataCollection = new ChartDataCollection(RiskeerCommonFormsResources.CalculationOutput_DisplayName); soilProfileChartData = RiskeerChartDataFactory.CreateSoilProfileChartData(); surfaceLineChartData = RiskeerChartDataFactory.CreateSurfaceLineChartData(); surfaceLevelInsideChartData = MacroStabilityInwardsChartDataFactory.CreateSurfaceLevelInsideChartData(); ditchPolderSideChartData = RiskeerChartDataFactory.CreateDitchPolderSideChartData(); bottomDitchPolderSideChartData = RiskeerChartDataFactory.CreateBottomDitchPolderSideChartData(); bottomDitchDikeSideChartData = RiskeerChartDataFactory.CreateBottomDitchDikeSideChartData(); ditchDikeSideChartData = RiskeerChartDataFactory.CreateDitchDikeSideChartData(); dikeToeAtPolderChartData = RiskeerChartDataFactory.CreateDikeToeAtPolderChartData(); shoulderTopInsideChartData = MacroStabilityInwardsChartDataFactory.CreateShoulderTopInsideChartData(); shoulderBaseInsideChartData = MacroStabilityInwardsChartDataFactory.CreateShoulderBaseInsideChartData(); dikeTopAtPolderChartData = MacroStabilityInwardsChartDataFactory.CreateDikeTopAtPolderChartData(); dikeToeAtRiverChartData = RiskeerChartDataFactory.CreateDikeToeAtRiverChartData(); dikeTopAtRiverChartData = MacroStabilityInwardsChartDataFactory.CreateDikeTopAtRiverChartData(); surfaceLevelOutsideChartData = MacroStabilityInwardsChartDataFactory.CreateSurfaceLevelOutsideChartData(); waternetZonesExtremeChartData = MacroStabilityInwardsChartDataFactory.CreateWaternetZonesExtremeChartDataCollection(); waternetZonesDailyChartData = MacroStabilityInwardsChartDataFactory.CreateWaternetZonesDailyChartDataCollection(); tangentLinesChartData = MacroStabilityInwardsChartDataFactory.CreateTangentLinesChartData(); leftGridChartData = MacroStabilityInwardsChartDataFactory.CreateLeftGridChartData(); rightGridChartData = MacroStabilityInwardsChartDataFactory.CreateRightGridChartData(); slipPlaneChartData = MacroStabilityInwardsChartDataFactory.CreateSlipPlaneChartData(); leftCircleRadiusChartData = MacroStabilityInwardsChartDataFactory.CreateActiveCircleRadiusChartData(); rightCircleRadiusChartData = MacroStabilityInwardsChartDataFactory.CreatePassiveCircleRadiusChartData(); slicesChartData = MacroStabilityInwardsSliceChartDataFactory.CreateSlicesChartData(); sliceParametersChartDataCollection = MacroStabilityInwardsSliceChartDataFactory.CreateSliceParametersChartDataCollection(); sliceCohesionChartData = MacroStabilityInwardsSliceChartDataFactory.CreateCohesionChartData(); sliceEffectiveStressChartData = MacroStabilityInwardsSliceChartDataFactory.CreateEffectiveStressChartData(); sliceTotalPorePressureChartData = MacroStabilityInwardsSliceChartDataFactory.CreateTotalPorePressureChartData(); sliceWeightChartData = MacroStabilityInwardsSliceChartDataFactory.CreateWeightChartData(); slicePiezometricPorePressureChartData = MacroStabilityInwardsSliceChartDataFactory.CreatePiezometricPorePressureChartData(); slicePorePressureChartData = MacroStabilityInwardsSliceChartDataFactory.CreatePorePressureChartData(); sliceVerticalPorePressureChartData = MacroStabilityInwardsSliceChartDataFactory.CreateVerticalPorePressureChartData(); sliceHorizontalPorePressureChartData = MacroStabilityInwardsSliceChartDataFactory.CreateHorizontalPorePressureChartData(); sliceOverConsolidationRatioChartData = MacroStabilityInwardsSliceChartDataFactory.CreateOverConsolidationRatioChartData(); slicePopChartData = MacroStabilityInwardsSliceChartDataFactory.CreatePopChartData(); sliceNormalStressChartData = MacroStabilityInwardsSliceChartDataFactory.CreateNormalStressChartData(); sliceShearStressChartData = MacroStabilityInwardsSliceChartDataFactory.CreateShearStressChartData(); sliceLoadStressChartData = MacroStabilityInwardsSliceChartDataFactory.CreateLoadStressChartData(); chartDataCollection.Add(soilProfileChartData); chartDataCollection.Add(surfaceLineChartData); chartDataCollection.Add(surfaceLevelInsideChartData); chartDataCollection.Add(ditchPolderSideChartData); chartDataCollection.Add(bottomDitchPolderSideChartData); chartDataCollection.Add(bottomDitchDikeSideChartData); chartDataCollection.Add(ditchDikeSideChartData); chartDataCollection.Add(dikeToeAtPolderChartData); chartDataCollection.Add(shoulderTopInsideChartData); chartDataCollection.Add(shoulderBaseInsideChartData); chartDataCollection.Add(dikeTopAtPolderChartData); chartDataCollection.Add(dikeToeAtRiverChartData); chartDataCollection.Add(dikeTopAtRiverChartData); chartDataCollection.Add(surfaceLevelOutsideChartData); chartDataCollection.Add(waternetZonesExtremeChartData); chartDataCollection.Add(waternetZonesDailyChartData); chartDataCollection.Add(tangentLinesChartData); chartDataCollection.Add(leftGridChartData); chartDataCollection.Add(rightGridChartData); chartDataCollection.Add(slicesChartData); chartDataCollection.Add(slipPlaneChartData); chartDataCollection.Add(leftCircleRadiusChartData); chartDataCollection.Add(rightCircleRadiusChartData); chartDataCollection.Add(sliceParametersChartDataCollection); sliceParametersChartDataCollection.Add(sliceLoadStressChartData); sliceParametersChartDataCollection.Add(sliceShearStressChartData); sliceParametersChartDataCollection.Add(sliceNormalStressChartData); sliceParametersChartDataCollection.Add(slicePopChartData); sliceParametersChartDataCollection.Add(sliceOverConsolidationRatioChartData); sliceParametersChartDataCollection.Add(sliceHorizontalPorePressureChartData); sliceParametersChartDataCollection.Add(sliceVerticalPorePressureChartData); sliceParametersChartDataCollection.Add(slicePorePressureChartData); sliceParametersChartDataCollection.Add(slicePiezometricPorePressureChartData); sliceParametersChartDataCollection.Add(sliceWeightChartData); sliceParametersChartDataCollection.Add(sliceTotalPorePressureChartData); sliceParametersChartDataCollection.Add(sliceEffectiveStressChartData); sliceParametersChartDataCollection.Add(sliceCohesionChartData); soilLayerChartDataLookup = new List <ChartMultipleAreaData>(); phreaticLineExtremeLookup = new Dictionary <MacroStabilityInwardsPhreaticLine, ChartLineData>(); phreaticLineDailyLookup = new Dictionary <MacroStabilityInwardsPhreaticLine, ChartLineData>(); waternetLineExtremeLookup = new Dictionary <MacroStabilityInwardsWaternetLine, ChartMultipleAreaData>(); waternetLineDailyLookup = new Dictionary <MacroStabilityInwardsWaternetLine, ChartMultipleAreaData>(); UpdateChartData(); chartControl.Data = chartDataCollection; }