public void UpdateSoilProfileChartDataName_WithoutSoilProfile_NameSetToDefaultSoilProfileName() { // Setup var chartData = new ChartDataCollection("test name"); // Call MacroStabilityInwardsChartDataFactory.UpdateSoilProfileChartDataName(chartData, null); // Assert Assert.AreEqual("Ondergrondschematisatie", chartData.Name); }
private void SetSoilProfileChartData() { soilProfileChartData.Clear(); soilLayerChartDataLookup.Clear(); IEnumerable <MacroStabilityInwardsSoilLayer2D> soilLayers = GetSoilLayers().Reverse(); soilLayers.Select(MacroStabilityInwardsChartDataFactory.CreateSoilLayerChartData) .ForEachElementDo(sl => { soilProfileChartData.Insert(0, sl); soilLayerChartDataLookup.Add(sl); }); MacroStabilityInwardsChartDataFactory.UpdateSoilProfileChartDataName(soilProfileChartData, data?.InputParameters.StochasticSoilProfile?.SoilProfile); }
public void UpdateSoilProfileChartDataName_WithSoilProfile_NameSetToSoilProfileName() { // Setup var chartData = new ChartDataCollection("test name"); var soilProfile = new MacroStabilityInwardsSoilProfile1D("soil profile name", 2.0, new[] { new MacroStabilityInwardsSoilLayer1D(3.2) }); // Call MacroStabilityInwardsChartDataFactory.UpdateSoilProfileChartDataName(chartData, soilProfile); // Assert Assert.AreEqual("soil profile name", chartData.Name); }