Ejemplo n.º 1
0
        public void UpdateSoilProfileChartDataName_WithoutSoilProfile_NameSetToDefaultSoilProfileName()
        {
            // Setup
            var chartData = new ChartDataCollection("test name");

            // Call
            MacroStabilityInwardsChartDataFactory.UpdateSoilProfileChartDataName(chartData, null);

            // Assert
            Assert.AreEqual("Ondergrondschematisatie", chartData.Name);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }