Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/MacroStabilityInwards/MacroStabilityInwardsSoilLayer1DCreateExtensions.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/MacroStabilityInwards/MacroStabilityInwardsSoilLayer1DCreateExtensions.cs (.../MacroStabilityInwardsSoilLayer1DCreateExtensions.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/MacroStabilityInwards/MacroStabilityInwardsSoilLayer1DCreateExtensions.cs (.../MacroStabilityInwardsSoilLayer1DCreateExtensions.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -48,31 +48,31 @@ throw new ArgumentNullException(nameof(soilLayer)); } - MacroStabilityInwardsSoilLayerProperties properties = soilLayer.Properties; + MacroStabilityInwardsSoilLayerData data = soilLayer.Data; return new MacroStabilityInwardsSoilLayerOneDEntity { Top = soilLayer.Top.ToNaNAsNull(), - IsAquifer = Convert.ToByte(properties.IsAquifer), - MaterialName = properties.MaterialName.DeepClone(), - Color = properties.Color.ToArgb(), - UsePop = Convert.ToByte(properties.UsePop), - ShearStrengthModel = Convert.ToByte(properties.ShearStrengthModel), - AbovePhreaticLevelMean = properties.AbovePhreaticLevel.Mean.ToNaNAsNull(), - AbovePhreaticLevelCoefficientOfVariation = properties.AbovePhreaticLevel.CoefficientOfVariation.ToNaNAsNull(), - AbovePhreaticLevelShift = properties.AbovePhreaticLevel.Shift.ToNaNAsNull(), - BelowPhreaticLevelMean = properties.BelowPhreaticLevel.Mean.ToNaNAsNull(), - BelowPhreaticLevelCoefficientOfVariation = properties.BelowPhreaticLevel.CoefficientOfVariation.ToNaNAsNull(), - BelowPhreaticLevelShift = properties.BelowPhreaticLevel.Shift.ToNaNAsNull(), - CohesionMean = properties.Cohesion.Mean.ToNaNAsNull(), - CohesionCoefficientOfVariation = properties.Cohesion.CoefficientOfVariation.ToNaNAsNull(), - FrictionAngleMean = properties.FrictionAngle.Mean.ToNaNAsNull(), - FrictionAngleCoefficientOfVariation = properties.FrictionAngle.CoefficientOfVariation.ToNaNAsNull(), - ShearStrengthRatioMean = properties.ShearStrengthRatio.Mean.ToNaNAsNull(), - ShearStrengthRatioCoefficientOfVariation = properties.ShearStrengthRatio.CoefficientOfVariation.ToNaNAsNull(), - StrengthIncreaseExponentMean = properties.StrengthIncreaseExponent.Mean.ToNaNAsNull(), - StrengthIncreaseExponentCoefficientOfVariation = properties.StrengthIncreaseExponent.CoefficientOfVariation.ToNaNAsNull(), - PopMean = properties.Pop.Mean.ToNaNAsNull(), - PopCoefficientOfVariation = properties.Pop.CoefficientOfVariation.ToNaNAsNull(), + IsAquifer = Convert.ToByte(data.IsAquifer), + MaterialName = data.MaterialName.DeepClone(), + Color = data.Color.ToArgb(), + UsePop = Convert.ToByte(data.UsePop), + ShearStrengthModel = Convert.ToByte(data.ShearStrengthModel), + AbovePhreaticLevelMean = data.AbovePhreaticLevel.Mean.ToNaNAsNull(), + AbovePhreaticLevelCoefficientOfVariation = data.AbovePhreaticLevel.CoefficientOfVariation.ToNaNAsNull(), + AbovePhreaticLevelShift = data.AbovePhreaticLevel.Shift.ToNaNAsNull(), + BelowPhreaticLevelMean = data.BelowPhreaticLevel.Mean.ToNaNAsNull(), + BelowPhreaticLevelCoefficientOfVariation = data.BelowPhreaticLevel.CoefficientOfVariation.ToNaNAsNull(), + BelowPhreaticLevelShift = data.BelowPhreaticLevel.Shift.ToNaNAsNull(), + CohesionMean = data.Cohesion.Mean.ToNaNAsNull(), + CohesionCoefficientOfVariation = data.Cohesion.CoefficientOfVariation.ToNaNAsNull(), + FrictionAngleMean = data.FrictionAngle.Mean.ToNaNAsNull(), + FrictionAngleCoefficientOfVariation = data.FrictionAngle.CoefficientOfVariation.ToNaNAsNull(), + ShearStrengthRatioMean = data.ShearStrengthRatio.Mean.ToNaNAsNull(), + ShearStrengthRatioCoefficientOfVariation = data.ShearStrengthRatio.CoefficientOfVariation.ToNaNAsNull(), + StrengthIncreaseExponentMean = data.StrengthIncreaseExponent.Mean.ToNaNAsNull(), + StrengthIncreaseExponentCoefficientOfVariation = data.StrengthIncreaseExponent.CoefficientOfVariation.ToNaNAsNull(), + PopMean = data.Pop.Mean.ToNaNAsNull(), + PopCoefficientOfVariation = data.Pop.CoefficientOfVariation.ToNaNAsNull(), Order = order }; } Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/MacroStabilityInwards/MacroStabilityInwardsSoilLayer2DCreateExtensions.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/MacroStabilityInwards/MacroStabilityInwardsSoilLayer2DCreateExtensions.cs (.../MacroStabilityInwardsSoilLayer2DCreateExtensions.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/MacroStabilityInwards/MacroStabilityInwardsSoilLayer2DCreateExtensions.cs (.../MacroStabilityInwardsSoilLayer2DCreateExtensions.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -49,32 +49,32 @@ throw new ArgumentNullException(nameof(soilLayer)); } - MacroStabilityInwardsSoilLayerProperties properties = soilLayer.Properties; + MacroStabilityInwardsSoilLayerData data = soilLayer.Data; return new MacroStabilityInwardsSoilLayerTwoDEntity { OuterRingXml = new Point2DXmlSerializer().ToXml(soilLayer.OuterRing.Points), HolesXml = new RingXmlSerializer().ToXml(soilLayer.Holes), - IsAquifer = Convert.ToByte(properties.IsAquifer), - MaterialName = properties.MaterialName.DeepClone(), - Color = properties.Color.ToArgb(), - UsePop = Convert.ToByte(properties.UsePop), - ShearStrengthModel = Convert.ToByte(properties.ShearStrengthModel), - AbovePhreaticLevelMean = properties.AbovePhreaticLevel.Mean.ToNaNAsNull(), - AbovePhreaticLevelCoefficientOfVariation = properties.AbovePhreaticLevel.CoefficientOfVariation.ToNaNAsNull(), - AbovePhreaticLevelShift = properties.AbovePhreaticLevel.Shift.ToNaNAsNull(), - BelowPhreaticLevelMean = properties.BelowPhreaticLevel.Mean.ToNaNAsNull(), - BelowPhreaticLevelCoefficientOfVariation = properties.BelowPhreaticLevel.CoefficientOfVariation.ToNaNAsNull(), - BelowPhreaticLevelShift = properties.BelowPhreaticLevel.Shift.ToNaNAsNull(), - CohesionMean = properties.Cohesion.Mean.ToNaNAsNull(), - CohesionCoefficientOfVariation = properties.Cohesion.CoefficientOfVariation.ToNaNAsNull(), - FrictionAngleMean = properties.FrictionAngle.Mean.ToNaNAsNull(), - FrictionAngleCoefficientOfVariation = properties.FrictionAngle.CoefficientOfVariation.ToNaNAsNull(), - ShearStrengthRatioMean = properties.ShearStrengthRatio.Mean.ToNaNAsNull(), - ShearStrengthRatioCoefficientOfVariation = properties.ShearStrengthRatio.CoefficientOfVariation.ToNaNAsNull(), - StrengthIncreaseExponentMean = properties.StrengthIncreaseExponent.Mean.ToNaNAsNull(), - StrengthIncreaseExponentCoefficientOfVariation = properties.StrengthIncreaseExponent.CoefficientOfVariation.ToNaNAsNull(), - PopMean = properties.Pop.Mean.ToNaNAsNull(), - PopCoefficientOfVariation = properties.Pop.CoefficientOfVariation.ToNaNAsNull(), + IsAquifer = Convert.ToByte(data.IsAquifer), + MaterialName = data.MaterialName.DeepClone(), + Color = data.Color.ToArgb(), + UsePop = Convert.ToByte(data.UsePop), + ShearStrengthModel = Convert.ToByte(data.ShearStrengthModel), + AbovePhreaticLevelMean = data.AbovePhreaticLevel.Mean.ToNaNAsNull(), + AbovePhreaticLevelCoefficientOfVariation = data.AbovePhreaticLevel.CoefficientOfVariation.ToNaNAsNull(), + AbovePhreaticLevelShift = data.AbovePhreaticLevel.Shift.ToNaNAsNull(), + BelowPhreaticLevelMean = data.BelowPhreaticLevel.Mean.ToNaNAsNull(), + BelowPhreaticLevelCoefficientOfVariation = data.BelowPhreaticLevel.CoefficientOfVariation.ToNaNAsNull(), + BelowPhreaticLevelShift = data.BelowPhreaticLevel.Shift.ToNaNAsNull(), + CohesionMean = data.Cohesion.Mean.ToNaNAsNull(), + CohesionCoefficientOfVariation = data.Cohesion.CoefficientOfVariation.ToNaNAsNull(), + FrictionAngleMean = data.FrictionAngle.Mean.ToNaNAsNull(), + FrictionAngleCoefficientOfVariation = data.FrictionAngle.CoefficientOfVariation.ToNaNAsNull(), + ShearStrengthRatioMean = data.ShearStrengthRatio.Mean.ToNaNAsNull(), + ShearStrengthRatioCoefficientOfVariation = data.ShearStrengthRatio.CoefficientOfVariation.ToNaNAsNull(), + StrengthIncreaseExponentMean = data.StrengthIncreaseExponent.Mean.ToNaNAsNull(), + StrengthIncreaseExponentCoefficientOfVariation = data.StrengthIncreaseExponent.CoefficientOfVariation.ToNaNAsNull(), + PopMean = data.Pop.Mean.ToNaNAsNull(), + PopCoefficientOfVariation = data.Pop.CoefficientOfVariation.ToNaNAsNull(), Order = order }; } Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/MacroStabilityInwards/MacroStabilityInwardsSoilLayerOneDEntityReadExtensions.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/MacroStabilityInwards/MacroStabilityInwardsSoilLayerOneDEntityReadExtensions.cs (.../MacroStabilityInwardsSoilLayerOneDEntityReadExtensions.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/MacroStabilityInwards/MacroStabilityInwardsSoilLayerOneDEntityReadExtensions.cs (.../MacroStabilityInwardsSoilLayerOneDEntityReadExtensions.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -51,7 +51,7 @@ return new MacroStabilityInwardsSoilLayer1D(entity.Top.ToNullAsNaN()) { - Properties = + Data = { IsAquifer = Convert.ToBoolean(entity.IsAquifer), MaterialName = entity.MaterialName ?? string.Empty, Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/MacroStabilityInwards/MacroStabilityInwardsSoilLayerTwoDEntityReadExtensions.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/MacroStabilityInwards/MacroStabilityInwardsSoilLayerTwoDEntityReadExtensions.cs (.../MacroStabilityInwardsSoilLayerTwoDEntityReadExtensions.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/MacroStabilityInwards/MacroStabilityInwardsSoilLayerTwoDEntityReadExtensions.cs (.../MacroStabilityInwardsSoilLayerTwoDEntityReadExtensions.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -55,7 +55,7 @@ return new MacroStabilityInwardsSoilLayer2D(outerRing, holes) { - Properties = + Data = { IsAquifer = Convert.ToBoolean(entity.IsAquifer), MaterialName = entity.MaterialName ?? string.Empty, Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacroStabilityInwards/MacroStabilityInwardsSoilLayer1DCreateExtensionsTest.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacroStabilityInwards/MacroStabilityInwardsSoilLayer1DCreateExtensionsTest.cs (.../MacroStabilityInwardsSoilLayer1DCreateExtensionsTest.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacroStabilityInwards/MacroStabilityInwardsSoilLayer1DCreateExtensionsTest.cs (.../MacroStabilityInwardsSoilLayer1DCreateExtensionsTest.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -52,7 +52,7 @@ var random = new Random(31); var soilLayer = new MacroStabilityInwardsSoilLayer1D(random.NextDouble()) { - Properties = + Data = { IsAquifer = random.NextBoolean(), MaterialName = "MaterialName", @@ -107,28 +107,28 @@ Assert.IsNotNull(entity); Assert.AreEqual(soilLayer.Top, entity.Top); - MacroStabilityInwardsSoilLayerProperties properties = soilLayer.Properties; - Assert.AreEqual(Convert.ToByte(properties.IsAquifer), entity.IsAquifer); - Assert.AreEqual(properties.MaterialName, entity.MaterialName); - Assert.AreEqual(properties.Color.ToArgb(), Convert.ToInt32(entity.Color)); - Assert.AreEqual(Convert.ToByte(properties.UsePop), entity.UsePop); - Assert.AreEqual(Convert.ToByte(properties.ShearStrengthModel), entity.ShearStrengthModel); - Assert.AreEqual(properties.AbovePhreaticLevel.Mean, entity.AbovePhreaticLevelMean); - Assert.AreEqual(properties.AbovePhreaticLevel.CoefficientOfVariation, entity.AbovePhreaticLevelCoefficientOfVariation); - Assert.AreEqual(properties.AbovePhreaticLevel.Shift, entity.AbovePhreaticLevelShift); - Assert.AreEqual(properties.BelowPhreaticLevel.Mean, entity.BelowPhreaticLevelMean); - Assert.AreEqual(properties.BelowPhreaticLevel.CoefficientOfVariation, entity.BelowPhreaticLevelCoefficientOfVariation); - Assert.AreEqual(properties.BelowPhreaticLevel.Shift, entity.BelowPhreaticLevelShift); - Assert.AreEqual(properties.Cohesion.Mean, entity.CohesionMean); - Assert.AreEqual(properties.Cohesion.CoefficientOfVariation, entity.CohesionCoefficientOfVariation); - Assert.AreEqual(properties.FrictionAngle.Mean, entity.FrictionAngleMean); - Assert.AreEqual(properties.FrictionAngle.CoefficientOfVariation, entity.FrictionAngleCoefficientOfVariation); - Assert.AreEqual(properties.ShearStrengthRatio.Mean, entity.ShearStrengthRatioMean); - Assert.AreEqual(properties.ShearStrengthRatio.CoefficientOfVariation, entity.ShearStrengthRatioCoefficientOfVariation); - Assert.AreEqual(properties.StrengthIncreaseExponent.Mean, entity.StrengthIncreaseExponentMean); - Assert.AreEqual(properties.StrengthIncreaseExponent.CoefficientOfVariation, entity.StrengthIncreaseExponentCoefficientOfVariation); - Assert.AreEqual(properties.Pop.Mean, entity.PopMean); - Assert.AreEqual(properties.Pop.CoefficientOfVariation, entity.PopCoefficientOfVariation); + MacroStabilityInwardsSoilLayerData data = soilLayer.Data; + Assert.AreEqual(Convert.ToByte(data.IsAquifer), entity.IsAquifer); + Assert.AreEqual(data.MaterialName, entity.MaterialName); + Assert.AreEqual(data.Color.ToArgb(), Convert.ToInt32(entity.Color)); + Assert.AreEqual(Convert.ToByte(data.UsePop), entity.UsePop); + Assert.AreEqual(Convert.ToByte(data.ShearStrengthModel), entity.ShearStrengthModel); + Assert.AreEqual(data.AbovePhreaticLevel.Mean, entity.AbovePhreaticLevelMean); + Assert.AreEqual(data.AbovePhreaticLevel.CoefficientOfVariation, entity.AbovePhreaticLevelCoefficientOfVariation); + Assert.AreEqual(data.AbovePhreaticLevel.Shift, entity.AbovePhreaticLevelShift); + Assert.AreEqual(data.BelowPhreaticLevel.Mean, entity.BelowPhreaticLevelMean); + Assert.AreEqual(data.BelowPhreaticLevel.CoefficientOfVariation, entity.BelowPhreaticLevelCoefficientOfVariation); + Assert.AreEqual(data.BelowPhreaticLevel.Shift, entity.BelowPhreaticLevelShift); + Assert.AreEqual(data.Cohesion.Mean, entity.CohesionMean); + Assert.AreEqual(data.Cohesion.CoefficientOfVariation, entity.CohesionCoefficientOfVariation); + Assert.AreEqual(data.FrictionAngle.Mean, entity.FrictionAngleMean); + Assert.AreEqual(data.FrictionAngle.CoefficientOfVariation, entity.FrictionAngleCoefficientOfVariation); + Assert.AreEqual(data.ShearStrengthRatio.Mean, entity.ShearStrengthRatioMean); + Assert.AreEqual(data.ShearStrengthRatio.CoefficientOfVariation, entity.ShearStrengthRatioCoefficientOfVariation); + Assert.AreEqual(data.StrengthIncreaseExponent.Mean, entity.StrengthIncreaseExponentMean); + Assert.AreEqual(data.StrengthIncreaseExponent.CoefficientOfVariation, entity.StrengthIncreaseExponentCoefficientOfVariation); + Assert.AreEqual(data.Pop.Mean, entity.PopMean); + Assert.AreEqual(data.Pop.CoefficientOfVariation, entity.PopCoefficientOfVariation); Assert.AreEqual(order, entity.Order); } @@ -138,7 +138,7 @@ // Setup var soilLayer = new MacroStabilityInwardsSoilLayer1D(double.NaN) { - Properties = + Data = { AbovePhreaticLevel = { @@ -211,7 +211,7 @@ const string materialName = "MaterialName"; var soilLayer = new MacroStabilityInwardsSoilLayer1D(0) { - Properties = + Data = { MaterialName = materialName } Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacroStabilityInwards/MacroStabilityInwardsSoilLayer2DCreateExtensionsTest.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacroStabilityInwards/MacroStabilityInwardsSoilLayer2DCreateExtensionsTest.cs (.../MacroStabilityInwardsSoilLayer2DCreateExtensionsTest.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacroStabilityInwards/MacroStabilityInwardsSoilLayer2DCreateExtensionsTest.cs (.../MacroStabilityInwardsSoilLayer2DCreateExtensionsTest.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -58,7 +58,7 @@ CreateRandomRing(random) }) { - Properties = + Data = { IsAquifer = random.NextBoolean(), MaterialName = "MaterialName", @@ -112,28 +112,28 @@ // Assert Assert.IsNotNull(entity); - MacroStabilityInwardsSoilLayerProperties properties = soilLayer.Properties; - Assert.AreEqual(Convert.ToByte(properties.IsAquifer), entity.IsAquifer); - Assert.AreEqual(properties.MaterialName, entity.MaterialName); - Assert.AreEqual(properties.Color.ToArgb(), Convert.ToInt32(entity.Color)); - Assert.AreEqual(Convert.ToByte(properties.UsePop), entity.UsePop); - Assert.AreEqual(Convert.ToByte(properties.ShearStrengthModel), entity.ShearStrengthModel); - Assert.AreEqual(properties.AbovePhreaticLevel.Mean, entity.AbovePhreaticLevelMean); - Assert.AreEqual(properties.AbovePhreaticLevel.CoefficientOfVariation, entity.AbovePhreaticLevelCoefficientOfVariation); - Assert.AreEqual(properties.AbovePhreaticLevel.Shift, entity.AbovePhreaticLevelShift); - Assert.AreEqual(properties.BelowPhreaticLevel.Mean, entity.BelowPhreaticLevelMean); - Assert.AreEqual(properties.BelowPhreaticLevel.CoefficientOfVariation, entity.BelowPhreaticLevelCoefficientOfVariation); - Assert.AreEqual(properties.BelowPhreaticLevel.Shift, entity.BelowPhreaticLevelShift); - Assert.AreEqual(properties.Cohesion.Mean, entity.CohesionMean); - Assert.AreEqual(properties.Cohesion.CoefficientOfVariation, entity.CohesionCoefficientOfVariation); - Assert.AreEqual(properties.FrictionAngle.Mean, entity.FrictionAngleMean); - Assert.AreEqual(properties.FrictionAngle.CoefficientOfVariation, entity.FrictionAngleCoefficientOfVariation); - Assert.AreEqual(properties.ShearStrengthRatio.Mean, entity.ShearStrengthRatioMean); - Assert.AreEqual(properties.ShearStrengthRatio.CoefficientOfVariation, entity.ShearStrengthRatioCoefficientOfVariation); - Assert.AreEqual(properties.StrengthIncreaseExponent.Mean, entity.StrengthIncreaseExponentMean); - Assert.AreEqual(properties.StrengthIncreaseExponent.CoefficientOfVariation, entity.StrengthIncreaseExponentCoefficientOfVariation); - Assert.AreEqual(properties.Pop.Mean, entity.PopMean); - Assert.AreEqual(properties.Pop.CoefficientOfVariation, entity.PopCoefficientOfVariation); + MacroStabilityInwardsSoilLayerData data = soilLayer.Data; + Assert.AreEqual(Convert.ToByte(data.IsAquifer), entity.IsAquifer); + Assert.AreEqual(data.MaterialName, entity.MaterialName); + Assert.AreEqual(data.Color.ToArgb(), Convert.ToInt32(entity.Color)); + Assert.AreEqual(Convert.ToByte(data.UsePop), entity.UsePop); + Assert.AreEqual(Convert.ToByte(data.ShearStrengthModel), entity.ShearStrengthModel); + Assert.AreEqual(data.AbovePhreaticLevel.Mean, entity.AbovePhreaticLevelMean); + Assert.AreEqual(data.AbovePhreaticLevel.CoefficientOfVariation, entity.AbovePhreaticLevelCoefficientOfVariation); + Assert.AreEqual(data.AbovePhreaticLevel.Shift, entity.AbovePhreaticLevelShift); + Assert.AreEqual(data.BelowPhreaticLevel.Mean, entity.BelowPhreaticLevelMean); + Assert.AreEqual(data.BelowPhreaticLevel.CoefficientOfVariation, entity.BelowPhreaticLevelCoefficientOfVariation); + Assert.AreEqual(data.BelowPhreaticLevel.Shift, entity.BelowPhreaticLevelShift); + Assert.AreEqual(data.Cohesion.Mean, entity.CohesionMean); + Assert.AreEqual(data.Cohesion.CoefficientOfVariation, entity.CohesionCoefficientOfVariation); + Assert.AreEqual(data.FrictionAngle.Mean, entity.FrictionAngleMean); + Assert.AreEqual(data.FrictionAngle.CoefficientOfVariation, entity.FrictionAngleCoefficientOfVariation); + Assert.AreEqual(data.ShearStrengthRatio.Mean, entity.ShearStrengthRatioMean); + Assert.AreEqual(data.ShearStrengthRatio.CoefficientOfVariation, entity.ShearStrengthRatioCoefficientOfVariation); + Assert.AreEqual(data.StrengthIncreaseExponent.Mean, entity.StrengthIncreaseExponentMean); + Assert.AreEqual(data.StrengthIncreaseExponent.CoefficientOfVariation, entity.StrengthIncreaseExponentCoefficientOfVariation); + Assert.AreEqual(data.Pop.Mean, entity.PopMean); + Assert.AreEqual(data.Pop.CoefficientOfVariation, entity.PopCoefficientOfVariation); Assert.AreEqual(order, entity.Order); AssertOuterRing(soilLayer.OuterRing, entity); @@ -147,7 +147,7 @@ var random = new Random(31); var soilLayer = new MacroStabilityInwardsSoilLayer2D(CreateRandomRing(random), Enumerable.Empty()) { - Properties = + Data = { AbovePhreaticLevel = { @@ -224,7 +224,7 @@ CreateRandomRing(random) }) { - Properties = + Data = { MaterialName = materialName } Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/IntegrationTests/StorageSqLiteIntegrationTest.cs =================================================================== diff -u -rdcda3121bebe24597f452aec34a96740b04d1662 -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/IntegrationTests/StorageSqLiteIntegrationTest.cs (.../StorageSqLiteIntegrationTest.cs) (revision dcda3121bebe24597f452aec34a96740b04d1662) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/IntegrationTests/StorageSqLiteIntegrationTest.cs (.../StorageSqLiteIntegrationTest.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -1485,62 +1485,62 @@ MacroStabilityInwardsSoilLayer1D actualLayer) { Assert.AreEqual(expectedLayer.Top, actualLayer.Top); - AssertMacroStabilityInwardsSoilLayerProperties(expectedLayer.Properties, actualLayer.Properties); + AssertMacroStabilityInwardsSoilLayerData(expectedLayer.Data, actualLayer.Data); } private static void AssertMacroStabilityInwardsSoilLayer(MacroStabilityInwardsSoilLayer2D expectedLayer, MacroStabilityInwardsSoilLayer2D actualLayer) { Assert.AreEqual(expectedLayer.OuterRing, actualLayer.OuterRing); CollectionAssert.AreEqual(expectedLayer.Holes, actualLayer.Holes); - AssertMacroStabilityInwardsSoilLayerProperties(expectedLayer.Properties, actualLayer.Properties); + AssertMacroStabilityInwardsSoilLayerData(expectedLayer.Data, actualLayer.Data); } - private static void AssertMacroStabilityInwardsSoilLayerProperties(MacroStabilityInwardsSoilLayerProperties expectedProperties, - MacroStabilityInwardsSoilLayerProperties actualProperties) + private static void AssertMacroStabilityInwardsSoilLayerData(MacroStabilityInwardsSoilLayerData expectedData, + MacroStabilityInwardsSoilLayerData actualData) { - Assert.AreEqual(expectedProperties.IsAquifer, actualProperties.IsAquifer); - Assert.AreEqual(expectedProperties.MaterialName, actualProperties.MaterialName); - Assert.AreEqual(expectedProperties.Color.ToArgb(), actualProperties.Color.ToArgb()); - Assert.AreEqual(expectedProperties.UsePop, actualProperties.UsePop); - Assert.AreEqual(expectedProperties.ShearStrengthModel, actualProperties.ShearStrengthModel); + Assert.AreEqual(expectedData.IsAquifer, actualData.IsAquifer); + Assert.AreEqual(expectedData.MaterialName, actualData.MaterialName); + Assert.AreEqual(expectedData.Color.ToArgb(), actualData.Color.ToArgb()); + Assert.AreEqual(expectedData.UsePop, actualData.UsePop); + Assert.AreEqual(expectedData.ShearStrengthModel, actualData.ShearStrengthModel); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { - Mean = expectedProperties.AbovePhreaticLevel.Mean, - CoefficientOfVariation = expectedProperties.AbovePhreaticLevel.CoefficientOfVariation, - Shift = expectedProperties.AbovePhreaticLevel.Shift - }, actualProperties.AbovePhreaticLevel); + Mean = expectedData.AbovePhreaticLevel.Mean, + CoefficientOfVariation = expectedData.AbovePhreaticLevel.CoefficientOfVariation, + Shift = expectedData.AbovePhreaticLevel.Shift + }, actualData.AbovePhreaticLevel); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { - Mean = expectedProperties.BelowPhreaticLevel.Mean, - CoefficientOfVariation = expectedProperties.BelowPhreaticLevel.CoefficientOfVariation, - Shift = expectedProperties.BelowPhreaticLevel.Shift - }, actualProperties.BelowPhreaticLevel); + Mean = expectedData.BelowPhreaticLevel.Mean, + CoefficientOfVariation = expectedData.BelowPhreaticLevel.CoefficientOfVariation, + Shift = expectedData.BelowPhreaticLevel.Shift + }, actualData.BelowPhreaticLevel); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { - Mean = expectedProperties.Cohesion.Mean, - CoefficientOfVariation = expectedProperties.Cohesion.CoefficientOfVariation - }, actualProperties.Cohesion); + Mean = expectedData.Cohesion.Mean, + CoefficientOfVariation = expectedData.Cohesion.CoefficientOfVariation + }, actualData.Cohesion); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { - Mean = expectedProperties.FrictionAngle.Mean, - CoefficientOfVariation = expectedProperties.FrictionAngle.CoefficientOfVariation - }, actualProperties.FrictionAngle); + Mean = expectedData.FrictionAngle.Mean, + CoefficientOfVariation = expectedData.FrictionAngle.CoefficientOfVariation + }, actualData.FrictionAngle); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { - Mean = expectedProperties.ShearStrengthRatio.Mean, - CoefficientOfVariation = expectedProperties.ShearStrengthRatio.CoefficientOfVariation - }, actualProperties.ShearStrengthRatio); + Mean = expectedData.ShearStrengthRatio.Mean, + CoefficientOfVariation = expectedData.ShearStrengthRatio.CoefficientOfVariation + }, actualData.ShearStrengthRatio); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { - Mean = expectedProperties.StrengthIncreaseExponent.Mean, - CoefficientOfVariation = expectedProperties.StrengthIncreaseExponent.CoefficientOfVariation - }, actualProperties.StrengthIncreaseExponent); + Mean = expectedData.StrengthIncreaseExponent.Mean, + CoefficientOfVariation = expectedData.StrengthIncreaseExponent.CoefficientOfVariation + }, actualData.StrengthIncreaseExponent); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { - Mean = expectedProperties.Pop.Mean, - CoefficientOfVariation = expectedProperties.Pop.CoefficientOfVariation - }, actualProperties.Pop); + Mean = expectedData.Pop.Mean, + CoefficientOfVariation = expectedData.Pop.CoefficientOfVariation + }, actualData.Pop); } private static void AssertMacroStabilityInwardsSurfaceLine(MacroStabilityInwardsSurfaceLine expectedSurfaceLine, Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MacroStabilityInwards/MacroStabilityInwardsSoilLayerOneDEntityReadExtensionsTest.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MacroStabilityInwards/MacroStabilityInwardsSoilLayerOneDEntityReadExtensionsTest.cs (.../MacroStabilityInwardsSoilLayerOneDEntityReadExtensionsTest.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MacroStabilityInwards/MacroStabilityInwardsSoilLayerOneDEntityReadExtensionsTest.cs (.../MacroStabilityInwardsSoilLayerOneDEntityReadExtensionsTest.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -101,54 +101,54 @@ // Assert Assert.IsNotNull(layer); Assert.AreEqual(top, layer.Top); - MacroStabilityInwardsSoilLayerProperties properties = layer.Properties; - Assert.AreEqual(isAquifer, properties.IsAquifer); - Assert.AreEqual(Color.FromArgb(color), properties.Color); - Assert.AreEqual(entity.MaterialName, properties.MaterialName); + MacroStabilityInwardsSoilLayerData data = layer.Data; + Assert.AreEqual(isAquifer, data.IsAquifer); + Assert.AreEqual(Color.FromArgb(color), data.Color); + Assert.AreEqual(entity.MaterialName, data.MaterialName); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = (RoundedDouble) abovePhreaticLevelMean, CoefficientOfVariation = (RoundedDouble) abovePhreaticLevelCoefficientOfVariation, Shift = (RoundedDouble) abovePhreaticLevelShift - }, properties.AbovePhreaticLevel); + }, data.AbovePhreaticLevel); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = (RoundedDouble) belowPhreaticLevelMean, CoefficientOfVariation = (RoundedDouble) belowPhreaticLevelCoefficientOfVariation, Shift = (RoundedDouble) belowPhreaticLevelShift - }, properties.BelowPhreaticLevel); + }, data.BelowPhreaticLevel); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = (RoundedDouble) cohesionMean, CoefficientOfVariation = (RoundedDouble) cohesionCoefficientOfVariation - }, properties.Cohesion); + }, data.Cohesion); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = (RoundedDouble) frictionAngleMean, CoefficientOfVariation = (RoundedDouble) frictionAngleCoefficientOfVariation - }, properties.FrictionAngle); + }, data.FrictionAngle); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = (RoundedDouble) shearStrengthRatioMean, CoefficientOfVariation = (RoundedDouble) shearStrengthRatioCoefficientOfVariation - }, properties.ShearStrengthRatio); + }, data.ShearStrengthRatio); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = (RoundedDouble) strengthIncreaseExponentMean, CoefficientOfVariation = (RoundedDouble) strengthIncreaseExponentCoefficientOfVariation - }, properties.StrengthIncreaseExponent); + }, data.StrengthIncreaseExponent); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = (RoundedDouble) popMean, CoefficientOfVariation = (RoundedDouble) popCoefficientOfVariation - }, properties.Pop); + }, data.Pop); } [Test] @@ -165,53 +165,53 @@ // Assert Assert.IsNotNull(layer); - MacroStabilityInwardsSoilLayerProperties properties = layer.Properties; - Assert.AreEqual(entity.MaterialName, properties.MaterialName); + MacroStabilityInwardsSoilLayerData data = layer.Data; + Assert.AreEqual(entity.MaterialName, data.MaterialName); Assert.IsNaN(layer.Top); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = RoundedDouble.NaN, CoefficientOfVariation = RoundedDouble.NaN, Shift = RoundedDouble.NaN - }, properties.AbovePhreaticLevel); + }, data.AbovePhreaticLevel); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = RoundedDouble.NaN, CoefficientOfVariation = RoundedDouble.NaN, Shift = RoundedDouble.NaN - }, properties.BelowPhreaticLevel); + }, data.BelowPhreaticLevel); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = RoundedDouble.NaN, CoefficientOfVariation = RoundedDouble.NaN - }, properties.Cohesion); + }, data.Cohesion); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = RoundedDouble.NaN, CoefficientOfVariation = RoundedDouble.NaN - }, properties.FrictionAngle); + }, data.FrictionAngle); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = RoundedDouble.NaN, CoefficientOfVariation = RoundedDouble.NaN - }, properties.ShearStrengthRatio); + }, data.ShearStrengthRatio); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = RoundedDouble.NaN, CoefficientOfVariation = RoundedDouble.NaN - }, properties.StrengthIncreaseExponent); + }, data.StrengthIncreaseExponent); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = RoundedDouble.NaN, CoefficientOfVariation = RoundedDouble.NaN - }, properties.Pop); + }, data.Pop); } } } \ No newline at end of file Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MacroStabilityInwards/MacroStabilityInwardsSoilLayerTwoDEntityReadExtensionsTest.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MacroStabilityInwards/MacroStabilityInwardsSoilLayerTwoDEntityReadExtensionsTest.cs (.../MacroStabilityInwardsSoilLayerTwoDEntityReadExtensionsTest.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MacroStabilityInwards/MacroStabilityInwardsSoilLayerTwoDEntityReadExtensionsTest.cs (.../MacroStabilityInwardsSoilLayerTwoDEntityReadExtensionsTest.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -116,54 +116,54 @@ // Assert Assert.IsNotNull(layer); - MacroStabilityInwardsSoilLayerProperties properties = layer.Properties; - Assert.AreEqual(isAquifer, properties.IsAquifer); - Assert.AreEqual(Color.FromArgb(color), properties.Color); - Assert.AreEqual(entity.MaterialName, properties.MaterialName); + MacroStabilityInwardsSoilLayerData data = layer.Data; + Assert.AreEqual(isAquifer, data.IsAquifer); + Assert.AreEqual(Color.FromArgb(color), data.Color); + Assert.AreEqual(entity.MaterialName, data.MaterialName); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = (RoundedDouble) abovePhreaticLevelMean, CoefficientOfVariation = (RoundedDouble) abovePhreaticLevelCoefficientOfVariation, Shift = (RoundedDouble) abovePhreaticLevelShift - }, properties.AbovePhreaticLevel); + }, data.AbovePhreaticLevel); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = (RoundedDouble) belowPhreaticLevelMean, CoefficientOfVariation = (RoundedDouble) belowPhreaticLevelCoefficientOfVariation, Shift = (RoundedDouble) belowPhreaticLevelShift - }, properties.BelowPhreaticLevel); + }, data.BelowPhreaticLevel); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = (RoundedDouble) cohesionMean, CoefficientOfVariation = (RoundedDouble) cohesionCoefficientOfVariation - }, properties.Cohesion); + }, data.Cohesion); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = (RoundedDouble) frictionAngleMean, CoefficientOfVariation = (RoundedDouble) frictionAngleCoefficientOfVariation - }, properties.FrictionAngle); + }, data.FrictionAngle); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = (RoundedDouble) shearStrengthRatioMean, CoefficientOfVariation = (RoundedDouble) shearStrengthRatioCoefficientOfVariation - }, properties.ShearStrengthRatio); + }, data.ShearStrengthRatio); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = (RoundedDouble) strengthIncreaseExponentMean, CoefficientOfVariation = (RoundedDouble) strengthIncreaseExponentCoefficientOfVariation - }, properties.StrengthIncreaseExponent); + }, data.StrengthIncreaseExponent); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = (RoundedDouble) popMean, CoefficientOfVariation = (RoundedDouble) popCoefficientOfVariation - }, properties.Pop); + }, data.Pop); CollectionAssert.AreEqual(outerRingPoints, layer.OuterRing.Points); CollectionAssert.AreEqual(holes, layer.Holes); @@ -185,52 +185,52 @@ // Assert Assert.IsNotNull(layer); - MacroStabilityInwardsSoilLayerProperties properties = layer.Properties; - Assert.AreEqual(entity.MaterialName, properties.MaterialName); + MacroStabilityInwardsSoilLayerData data = layer.Data; + Assert.AreEqual(entity.MaterialName, data.MaterialName); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = RoundedDouble.NaN, CoefficientOfVariation = RoundedDouble.NaN, Shift = RoundedDouble.NaN - }, properties.AbovePhreaticLevel); + }, data.AbovePhreaticLevel); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = RoundedDouble.NaN, CoefficientOfVariation = RoundedDouble.NaN, Shift = RoundedDouble.NaN - }, properties.BelowPhreaticLevel); + }, data.BelowPhreaticLevel); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = RoundedDouble.NaN, CoefficientOfVariation = RoundedDouble.NaN - }, properties.Cohesion); + }, data.Cohesion); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = RoundedDouble.NaN, CoefficientOfVariation = RoundedDouble.NaN - }, properties.FrictionAngle); + }, data.FrictionAngle); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = RoundedDouble.NaN, CoefficientOfVariation = RoundedDouble.NaN - }, properties.ShearStrengthRatio); + }, data.ShearStrengthRatio); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = RoundedDouble.NaN, CoefficientOfVariation = RoundedDouble.NaN - }, properties.StrengthIncreaseExponent); + }, data.StrengthIncreaseExponent); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = RoundedDouble.NaN, CoefficientOfVariation = RoundedDouble.NaN - }, properties.Pop); + }, data.Pop); } private static Ring CreateRandomRing(Random random) Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MacroStabilityInwards/MacroStabilityInwardsSoilProfileOneDEntityReadExtensionsTest.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MacroStabilityInwards/MacroStabilityInwardsSoilProfileOneDEntityReadExtensionsTest.cs (.../MacroStabilityInwardsSoilProfileOneDEntityReadExtensionsTest.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MacroStabilityInwards/MacroStabilityInwardsSoilProfileOneDEntityReadExtensionsTest.cs (.../MacroStabilityInwardsSoilProfileOneDEntityReadExtensionsTest.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -99,7 +99,7 @@ { "B", "A" - }, profile.Layers.Select(l => l.Properties.MaterialName)); + }, profile.Layers.Select(l => l.Data.MaterialName)); } [Test] @@ -130,7 +130,7 @@ Assert.AreEqual(entity.MacroStabilityInwardsSoilLayerOneDEntities.Count, profile.Layers.Count()); MacroStabilityInwardsSoilLayer1D layer = profile.Layers.ElementAt(0); - Assert.AreEqual(entity.MacroStabilityInwardsSoilLayerOneDEntities.First().MaterialName, layer.Properties.MaterialName); + Assert.AreEqual(entity.MacroStabilityInwardsSoilLayerOneDEntities.First().MaterialName, layer.Data.MaterialName); } [Test] Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MacroStabilityInwards/MacroStabilityInwardsSoilProfileTwoDEntityReadExtensionsTest.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MacroStabilityInwards/MacroStabilityInwardsSoilProfileTwoDEntityReadExtensionsTest.cs (.../MacroStabilityInwardsSoilProfileTwoDEntityReadExtensionsTest.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MacroStabilityInwards/MacroStabilityInwardsSoilProfileTwoDEntityReadExtensionsTest.cs (.../MacroStabilityInwardsSoilProfileTwoDEntityReadExtensionsTest.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -115,7 +115,7 @@ { "B", "A" - }, profile.Layers.Select(l => l.Properties.MaterialName)); + }, profile.Layers.Select(l => l.Data.MaterialName)); CollectionAssert.AreEqual(new[] { Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ReadConversionCollectorTest.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ReadConversionCollectorTest.cs (.../ReadConversionCollectorTest.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ReadConversionCollectorTest.cs (.../ReadConversionCollectorTest.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -555,7 +555,7 @@ { new MacroStabilityInwardsSoilLayer1D(0.0) { - Properties = + Data = { IsAquifer = true } Index: Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs =================================================================== diff -u -rdcda3121bebe24597f452aec34a96740b04d1662 -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs (.../RingtoetsProjectTestHelper.cs) (revision dcda3121bebe24597f452aec34a96740b04d1662) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs (.../RingtoetsProjectTestHelper.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -1066,7 +1066,7 @@ var soilLayer1D = new MacroStabilityInwardsSoilLayer1D(5) { - Properties = + Data = { IsAquifer = true, MaterialName = "SeaShellLayer", @@ -1133,7 +1133,7 @@ }) }) { - Properties = + Data = { IsAquifer = false, MaterialName = "GainsboroLayer", Index: Demo/Ringtoets/src/Demo.Ringtoets/Commands/AddNewDemoAssessmentSectionCommand.cs =================================================================== diff -u -r55ae69f1f31e0109eb98f4008629b28bbb825a8e -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Demo/Ringtoets/src/Demo.Ringtoets/Commands/AddNewDemoAssessmentSectionCommand.cs (.../AddNewDemoAssessmentSectionCommand.cs) (revision 55ae69f1f31e0109eb98f4008629b28bbb825a8e) +++ Demo/Ringtoets/src/Demo.Ringtoets/Commands/AddNewDemoAssessmentSectionCommand.cs (.../AddNewDemoAssessmentSectionCommand.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -48,7 +48,6 @@ using Ringtoets.Integration.Plugin.Handlers; using Ringtoets.MacroStabilityInwards.Data; using Ringtoets.MacroStabilityInwards.Data.SoilProfile; -using Ringtoets.MacroStabilityInwards.Primitives; using Ringtoets.Piping.Data; using Ringtoets.Piping.Data.SoilProfile; using Ringtoets.Piping.Plugin.FileImporter; @@ -464,7 +463,7 @@ }) }) { - Properties = + Data = { MaterialName = "2D Layer" } @@ -479,7 +478,7 @@ { new MacroStabilityInwardsSoilLayer1D(30.1267) { - Properties = + Data = { MaterialName = "1D Layer", IsAquifer = true Index: Demo/Ringtoets/test/Demo.Ringtoets.Test/Commands/AddNewDemoAssessmentSectionCommandTest.cs =================================================================== diff -u -rb807a83a281be5e9f4645d35ba7da968a0a5e26f -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Demo/Ringtoets/test/Demo.Ringtoets.Test/Commands/AddNewDemoAssessmentSectionCommandTest.cs (.../AddNewDemoAssessmentSectionCommandTest.cs) (revision b807a83a281be5e9f4645d35ba7da968a0a5e26f) +++ Demo/Ringtoets/test/Demo.Ringtoets.Test/Commands/AddNewDemoAssessmentSectionCommandTest.cs (.../AddNewDemoAssessmentSectionCommandTest.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -42,8 +42,8 @@ using Ringtoets.GrassCoverErosionOutwards.Data; using Ringtoets.HeightStructures.Data; using Ringtoets.Integration.Data; +using Ringtoets.MacroStabilityInwards.Data; using Ringtoets.MacroStabilityInwards.Data.SoilProfile; -using Ringtoets.MacroStabilityInwards.Primitives; using Ringtoets.Piping.Data; using Ringtoets.Piping.Data.SoilProfile; using Ringtoets.Piping.Primitives; @@ -592,7 +592,7 @@ private static void AssertMacroStabilityInwardsFailureMechanism(AssessmentSection demoAssessmentSection) { - var failureMechanism = demoAssessmentSection.MacroStabilityInwards; + MacroStabilityInwardsFailureMechanism failureMechanism = demoAssessmentSection.MacroStabilityInwards; Assert.AreEqual("testmodel.soil", failureMechanism.StochasticSoilModels.SourcePath); Assert.AreEqual(1, failureMechanism.StochasticSoilModels.Count); @@ -641,7 +641,7 @@ }) }; CollectionAssert.AreEqual(holes, soilLayer2D.Holes); - Assert.AreEqual("2D Layer", soilLayer2D.Properties.MaterialName); + Assert.AreEqual("2D Layer", soilLayer2D.Data.MaterialName); } private static void AssertMacroStabilityInwardsSoilProfile1D(MacroStabilityInwardsSoilProfile1D soilProfile1D) @@ -650,8 +650,8 @@ Assert.AreEqual(22.567, soilProfile1D.Bottom); MacroStabilityInwardsSoilLayer1D soilLayer = soilProfile1D.Layers.Single(); - Assert.AreEqual("1D Layer", soilLayer.Properties.MaterialName); - Assert.IsTrue(soilLayer.Properties.IsAquifer); + Assert.AreEqual("1D Layer", soilLayer.Data.MaterialName); + Assert.IsTrue(soilLayer.Data.IsAquifer); } #endregion Index: Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.Designer.cs =================================================================== diff -u -rc55a333c4b0d017ec75a2f8afb8d2f621361c668 -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision c55a333c4b0d017ec75a2f8afb8d2f621361c668) +++ Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -1545,14 +1545,14 @@ } /// - /// Looks up a localized string similar to BEGIN TRANSACTION; - ///CREATE TABLE "TimeIntegrationSettings" ( - /// "LocationID" INTEGER NOT NULL, - /// "CalculationTypeID" INTEGER NOT NULL, - /// "TimeIntegrationSchemeID" INTEGER NOT NULL, - /// CONSTRAINT timeintegrationsettings_pk PRIMARY KEY ("LocationID", "CalculationTypeID"), - /// CONSTRAINT calculationtypes_timeintegrationsettings_fk FOREIGN KEY ("CalculationTypeID") REFERENCES CalculationTypes ("CalculationTypeID") ON DELETE NO ACTION ON UPDATE NO ACTION - ///); + /// Looks up a localized string similar to BEGIN TRANSACTION; + ///CREATE TABLE "TimeIntegrationSettings" ( + /// "LocationID" INTEGER NOT NULL, + /// "CalculationTypeID" INTEGER NOT NULL, + /// "TimeIntegrationSchemeID" INTEGER NOT NULL, + /// CONSTRAINT timeintegrationsettings_pk PRIMARY KEY ("LocationID", "CalculationTypeID"), + /// CONSTRAINT calculationtypes_timeintegrationsettings_fk FOREIGN KEY ("CalculationTypeID") REFERENCES CalculationTypes ("CalculationTypeID") ON DELETE NO ACTION ON UPDATE NO ACTION + ///); ///CREATE TABLE "Numeri [rest of string was truncated]";. /// public static string settings_schema { @@ -1687,9 +1687,9 @@ /// /// Looks up a localized string similar to Is aquifer. /// - public static string SoilLayerProperties_IsAquifer_DisplayName { + public static string SoilLayerData_IsAquifer_DisplayName { get { - return ResourceManager.GetString("SoilLayerProperties_IsAquifer_DisplayName", resourceCulture); + return ResourceManager.GetString("SoilLayerData_IsAquifer_DisplayName", resourceCulture); } } Index: Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.resx =================================================================== diff -u -rc55a333c4b0d017ec75a2f8afb8d2f621361c668 -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.resx (.../Resources.resx) (revision c55a333c4b0d017ec75a2f8afb8d2f621361c668) +++ Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.resx (.../Resources.resx) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -892,7 +892,7 @@ Parameter '{0}' is niet verschoven lognormaal verdeeld. - + Is aquifer Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.cs (.../MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.cs (.../MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -30,77 +30,77 @@ public static class MacroStabilityInwardsSemiProbabilisticDesignVariableFactory { /// - /// Creates the design variable for . + /// Creates the design variable for . /// - public static VariationCoefficientDesignVariable GetAbovePhreaticLevel(MacroStabilityInwardsSoilLayerProperties properties) + public static VariationCoefficientDesignVariable GetAbovePhreaticLevel(MacroStabilityInwardsSoilLayerData data) { - return new VariationCoefficientLogNormalDistributionDesignVariable(properties.AbovePhreaticLevel) + return new VariationCoefficientLogNormalDistributionDesignVariable(data.AbovePhreaticLevel) { Percentile = 0.5 }; } /// - /// Creates the design variable for . + /// Creates the design variable for . /// - public static VariationCoefficientDesignVariable GetBelowPhreaticLevel(MacroStabilityInwardsSoilLayerProperties properties) + public static VariationCoefficientDesignVariable GetBelowPhreaticLevel(MacroStabilityInwardsSoilLayerData data) { - return new VariationCoefficientLogNormalDistributionDesignVariable(properties.BelowPhreaticLevel) + return new VariationCoefficientLogNormalDistributionDesignVariable(data.BelowPhreaticLevel) { Percentile = 0.5 }; } /// - /// Creates the design variable for . + /// Creates the design variable for . /// - public static VariationCoefficientDesignVariable GetCohesion(MacroStabilityInwardsSoilLayerProperties properties) + public static VariationCoefficientDesignVariable GetCohesion(MacroStabilityInwardsSoilLayerData data) { - return new VariationCoefficientLogNormalDistributionDesignVariable(properties.Cohesion) + return new VariationCoefficientLogNormalDistributionDesignVariable(data.Cohesion) { Percentile = 0.05 }; } /// - /// Creates the design variable for . + /// Creates the design variable for . /// - public static VariationCoefficientDesignVariable GetFrictionAngle(MacroStabilityInwardsSoilLayerProperties properties) + public static VariationCoefficientDesignVariable GetFrictionAngle(MacroStabilityInwardsSoilLayerData data) { - return new VariationCoefficientLogNormalDistributionDesignVariable(properties.FrictionAngle) + return new VariationCoefficientLogNormalDistributionDesignVariable(data.FrictionAngle) { Percentile = 0.05 }; } /// - /// Creates the design variable for . + /// Creates the design variable for . /// - public static VariationCoefficientDesignVariable GetShearStrengthRatio(MacroStabilityInwardsSoilLayerProperties properties) + public static VariationCoefficientDesignVariable GetShearStrengthRatio(MacroStabilityInwardsSoilLayerData data) { - return new VariationCoefficientLogNormalDistributionDesignVariable(properties.ShearStrengthRatio) + return new VariationCoefficientLogNormalDistributionDesignVariable(data.ShearStrengthRatio) { Percentile = 0.05 }; } /// - /// Creates the design variable for . + /// Creates the design variable for . /// - public static VariationCoefficientDesignVariable GetStrengthIncreaseExponent(MacroStabilityInwardsSoilLayerProperties properties) + public static VariationCoefficientDesignVariable GetStrengthIncreaseExponent(MacroStabilityInwardsSoilLayerData data) { - return new VariationCoefficientLogNormalDistributionDesignVariable(properties.StrengthIncreaseExponent) + return new VariationCoefficientLogNormalDistributionDesignVariable(data.StrengthIncreaseExponent) { Percentile = 0.05 }; } /// - /// Creates the design variable for . + /// Creates the design variable for . /// - public static VariationCoefficientDesignVariable GetPop(MacroStabilityInwardsSoilLayerProperties properties) + public static VariationCoefficientDesignVariable GetPop(MacroStabilityInwardsSoilLayerData data) { - return new VariationCoefficientLogNormalDistributionDesignVariable(properties.Pop) + return new VariationCoefficientLogNormalDistributionDesignVariable(data.Pop) { Percentile = 0.05 }; Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/Ringtoets.MacroStabilityInwards.Data.csproj =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/Ringtoets.MacroStabilityInwards.Data.csproj (.../Ringtoets.MacroStabilityInwards.Data.csproj) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/Ringtoets.MacroStabilityInwards.Data.csproj (.../Ringtoets.MacroStabilityInwards.Data.csproj) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -70,7 +70,7 @@ - + Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilLayer1D.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilLayer1D.cs (.../MacroStabilityInwardsSoilLayer1D.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilLayer1D.cs (.../MacroStabilityInwardsSoilLayer1D.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -33,13 +33,13 @@ public MacroStabilityInwardsSoilLayer1D(double top) { Top = top; - Properties = new MacroStabilityInwardsSoilLayerProperties(); + Data = new MacroStabilityInwardsSoilLayerData(); } /// - /// Gets the properties of the . + /// Gets the data of the . /// - public MacroStabilityInwardsSoilLayerProperties Properties { get; } + public MacroStabilityInwardsSoilLayerData Data { get; } /// /// Gets the top level of the . @@ -68,15 +68,15 @@ unchecked { int hashCode = Top.GetHashCode(); - hashCode = (hashCode * 397) ^ Properties.GetHashCode(); + hashCode = (hashCode * 397) ^ Data.GetHashCode(); return hashCode; } } private bool Equals(MacroStabilityInwardsSoilLayer1D other) { return Top.Equals(other.Top) - && Properties.Equals(other.Properties); + && Data.Equals(other.Data); } } } \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilLayer2D.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilLayer2D.cs (.../MacroStabilityInwardsSoilLayer2D.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilLayer2D.cs (.../MacroStabilityInwardsSoilLayer2D.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -48,15 +48,15 @@ throw new ArgumentNullException(nameof(holes)); } - Properties = new MacroStabilityInwardsSoilLayerProperties(); + Data = new MacroStabilityInwardsSoilLayerData(); OuterRing = outerRing; Holes = holes.ToArray(); } /// - /// Gets the properties of the . + /// Gets the data of the . /// - public MacroStabilityInwardsSoilLayerProperties Properties { get; } + public MacroStabilityInwardsSoilLayerData Data { get; } /// /// Gets the outer ring of the polygon with holes describing the surface of the . @@ -89,7 +89,7 @@ { unchecked { - int hashCode = Properties.GetHashCode(); + int hashCode = Data.GetHashCode(); hashCode = (hashCode * 397) ^ OuterRing.GetHashCode(); foreach (Ring hole in Holes) { @@ -101,7 +101,7 @@ private bool Equals(MacroStabilityInwardsSoilLayer2D other) { - return Properties.Equals(other.Properties) + return Data.Equals(other.Data) && OuterRing.Equals(other.OuterRing) && Holes.SequenceEqual(other.Holes); } Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilLayerData.cs =================================================================== diff -u --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilLayerData.cs (revision 0) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilLayerData.cs (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -0,0 +1,294 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using System.Drawing; +using Core.Common.Base.Data; +using Ringtoets.Common.Data.Probabilistics; + +namespace Ringtoets.MacroStabilityInwards.Data.SoilProfile +{ + /// + /// Data of a soil layer. + /// + public class MacroStabilityInwardsSoilLayerData + { + private readonly VariationCoefficientLogNormalDistribution abovePhreaticLevel; + private readonly VariationCoefficientLogNormalDistribution belowPhreaticLevel; + private readonly VariationCoefficientLogNormalDistribution cohesion; + private readonly VariationCoefficientLogNormalDistribution frictionAngle; + private readonly VariationCoefficientLogNormalDistribution strengthIncreaseExponent; + private readonly VariationCoefficientLogNormalDistribution shearStrengthRatio; + private readonly VariationCoefficientLogNormalDistribution pop; + private string materialName = string.Empty; + + /// + /// Creates a new instance of . + /// + public MacroStabilityInwardsSoilLayerData() + { + abovePhreaticLevel = new VariationCoefficientLogNormalDistribution(2) + { + Mean = RoundedDouble.NaN, + CoefficientOfVariation = RoundedDouble.NaN, + Shift = RoundedDouble.NaN + }; + belowPhreaticLevel = new VariationCoefficientLogNormalDistribution(2) + { + Mean = RoundedDouble.NaN, + CoefficientOfVariation = RoundedDouble.NaN, + Shift = RoundedDouble.NaN + }; + cohesion = new VariationCoefficientLogNormalDistribution(2) + { + Mean = RoundedDouble.NaN, + CoefficientOfVariation = RoundedDouble.NaN + }; + frictionAngle = new VariationCoefficientLogNormalDistribution(2) + { + Mean = RoundedDouble.NaN, + CoefficientOfVariation = RoundedDouble.NaN + }; + strengthIncreaseExponent = new VariationCoefficientLogNormalDistribution(2) + { + Mean = RoundedDouble.NaN, + CoefficientOfVariation = RoundedDouble.NaN + }; + shearStrengthRatio = new VariationCoefficientLogNormalDistribution(2) + { + Mean = RoundedDouble.NaN, + CoefficientOfVariation = RoundedDouble.NaN + }; + pop = new VariationCoefficientLogNormalDistribution(2) + { + Mean = RoundedDouble.NaN, + CoefficientOfVariation = RoundedDouble.NaN + }; + + ShearStrengthModel = MacroStabilityInwardsShearStrengthModel.CPhi; + } + + /// + /// Gets or sets a value indicating whether the layer is an aquifer. + /// + public bool IsAquifer { get; set; } + + /// + /// Gets or sets the name of the material that was assigned to the layer. + /// + /// Thrown when is null. + public string MaterialName + { + get + { + return materialName; + } + set + { + if (value == null) + { + throw new ArgumentNullException(nameof(value)); + } + materialName = value; + } + } + + /// + /// Gets or sets the that was used to represent the layer. + /// + public Color Color { get; set; } + + /// + /// Gets or sets a value indicating whether to use POP for the layer. + /// + public bool UsePop { get; set; } + + /// + /// Gets or sets the shear strength model to use for the layer. + /// + public MacroStabilityInwardsShearStrengthModel ShearStrengthModel { get; set; } + + /// + /// Gets or sets the distribution for the volumic weight of the layer above the phreatic level. + /// [kN/m³] + /// + public VariationCoefficientLogNormalDistribution AbovePhreaticLevel + { + get + { + return abovePhreaticLevel; + } + set + { + abovePhreaticLevel.Mean = value.Mean; + abovePhreaticLevel.CoefficientOfVariation = value.CoefficientOfVariation; + abovePhreaticLevel.Shift = value.Shift; + } + } + + /// + /// Gets or sets the distribution for the volumic weight of the layer below the phreatic level. + /// [kN/m³] + /// + public VariationCoefficientLogNormalDistribution BelowPhreaticLevel + { + get + { + return belowPhreaticLevel; + } + set + { + belowPhreaticLevel.Mean = value.Mean; + belowPhreaticLevel.CoefficientOfVariation = value.CoefficientOfVariation; + belowPhreaticLevel.Shift = value.Shift; + } + } + + /// + /// Gets or sets the distribution for the cohesion. + /// [kN/m³] + /// + public VariationCoefficientLogNormalDistribution Cohesion + { + get + { + return cohesion; + } + set + { + cohesion.Mean = value.Mean; + cohesion.CoefficientOfVariation = value.CoefficientOfVariation; + } + } + + /// + /// Gets or sets the friction angle. + /// [°] + /// + public VariationCoefficientLogNormalDistribution FrictionAngle + { + get + { + return frictionAngle; + } + set + { + frictionAngle.Mean = value.Mean; + frictionAngle.CoefficientOfVariation = value.CoefficientOfVariation; + } + } + + /// + /// Gets or sets the strength increase component. + /// [-] + /// + public VariationCoefficientLogNormalDistribution StrengthIncreaseExponent + { + get + { + return strengthIncreaseExponent; + } + set + { + strengthIncreaseExponent.Mean = value.Mean; + strengthIncreaseExponent.CoefficientOfVariation = value.CoefficientOfVariation; + } + } + + /// + /// Gets or sets the shear strength ratio. + /// [-] + /// + public VariationCoefficientLogNormalDistribution ShearStrengthRatio + { + get + { + return shearStrengthRatio; + } + set + { + shearStrengthRatio.Mean = value.Mean; + shearStrengthRatio.CoefficientOfVariation = value.CoefficientOfVariation; + } + } + + /// + /// Gets or sets the Pop. + /// [kN/m²] + /// + public VariationCoefficientLogNormalDistribution Pop + { + get + { + return pop; + } + set + { + pop.Mean = value.Mean; + pop.CoefficientOfVariation = value.CoefficientOfVariation; + } + } + + public override bool Equals(object obj) + { + if (ReferenceEquals(null, obj)) return false; + if (ReferenceEquals(this, obj)) return true; + if (obj.GetType() != GetType()) return false; + return Equals((MacroStabilityInwardsSoilLayerData) obj); + } + + public override int GetHashCode() + { + unchecked + { + int hashCode = StringComparer.InvariantCulture.GetHashCode(materialName); + hashCode = (hashCode * 397) ^ IsAquifer.GetHashCode(); + hashCode = (hashCode * 397) ^ Color.GetHashCode(); + hashCode = (hashCode * 397) ^ UsePop.GetHashCode(); + hashCode = (hashCode * 397) ^ ShearStrengthModel.GetHashCode(); + hashCode = (hashCode * 397) ^ AbovePhreaticLevel.GetHashCode(); + hashCode = (hashCode * 397) ^ BelowPhreaticLevel.GetHashCode(); + hashCode = (hashCode * 397) ^ Cohesion.GetHashCode(); + hashCode = (hashCode * 397) ^ FrictionAngle.GetHashCode(); + hashCode = (hashCode * 397) ^ ShearStrengthRatio.GetHashCode(); + hashCode = (hashCode * 397) ^ StrengthIncreaseExponent.GetHashCode(); + hashCode = (hashCode * 397) ^ Pop.GetHashCode(); + return hashCode; + } + } + + private bool Equals(MacroStabilityInwardsSoilLayerData other) + { + return string.Equals(materialName, other.materialName, StringComparison.InvariantCulture) + && IsAquifer == other.IsAquifer + && Color.ToArgb().Equals(other.Color.ToArgb()) + && UsePop == other.UsePop + && ShearStrengthModel == other.ShearStrengthModel + && AbovePhreaticLevel.Equals(other.AbovePhreaticLevel) + && BelowPhreaticLevel.Equals(other.BelowPhreaticLevel) + && Cohesion.Equals(other.Cohesion) + && FrictionAngle.Equals(other.FrictionAngle) + && ShearStrengthRatio.Equals(other.ShearStrengthRatio) + && StrengthIncreaseExponent.Equals(other.StrengthIncreaseExponent) + && Pop.Equals(other.Pop); + } + } +} \ No newline at end of file Fisheye: Tag 69d647795daacbf48e17d0cf3a02a21865ab4ae6 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilLayerProperties.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilLayerUnderSurfaceLine.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilLayerUnderSurfaceLine.cs (.../MacroStabilityInwardsSoilLayerUnderSurfaceLine.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilLayerUnderSurfaceLine.cs (.../MacroStabilityInwardsSoilLayerUnderSurfaceLine.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -35,19 +35,19 @@ /// Creates a new instance of . /// /// The outer ring of the geometry of the soil layer. - /// The properties of the soil layer. + /// The data of the soil layer. /// Thrown when any parameter is null. - public MacroStabilityInwardsSoilLayerUnderSurfaceLine(Point2D[] outerRing, MacroStabilityInwardsSoilLayerProperties properties) - : this(outerRing, Enumerable.Empty(), properties) {} + public MacroStabilityInwardsSoilLayerUnderSurfaceLine(Point2D[] outerRing, MacroStabilityInwardsSoilLayerData data) + : this(outerRing, Enumerable.Empty(), data) {} /// /// Creates a new instance of . /// /// The outer ring of the geometry of the soil layer. /// The holes of the geometry of the soil layer. - /// The properties of the soil layer. + /// The data of the soil layer. /// Thrown when any parameter is null. - public MacroStabilityInwardsSoilLayerUnderSurfaceLine(Point2D[] outerRing, IEnumerable holes, MacroStabilityInwardsSoilLayerProperties properties) + public MacroStabilityInwardsSoilLayerUnderSurfaceLine(Point2D[] outerRing, IEnumerable holes, MacroStabilityInwardsSoilLayerData data) { if (outerRing == null) { @@ -57,13 +57,13 @@ { throw new ArgumentNullException(nameof(holes)); } - if (properties == null) + if (data == null) { - throw new ArgumentNullException(nameof(properties)); + throw new ArgumentNullException(nameof(data)); } OuterRing = outerRing; Holes = holes; - Properties = properties; + Data = data; } /// @@ -77,8 +77,8 @@ public IEnumerable Holes { get; } /// - /// Gets the properties of the soil layer. + /// Gets the data of the soil layer. /// - public MacroStabilityInwardsSoilLayerProperties Properties { get; } + public MacroStabilityInwardsSoilLayerData Data { get; } } } \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLineFactory.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLineFactory.cs (.../MacroStabilityInwardsSoilProfileUnderSurfaceLineFactory.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLineFactory.cs (.../MacroStabilityInwardsSoilProfileUnderSurfaceLineFactory.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -92,7 +92,7 @@ layer => new MacroStabilityInwardsSoilLayerUnderSurfaceLine( RingToPoints(layer.OuterRing), layer.Holes.Select(RingToPoints), - layer.Properties)).ToArray(); + layer.Data)).ToArray(); return new MacroStabilityInwardsSoilProfileUnderSurfaceLine(layersUnderSurfaceLine, soilProfile.PreconsolidationStresses); } @@ -112,7 +112,7 @@ { foreach (Point2D[] soilLayerArea in GetSoilLayerWithSurfaceLineIntersection(surfaceLineGeometryArray, layer.OuterLoop)) { - collection.Add(new MacroStabilityInwardsSoilLayerUnderSurfaceLine(soilLayerArea, layer.Properties)); + collection.Add(new MacroStabilityInwardsSoilLayerUnderSurfaceLine(soilLayerArea, layer.Data)); } } @@ -130,7 +130,7 @@ new Point2D(maxX, top), new Point2D(maxX, bottom), new Point2D(minX, bottom) - }, layer.Properties); + }, layer.Data); } private static IEnumerable GetSoilLayerWithSurfaceLineIntersection(IEnumerable surfaceLineGeometry, IEnumerable soilLayerGeometry) @@ -140,15 +140,15 @@ private class TempSoilLayerGeometry { - public TempSoilLayerGeometry(Point2D[] outerLoop, MacroStabilityInwardsSoilLayerProperties properties) + public TempSoilLayerGeometry(Point2D[] outerLoop, MacroStabilityInwardsSoilLayerData data) { OuterLoop = outerLoop; - Properties = properties; + Data = data; } public Point2D[] OuterLoop { get; } - public MacroStabilityInwardsSoilLayerProperties Properties { get; } + public MacroStabilityInwardsSoilLayerData Data { get; } } } } \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Factories/MacroStabilityInwardsChartDataFactory.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Factories/MacroStabilityInwardsChartDataFactory.cs (.../MacroStabilityInwardsChartDataFactory.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Factories/MacroStabilityInwardsChartDataFactory.cs (.../MacroStabilityInwardsChartDataFactory.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -183,10 +183,10 @@ MacroStabilityInwardsSoilLayer1D soilLayer = soilProfile.Layers.ElementAt(soilLayerIndex); - return new ChartMultipleAreaData($"{soilLayerIndex + 1} {soilLayer.Properties.MaterialName}", + return new ChartMultipleAreaData($"{soilLayerIndex + 1} {soilLayer.Data.MaterialName}", new ChartAreaStyle { - FillColor = soilLayer.Properties.Color, + FillColor = soilLayer.Data.Color, StrokeColor = Color.Black, StrokeThickness = 1 }); Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsSoilLayer1DProperties.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsSoilLayer1DProperties.cs (.../MacroStabilityInwardsSoilLayer1DProperties.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsSoilLayer1DProperties.cs (.../MacroStabilityInwardsSoilLayer1DProperties.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -61,7 +61,7 @@ { get { - return data.Properties.MaterialName; + return data.Data.MaterialName; } } @@ -85,13 +85,13 @@ { get { - return data.Properties.IsAquifer; + return data.Data.IsAquifer; } } public override string ToString() { - return data.Properties.MaterialName; + return data.Data.MaterialName; } } } \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsSoilLayer2DProperties.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsSoilLayer2DProperties.cs (.../MacroStabilityInwardsSoilLayer2DProperties.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsSoilLayer2DProperties.cs (.../MacroStabilityInwardsSoilLayer2DProperties.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -63,7 +63,7 @@ { get { - return data.Properties.MaterialName; + return data.Data.MaterialName; } } @@ -102,13 +102,13 @@ { get { - return data.Properties.IsAquifer; + return data.Data.IsAquifer; } } public override string ToString() { - return data.Properties.MaterialName; + return data.Data.MaterialName; } } } \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsSoilLayerTable.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsSoilLayerTable.cs (.../MacroStabilityInwardsSoilLayerTable.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsSoilLayerTable.cs (.../MacroStabilityInwardsSoilLayerTable.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -66,9 +66,9 @@ public FormattedMacroStabilityInwardsSoilLayerRow(MacroStabilityInwardsSoilLayer1D layer) { Top = new RoundedDouble(2, layer.Top); - MaterialName = layer.Properties.MaterialName; - Color = layer.Properties.Color; - IsAquifer = layer.Properties.IsAquifer; + MaterialName = layer.Data.MaterialName; + Color = layer.Data.Color; + IsAquifer = layer.Data.IsAquifer; } /// Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Properties/Resources.Designer.cs =================================================================== diff -u -r0ca80ea0128c50442c9ab707f715125d65cf7fa0 -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 0ca80ea0128c50442c9ab707f715125d65cf7fa0) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -353,81 +353,81 @@ /// /// Looks up a localized string similar to Onverzadigd gewicht. /// - public static string SoilLayerProperties_AbovePhreaticLevelDistribution_Description { + public static string SoilLayerData_AbovePhreaticLevelDistribution_Description { get { - return ResourceManager.GetString("SoilLayerProperties_AbovePhreaticLevelDistribution_Description", resourceCulture); + return ResourceManager.GetString("SoilLayerData_AbovePhreaticLevelDistribution_Description", resourceCulture); } } /// /// Looks up a localized string similar to Verzadigd gewicht. /// - public static string SoilLayerProperties_BelowPhreaticLevelDistribution_DisplayName { + public static string SoilLayerData_BelowPhreaticLevelDistribution_DisplayName { get { - return ResourceManager.GetString("SoilLayerProperties_BelowPhreaticLevelDistribution_DisplayName", resourceCulture); + return ResourceManager.GetString("SoilLayerData_BelowPhreaticLevelDistribution_DisplayName", resourceCulture); } } /// /// Looks up a localized string similar to Cohesie. /// - public static string SoilLayerProperties_CohesionDistribution_DisplayName { + public static string SoilLayerData_CohesionDistribution_DisplayName { get { - return ResourceManager.GetString("SoilLayerProperties_CohesionDistribution_DisplayName", resourceCulture); + return ResourceManager.GetString("SoilLayerData_CohesionDistribution_DisplayName", resourceCulture); } } /// /// Looks up a localized string similar to Wrijvingshoek. /// - public static string SoilLayerProperties_FrictionAngleDistribution_DisplayName { + public static string SoilLayerData_FrictionAngleDistribution_DisplayName { get { - return ResourceManager.GetString("SoilLayerProperties_FrictionAngleDistribution_DisplayName", resourceCulture); + return ResourceManager.GetString("SoilLayerData_FrictionAngleDistribution_DisplayName", resourceCulture); } } /// /// Looks up a localized string similar to POP. /// - public static string SoilLayerProperties_PopDistribution_DisplayName { + public static string SoilLayerData_PopDistribution_DisplayName { get { - return ResourceManager.GetString("SoilLayerProperties_PopDistribution_DisplayName", resourceCulture); + return ResourceManager.GetString("SoilLayerData_PopDistribution_DisplayName", resourceCulture); } } /// /// Looks up a localized string similar to Schuifsterkte model. /// - public static string SoilLayerProperties_ShearStrengthModel_Description { + public static string SoilLayerData_ShearStrengthModel_Description { get { - return ResourceManager.GetString("SoilLayerProperties_ShearStrengthModel_Description", resourceCulture); + return ResourceManager.GetString("SoilLayerData_ShearStrengthModel_Description", resourceCulture); } } /// /// Looks up a localized string similar to Schuifsterkte ratio S. /// - public static string SoilLayerProperties_ShearStrengthRatioDistribution_DisplayName { + public static string SoilLayerData_ShearStrengthRatioDistribution_DisplayName { get { - return ResourceManager.GetString("SoilLayerProperties_ShearStrengthRatioDistribution_DisplayName", resourceCulture); + return ResourceManager.GetString("SoilLayerData_ShearStrengthRatioDistribution_DisplayName", resourceCulture); } } /// /// Looks up a localized string similar to Sterkte toename exponent. /// - public static string SoilLayerProperties_StrengthIncreaseExponentDistribution_DisplayName { + public static string SoilLayerData_StrengthIncreaseExponentDistribution_DisplayName { get { - return ResourceManager.GetString("SoilLayerProperties_StrengthIncreaseExponentDistribution_DisplayName", resourceCulture); + return ResourceManager.GetString("SoilLayerData_StrengthIncreaseExponentDistribution_DisplayName", resourceCulture); } } /// /// Looks up a localized string similar to Gebruik POP. /// - public static string SoilLayerProperties_UsePop_Description { + public static string SoilLayerData_UsePop_Description { get { - return ResourceManager.GetString("SoilLayerProperties_UsePop_Description", resourceCulture); + return ResourceManager.GetString("SoilLayerData_UsePop_Description", resourceCulture); } } Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Properties/Resources.resx =================================================================== diff -u -r3fe99efe7580ec1d9eb850908c001c990dc43fe5 -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Properties/Resources.resx (.../Resources.resx) (revision 3fe99efe7580ec1d9eb850908c001c990dc43fe5) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Properties/Resources.resx (.../Resources.resx) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -240,31 +240,31 @@ Karakteristiek punt '{0}' is niet gedefiniëerd. - + Onverzadigd gewicht - + Cohesie - + Wrijvingshoek - + POP - + Schuifsterkte ratio S - + Sterkte toename exponent - + Verzadigd gewicht - + Gebruik POP - + Schuifsterkte model Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/SoilProfiles/MacroStabilityInwardsSoilLayerTransformer.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/SoilProfiles/MacroStabilityInwardsSoilLayerTransformer.cs (.../MacroStabilityInwardsSoilLayerTransformer.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/SoilProfiles/MacroStabilityInwardsSoilLayerTransformer.cs (.../MacroStabilityInwardsSoilLayerTransformer.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -62,7 +62,7 @@ ValidateStochasticParameters(soilLayer); var layer = new MacroStabilityInwardsSoilLayer1D(soilLayer.Top); - SetProperties(soilLayer, layer.Properties); + SetProperties(soilLayer, layer.Data); return layer; } @@ -95,59 +95,59 @@ Ring[] innerRings = soilLayer.InnerLoops.Select(TransformSegmentToRing).ToArray(); var layer = new MacroStabilityInwardsSoilLayer2D(outerRing, innerRings); - SetProperties(soilLayer, layer.Properties); + SetProperties(soilLayer, layer.Data); return layer; } /// - /// Sets the properties of the . + /// Sets the properties of the . /// - /// The soil layer to get the properties from. - /// The properties to set the data upon. + /// The soil layer to get the data from. + /// The data to set the data upon. /// Thrown when transformation would not result /// in a valid transformed instance. - private static void SetProperties(SoilLayerBase soilLayer, MacroStabilityInwardsSoilLayerProperties properties) + private static void SetProperties(SoilLayerBase soilLayer, MacroStabilityInwardsSoilLayerData data) { - properties.ShearStrengthModel = TransformShearStrengthModel(soilLayer.ShearStrengthModel); - properties.UsePop = TransformUsePop(soilLayer.UsePop); + data.ShearStrengthModel = TransformShearStrengthModel(soilLayer.ShearStrengthModel); + data.UsePop = TransformUsePop(soilLayer.UsePop); - properties.MaterialName = soilLayer.MaterialName; - properties.IsAquifer = TransformIsAquifer(soilLayer.IsAquifer); - properties.Color = SoilLayerColorConverter.Convert(soilLayer.Color); - properties.AbovePhreaticLevel = new VariationCoefficientLogNormalDistribution + data.MaterialName = soilLayer.MaterialName; + data.IsAquifer = TransformIsAquifer(soilLayer.IsAquifer); + data.Color = SoilLayerColorConverter.Convert(soilLayer.Color); + data.AbovePhreaticLevel = new VariationCoefficientLogNormalDistribution { Mean = (RoundedDouble) soilLayer.AbovePhreaticLevelMean, CoefficientOfVariation = (RoundedDouble) soilLayer.AbovePhreaticLevelCoefficientOfVariation, Shift = (RoundedDouble) soilLayer.AbovePhreaticLevelShift }; - properties.BelowPhreaticLevel = new VariationCoefficientLogNormalDistribution + data.BelowPhreaticLevel = new VariationCoefficientLogNormalDistribution { Mean = (RoundedDouble) soilLayer.BelowPhreaticLevelMean, CoefficientOfVariation = (RoundedDouble) soilLayer.BelowPhreaticLevelCoefficientOfVariation, Shift = (RoundedDouble) soilLayer.BelowPhreaticLevelShift }; - properties.Cohesion = new VariationCoefficientLogNormalDistribution + data.Cohesion = new VariationCoefficientLogNormalDistribution { Mean = (RoundedDouble) soilLayer.CohesionMean, CoefficientOfVariation = (RoundedDouble) soilLayer.CohesionCoefficientOfVariation }; - properties.FrictionAngle = new VariationCoefficientLogNormalDistribution + data.FrictionAngle = new VariationCoefficientLogNormalDistribution { Mean = (RoundedDouble) soilLayer.FrictionAngleMean, CoefficientOfVariation = (RoundedDouble) soilLayer.FrictionAngleCoefficientOfVariation }; - properties.ShearStrengthRatio = new VariationCoefficientLogNormalDistribution + data.ShearStrengthRatio = new VariationCoefficientLogNormalDistribution { Mean = (RoundedDouble) soilLayer.ShearStrengthRatioMean, CoefficientOfVariation = (RoundedDouble) soilLayer.ShearStrengthRatioCoefficientOfVariation }; - properties.StrengthIncreaseExponent = new VariationCoefficientLogNormalDistribution + data.StrengthIncreaseExponent = new VariationCoefficientLogNormalDistribution { Mean = (RoundedDouble) soilLayer.StrengthIncreaseExponentMean, CoefficientOfVariation = (RoundedDouble) soilLayer.StrengthIncreaseExponentCoefficientOfVariation }; - properties.Pop = new VariationCoefficientLogNormalDistribution + data.Pop = new VariationCoefficientLogNormalDistribution { Mean = (RoundedDouble) soilLayer.PopMean, CoefficientOfVariation = (RoundedDouble) soilLayer.PopCoefficientOfVariation @@ -171,7 +171,7 @@ catch (NotSupportedException) { throw new ImportedDataTransformException(string.Format(RingtoetsCommonIOResources.Transform_Invalid_value_ParameterName_0, - RingtoetsCommonIOResources.SoilLayerProperties_IsAquifer_DisplayName)); + RingtoetsCommonIOResources.SoilLayerData_IsAquifer_DisplayName)); } } @@ -196,7 +196,7 @@ } throw new ImportedDataTransformException(string.Format(RingtoetsCommonIOResources.Transform_Invalid_value_ParameterName_0, - Resources.SoilLayerProperties_UsePop_Description)); + Resources.SoilLayerData_UsePop_Description)); } /// @@ -228,7 +228,7 @@ } throw new ImportedDataTransformException(string.Format(RingtoetsCommonIOResources.Transform_Invalid_value_ParameterName_0, - Resources.SoilLayerProperties_ShearStrengthModel_Description)); + Resources.SoilLayerData_ShearStrengthModel_Description)); } /// @@ -269,36 +269,36 @@ private static void ValidateStochasticParameters(SoilLayerBase soilLayer) { DistributionHelper.ValidateIsLogNormal(soilLayer.AbovePhreaticLevelDistributionType, - Resources.SoilLayerProperties_AbovePhreaticLevelDistribution_Description); + Resources.SoilLayerData_AbovePhreaticLevelDistribution_Description); DistributionHelper.ValidateIsLogNormal( soilLayer.BelowPhreaticLevelDistributionType, - Resources.SoilLayerProperties_BelowPhreaticLevelDistribution_DisplayName); + Resources.SoilLayerData_BelowPhreaticLevelDistribution_DisplayName); DistributionHelper.ValidateIsNonShiftedLogNormal( soilLayer.CohesionDistributionType, soilLayer.CohesionShift, - Resources.SoilLayerProperties_CohesionDistribution_DisplayName); + Resources.SoilLayerData_CohesionDistribution_DisplayName); DistributionHelper.ValidateIsNonShiftedLogNormal( soilLayer.FrictionAngleDistributionType, soilLayer.FrictionAngleShift, - Resources.SoilLayerProperties_FrictionAngleDistribution_DisplayName); + Resources.SoilLayerData_FrictionAngleDistribution_DisplayName); DistributionHelper.ValidateIsNonShiftedLogNormal( soilLayer.ShearStrengthRatioDistributionType, soilLayer.ShearStrengthRatioShift, - Resources.SoilLayerProperties_ShearStrengthRatioDistribution_DisplayName); + Resources.SoilLayerData_ShearStrengthRatioDistribution_DisplayName); DistributionHelper.ValidateIsNonShiftedLogNormal( soilLayer.StrengthIncreaseExponentDistributionType, soilLayer.StrengthIncreaseExponentShift, - Resources.SoilLayerProperties_StrengthIncreaseExponentDistribution_DisplayName); + Resources.SoilLayerData_StrengthIncreaseExponentDistribution_DisplayName); DistributionHelper.ValidateIsNonShiftedLogNormal( soilLayer.PopDistributionType, soilLayer.PopShift, - Resources.SoilLayerProperties_PopDistribution_DisplayName); + Resources.SoilLayerData_PopDistribution_DisplayName); } } } \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/Converters/UpliftVanSoilProfileConverter.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/Converters/UpliftVanSoilProfileConverter.cs (.../UpliftVanSoilProfileConverter.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/Converters/UpliftVanSoilProfileConverter.cs (.../UpliftVanSoilProfileConverter.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -46,10 +46,10 @@ /// Thrown when /// is null. /// Thrown when - /// + /// /// is an invalid value. /// Thrown when - /// + /// /// is a valid value but unsupported. public static UpliftVanSoilProfile Convert(MacroStabilityInwardsSoilProfileUnderSurfaceLine soilProfile) { @@ -65,35 +65,35 @@ } /// - /// Converts + /// Converts /// into . /// /// The layers to convert. /// The converted . /// Thrown when - /// + /// /// is an invalid value. /// Thrown when - /// + /// /// is a valid value but unsupported. private static IEnumerable ConvertLayers(IEnumerable layers) { return layers.Select(l => { - MacroStabilityInwardsSoilLayerProperties properties = l.Properties; + MacroStabilityInwardsSoilLayerData data = l.Data; return new UpliftVanSoilLayer(l.OuterRing, l.Holes, new UpliftVanSoilLayer.ConstructionProperties { - MaterialName = properties.MaterialName, - UsePop = properties.UsePop, - IsAquifer = properties.IsAquifer, - ShearStrengthModel = ConvertShearStrengthModel(properties.ShearStrengthModel), - AbovePhreaticLevel = MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetAbovePhreaticLevel(properties).GetDesignValue(), - BelowPhreaticLevel = MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetBelowPhreaticLevel(properties).GetDesignValue(), - Cohesion = MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetCohesion(properties).GetDesignValue(), - FrictionAngle = MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetFrictionAngle(properties).GetDesignValue(), - ShearStrengthRatio = MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetShearStrengthRatio(properties).GetDesignValue(), - StrengthIncreaseExponent = MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetStrengthIncreaseExponent(properties).GetDesignValue(), - Pop = MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetPop(properties).GetDesignValue() + MaterialName = data.MaterialName, + UsePop = data.UsePop, + IsAquifer = data.IsAquifer, + ShearStrengthModel = ConvertShearStrengthModel(data.ShearStrengthModel), + AbovePhreaticLevel = MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetAbovePhreaticLevel(data).GetDesignValue(), + BelowPhreaticLevel = MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetBelowPhreaticLevel(data).GetDesignValue(), + Cohesion = MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetCohesion(data).GetDesignValue(), + FrictionAngle = MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetFrictionAngle(data).GetDesignValue(), + ShearStrengthRatio = MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetShearStrengthRatio(data).GetDesignValue(), + StrengthIncreaseExponent = MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetStrengthIncreaseExponent(data).GetDesignValue(), + Pop = MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetPop(data).GetDesignValue() }); }).ToArray(); } Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsSemiProbabilisticDesignVariableFactoryTest.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsSemiProbabilisticDesignVariableFactoryTest.cs (.../MacroStabilityInwardsSemiProbabilisticDesignVariableFactoryTest.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsSemiProbabilisticDesignVariableFactoryTest.cs (.../MacroStabilityInwardsSemiProbabilisticDesignVariableFactoryTest.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -44,10 +44,10 @@ } [Test] - public void GetAbovePhreaticLevel_ValidSoilLayerProperties_CreateDesignVariableForAbovePhreaticLevel() + public void GetAbovePhreaticLevel_ValidSoilLayerData_CreateDesignVariableForAbovePhreaticLevel() { // Setup - var properties = new MacroStabilityInwardsSoilLayerProperties + var properties = new MacroStabilityInwardsSoilLayerData { AbovePhreaticLevel = { @@ -66,10 +66,10 @@ } [Test] - public void GetBelowPhreaticLevel_ValidSoilLayerProperties_CreateDesignVariableForBelowPhreaticLevel() + public void GetBelowPhreaticLevel_ValidSoilLayerData_CreateDesignVariableForBelowPhreaticLevel() { // Setup - var properties = new MacroStabilityInwardsSoilLayerProperties + var properties = new MacroStabilityInwardsSoilLayerData { BelowPhreaticLevel = { @@ -89,10 +89,10 @@ } [Test] - public void GetCohesion_ValidSoilLayerProperties_CreateDesignVariableForCohesion() + public void GetCohesion_ValidSoilLayerData_CreateDesignVariableForCohesion() { // Setup - var properties = new MacroStabilityInwardsSoilLayerProperties + var properties = new MacroStabilityInwardsSoilLayerData { Cohesion = { @@ -111,10 +111,10 @@ } [Test] - public void GetFrictionAngle_ValidSoilLayerProperties_CreateDesignVariableForFrictionAngle() + public void GetFrictionAngle_ValidSoilLayerData_CreateDesignVariableForFrictionAngle() { // Setup - var properties = new MacroStabilityInwardsSoilLayerProperties + var properties = new MacroStabilityInwardsSoilLayerData { FrictionAngle = { @@ -133,10 +133,10 @@ } [Test] - public void GetShearStrengthRatio_ValidSoilLayerProperties_CreateDesignVariableForShearStrengthRatio() + public void GetShearStrengthRatio_ValidSoilLayerData_CreateDesignVariableForShearStrengthRatio() { // Setup - var properties = new MacroStabilityInwardsSoilLayerProperties + var properties = new MacroStabilityInwardsSoilLayerData { ShearStrengthRatio = { @@ -155,10 +155,10 @@ } [Test] - public void GetStrengthIncreaseExponent_ValidSoilLayerProperties_CreateDesignVariableForStrengthIncreaseExponent() + public void GetStrengthIncreaseExponent_ValidSoilLayerData_CreateDesignVariableForStrengthIncreaseExponent() { // Setup - var properties = new MacroStabilityInwardsSoilLayerProperties + var properties = new MacroStabilityInwardsSoilLayerData { StrengthIncreaseExponent = { @@ -177,10 +177,10 @@ } [Test] - public void GetPop_ValidSoilLayerProperties_CreateDesignVariableForPop() + public void GetPop_ValidSoilLayerData_CreateDesignVariableForPop() { // Setup - var properties = new MacroStabilityInwardsSoilLayerProperties + var properties = new MacroStabilityInwardsSoilLayerData { Pop = { Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/Ringtoets.MacroStabilityInwards.Data.Test.csproj =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/Ringtoets.MacroStabilityInwards.Data.Test.csproj (.../Ringtoets.MacroStabilityInwards.Data.Test.csproj) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/Ringtoets.MacroStabilityInwards.Data.Test.csproj (.../Ringtoets.MacroStabilityInwards.Data.Test.csproj) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -81,7 +81,7 @@ - + Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilLayer1DTest.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilLayer1DTest.cs (.../MacroStabilityInwardsSoilLayer1DTest.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilLayer1DTest.cs (.../MacroStabilityInwardsSoilLayer1DTest.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -41,7 +41,7 @@ // Assert Assert.NotNull(layer); - Assert.NotNull(layer.Properties); + Assert.NotNull(layer.Data); Assert.AreEqual(top, layer.Top); } @@ -111,21 +111,21 @@ var layerE = new MacroStabilityInwardsSoilLayer1D(3) { - Properties = + Data = { Color = Color.Blue } }; var layerF = new MacroStabilityInwardsSoilLayer1D(4) { - Properties = + Data = { Color = Color.Blue } }; var layerG = new MacroStabilityInwardsSoilLayer1D(3) { - Properties = + Data = { Color = Color.Gold } @@ -177,7 +177,7 @@ var random = new Random(randomSeed); return new MacroStabilityInwardsSoilLayer1D(random.NextDouble()) { - Properties = + Data = { Color = Color.FromKnownColor(random.NextEnumValue()) } Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilLayer2DTest.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilLayer2DTest.cs (.../MacroStabilityInwardsSoilLayer2DTest.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilLayer2DTest.cs (.../MacroStabilityInwardsSoilLayer2DTest.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -90,7 +90,7 @@ Assert.AreSame(outerRing, layer.OuterRing); Assert.AreNotSame(holes, layer.Holes); TestHelper.AssertCollectionsAreEqual(holes, layer.Holes, new ReferenceEqualityComparer()); - Assert.NotNull(layer.Properties); + Assert.NotNull(layer.Data); } [Test] @@ -162,7 +162,7 @@ CreateRandomRing(new Random(22)) }) { - Properties = + Data = { Color = Color.Blue } @@ -174,7 +174,7 @@ CreateRandomRing(new Random(22)) }) { - Properties = + Data = { Color = Color.Blue } @@ -186,7 +186,7 @@ CreateRandomRing(new Random(32)) }) { - Properties = + Data = { Color = Color.Blue } @@ -198,7 +198,7 @@ CreateRandomRing(new Random(22)) }) { - Properties = + Data = { Color = Color.Gold } @@ -257,7 +257,7 @@ CreateRandomRing(random) }) { - Properties = + Data = { Color = Color.FromKnownColor(random.NextEnumValue()) } Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilLayerDataTest.cs =================================================================== diff -u --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilLayerDataTest.cs (revision 0) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilLayerDataTest.cs (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -0,0 +1,311 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using Core.Common.Base.Data; +using Core.Common.TestUtil; +using NUnit.Framework; +using Ringtoets.Common.Data.Probabilistics; +using Ringtoets.Common.Data.TestUtil; +using Ringtoets.MacroStabilityInwards.Data.SoilProfile; + +namespace Ringtoets.MacroStabilityInwards.Data.Test.SoilProfile +{ + [TestFixture] + public class MacroStabilityInwardsSoilLayerDataTest + { + [Test] + public void DefaultConstructor_DefaultValuesSet() + { + // Call + var properties = new MacroStabilityInwardsSoilLayerData(); + + // Assert + Assert.IsFalse(properties.IsAquifer); + Assert.IsEmpty(properties.MaterialName); + Assert.AreEqual(Color.Empty, properties.Color); + + Assert.IsFalse(properties.UsePop); + Assert.AreEqual(MacroStabilityInwardsShearStrengthModel.CPhi, properties.ShearStrengthModel); + + DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) + { + Mean = RoundedDouble.NaN, + CoefficientOfVariation = RoundedDouble.NaN, + Shift = RoundedDouble.NaN + }, properties.AbovePhreaticLevel); + + DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) + { + Mean = RoundedDouble.NaN, + CoefficientOfVariation = RoundedDouble.NaN, + Shift = RoundedDouble.NaN + }, properties.BelowPhreaticLevel); + + DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) + { + Mean = RoundedDouble.NaN, + CoefficientOfVariation = RoundedDouble.NaN, + }, properties.Cohesion); + + DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) + { + Mean = RoundedDouble.NaN, + CoefficientOfVariation = RoundedDouble.NaN, + }, properties.FrictionAngle); + + DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) + { + Mean = RoundedDouble.NaN, + CoefficientOfVariation = RoundedDouble.NaN, + }, properties.ShearStrengthRatio); + + DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) + { + Mean = RoundedDouble.NaN, + CoefficientOfVariation = RoundedDouble.NaN, + }, properties.StrengthIncreaseExponent); + + DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) + { + Mean = RoundedDouble.NaN, + CoefficientOfVariation = RoundedDouble.NaN, + }, properties.Pop); + } + + [Test] + public void MaterialName_Null_ThrowsArgumentNullException() + { + // Setup + var layer = new MacroStabilityInwardsSoilLayerData(); + + // Call + TestDelegate test = () => layer.MaterialName = null; + + // Assert + string paramName = Assert.Throws(test).ParamName; + Assert.AreEqual("value", paramName); + } + + [Test] + [TestCase("")] + [TestCase("A name")] + public void MaterialName_NotNullValue_ValueSet(string materialName) + { + // Setup + var layer = new MacroStabilityInwardsSoilLayerData(); + + // Call + layer.MaterialName = materialName; + + // Assert + Assert.AreEqual(materialName, layer.MaterialName); + } + + [Test] + public void GetHashCode_EqualProperties_AreEqual() + { + // Setup + MacroStabilityInwardsSoilLayerData dataA = CreateRandomProperties(21); + MacroStabilityInwardsSoilLayerData dataB = CreateRandomProperties(21); + + // Precondition + Assert.AreEqual(dataA, dataB); + Assert.AreEqual(dataB, dataA); + + // Call & Assert + Assert.AreEqual(dataA.GetHashCode(), dataB.GetHashCode()); + Assert.AreEqual(dataB.GetHashCode(), dataA.GetHashCode()); + } + + [Test] + public void Equals_DifferentType_ReturnsFalse() + { + // Setup + MacroStabilityInwardsSoilLayerData layer = CreateRandomProperties(21); + + // Call + bool areEqual = layer.Equals(new object()); + + // Assert + Assert.IsFalse(areEqual); + } + + [Test] + public void Equals_Null_ReturnsFalse() + { + // Setup + MacroStabilityInwardsSoilLayerData layer = CreateRandomProperties(21); + + // Call + bool areEqual = layer.Equals(null); + + // Assert + Assert.IsFalse(areEqual); + } + + [Test] + [TestCaseSource(nameof(ChangeSingleProperties))] + public void Equals_ChangeSingleProperty_ReturnsFalse(Action changeProperty) + { + // Setup + MacroStabilityInwardsSoilLayerData layer = CreateRandomProperties(21); + MacroStabilityInwardsSoilLayerData layerToChange = CreateRandomProperties(21); + + changeProperty(layerToChange); + + // Call + bool areEqualOne = layer.Equals(layerToChange); + bool areEqualTwo = layerToChange.Equals(layer); + + // Assert + Assert.IsFalse(areEqualOne); + Assert.IsFalse(areEqualTwo); + } + + [Test] + [TestCaseSource(nameof(PropertiesCombinations))] + public void Equals_DifferentScenarios_ReturnsExpectedResult(MacroStabilityInwardsSoilLayerData layer, MacroStabilityInwardsSoilLayerData otherLayer, bool expectedEqual) + { + // Call + bool areEqualOne = layer.Equals(otherLayer); + bool areEqualTwo = otherLayer.Equals(layer); + + // Assert + Assert.AreEqual(expectedEqual, areEqualOne); + Assert.AreEqual(expectedEqual, areEqualTwo); + } + + private static IEnumerable ChangeSingleProperties() + { + yield return new TestCaseData(new Action(lp => lp.ShearStrengthModel = (MacroStabilityInwardsShearStrengthModel) 9)); + yield return new TestCaseData(new Action(lp => lp.MaterialName = "interesting")); + yield return new TestCaseData(new Action(lp => lp.IsAquifer = !lp.IsAquifer)); + yield return new TestCaseData(new Action(lp => lp.UsePop = !lp.UsePop)); + yield return new TestCaseData(new Action(lp => lp.Color = lp.Color.ToArgb().Equals(Color.Aqua.ToArgb()) ? Color.Bisque : Color.Aqua)); + yield return new TestCaseData(new Action(lp => lp.AbovePhreaticLevel.Mean = (RoundedDouble) (11.0 - lp.AbovePhreaticLevel.Mean))); + yield return new TestCaseData(new Action(lp => lp.AbovePhreaticLevel.CoefficientOfVariation = (RoundedDouble) (1.0 - lp.AbovePhreaticLevel.CoefficientOfVariation))); + yield return new TestCaseData(new Action(lp => lp.AbovePhreaticLevel.Shift = (RoundedDouble) (1.0 - lp.AbovePhreaticLevel.Shift))); + yield return new TestCaseData(new Action(lp => lp.BelowPhreaticLevel.Mean = (RoundedDouble) (12.0 - lp.BelowPhreaticLevel.Mean))); + yield return new TestCaseData(new Action(lp => lp.BelowPhreaticLevel.CoefficientOfVariation = (RoundedDouble) (1.0 - lp.BelowPhreaticLevel.CoefficientOfVariation))); + yield return new TestCaseData(new Action(lp => lp.BelowPhreaticLevel.Shift = (RoundedDouble) (1.0 - lp.BelowPhreaticLevel.Shift))); + yield return new TestCaseData(new Action(lp => lp.Cohesion.Mean = (RoundedDouble) (11.0 - lp.Cohesion.Mean))); + yield return new TestCaseData(new Action(lp => lp.Cohesion.CoefficientOfVariation = (RoundedDouble) (1.0 - lp.Cohesion.CoefficientOfVariation))); + yield return new TestCaseData(new Action(lp => lp.FrictionAngle.Mean = (RoundedDouble) (11.0 - lp.FrictionAngle.Mean))); + yield return new TestCaseData(new Action(lp => lp.FrictionAngle.CoefficientOfVariation = (RoundedDouble) (1.0 - lp.FrictionAngle.CoefficientOfVariation))); + yield return new TestCaseData(new Action(lp => lp.ShearStrengthRatio.Mean = (RoundedDouble) (11.0 - lp.ShearStrengthRatio.Mean))); + yield return new TestCaseData(new Action(lp => lp.ShearStrengthRatio.CoefficientOfVariation = (RoundedDouble) (1.0 - lp.ShearStrengthRatio.CoefficientOfVariation))); + yield return new TestCaseData(new Action(lp => lp.StrengthIncreaseExponent.Mean = (RoundedDouble) (11.0 - lp.StrengthIncreaseExponent.Mean))); + yield return new TestCaseData(new Action(lp => lp.StrengthIncreaseExponent.CoefficientOfVariation = (RoundedDouble) (1.0 - lp.StrengthIncreaseExponent.CoefficientOfVariation))); + yield return new TestCaseData(new Action(lp => lp.Pop.Mean = (RoundedDouble) (11.0 - lp.Pop.Mean))); + yield return new TestCaseData(new Action(lp => lp.Pop.CoefficientOfVariation = (RoundedDouble) (1.0 - lp.Pop.CoefficientOfVariation))); + } + + private static TestCaseData[] PropertiesCombinations() + { + MacroStabilityInwardsSoilLayerData dataA = CreateRandomProperties(21); + MacroStabilityInwardsSoilLayerData dataB = CreateRandomProperties(21); + MacroStabilityInwardsSoilLayerData dataC = CreateRandomProperties(73); + MacroStabilityInwardsSoilLayerData dataD = CreateRandomProperties(21); + + return new[] + { + new TestCaseData(dataA, dataA, true) + { + TestName = "Equals_LayerALayerA_True" + }, + new TestCaseData(dataA, dataB, true) + { + TestName = "Equals_LayerALayerB_True" + }, + new TestCaseData(dataB, dataD, true) + { + TestName = "Equals_LayerBLayerD_True" + }, + new TestCaseData(dataA, dataD, true) + { + TestName = "Equals_LayerALayerD_True" + }, + new TestCaseData(dataB, dataC, false) + { + TestName = "Equals_LayerBLayerC_False" + }, + new TestCaseData(dataA, dataC, false) + { + TestName = "Equals_LayerALayerC_False" + } + }; + } + + private static MacroStabilityInwardsSoilLayerData CreateRandomProperties(int randomSeed) + { + var random = new Random(randomSeed); + return new MacroStabilityInwardsSoilLayerData + { + MaterialName = string.Join("", Enumerable.Repeat('x', random.Next(0, 40))), + Color = Color.FromKnownColor(random.NextEnumValue()), + IsAquifer = random.NextBoolean(), + UsePop = random.NextBoolean(), + ShearStrengthModel = random.NextEnumValue(), + AbovePhreaticLevel = new VariationCoefficientLogNormalDistribution + { + Mean = (RoundedDouble) 10, + CoefficientOfVariation = (RoundedDouble) 0.2, + Shift = (RoundedDouble) 1 + }, + BelowPhreaticLevel = new VariationCoefficientLogNormalDistribution + { + Mean = (RoundedDouble) 11, + CoefficientOfVariation = (RoundedDouble) 0.6, + Shift = (RoundedDouble) 3 + }, + Cohesion = new VariationCoefficientLogNormalDistribution + { + Mean = (RoundedDouble) 10, + CoefficientOfVariation = (RoundedDouble) 0.2 + }, + FrictionAngle = new VariationCoefficientLogNormalDistribution + { + Mean = (RoundedDouble) 10, + CoefficientOfVariation = (RoundedDouble) 0.2 + }, + ShearStrengthRatio = new VariationCoefficientLogNormalDistribution + { + Mean = (RoundedDouble) 10, + CoefficientOfVariation = (RoundedDouble) 0.2 + }, + StrengthIncreaseExponent = new VariationCoefficientLogNormalDistribution + { + Mean = (RoundedDouble) 10, + CoefficientOfVariation = (RoundedDouble) 0.2 + }, + Pop = new VariationCoefficientLogNormalDistribution + { + Mean = (RoundedDouble) 10, + CoefficientOfVariation = (RoundedDouble) 0.2 + } + }; + } + } +} \ No newline at end of file Fisheye: Tag 69d647795daacbf48e17d0cf3a02a21865ab4ae6 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilLayerPropertiesTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilLayerUnderSurfaceLineTest.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilLayerUnderSurfaceLineTest.cs (.../MacroStabilityInwardsSoilLayerUnderSurfaceLineTest.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilLayerUnderSurfaceLineTest.cs (.../MacroStabilityInwardsSoilLayerUnderSurfaceLineTest.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -37,7 +37,7 @@ // Call TestDelegate test = () => new MacroStabilityInwardsSoilLayerUnderSurfaceLine( null, Enumerable.Empty(), - new MacroStabilityInwardsSoilLayerProperties()); + new MacroStabilityInwardsSoilLayerData()); // Assert var exception = Assert.Throws(test); @@ -49,7 +49,7 @@ { // Call TestDelegate test = () => new MacroStabilityInwardsSoilLayerUnderSurfaceLine( - new Point2D[0], null, new MacroStabilityInwardsSoilLayerProperties()); + new Point2D[0], null, new MacroStabilityInwardsSoilLayerData()); // Assert var exception = Assert.Throws(test); @@ -64,15 +64,15 @@ // Assert var exception = Assert.Throws(test); - Assert.AreEqual("properties", exception.ParamName); + Assert.AreEqual("data", exception.ParamName); } [Test] public void Constructor_WithoutOuterRingWithProperties_ThrowsArgumentNullException() { // Call TestDelegate test = () => new MacroStabilityInwardsSoilLayerUnderSurfaceLine( - null, new MacroStabilityInwardsSoilLayerProperties()); + null, new MacroStabilityInwardsSoilLayerData()); // Assert var exception = Assert.Throws(test); @@ -87,7 +87,7 @@ // Assert var exception = Assert.Throws(test); - Assert.AreEqual("properties", exception.ParamName); + Assert.AreEqual("data", exception.ParamName); } [Test] @@ -96,31 +96,31 @@ // Call var outerRing = new Point2D[0]; IEnumerable holes = Enumerable.Empty(); - var properties = new MacroStabilityInwardsSoilLayerProperties(); + var properties = new MacroStabilityInwardsSoilLayerData(); // Setup var layer = new MacroStabilityInwardsSoilLayerUnderSurfaceLine(outerRing, holes, properties); // Assert Assert.AreSame(outerRing, layer.OuterRing); Assert.AreSame(holes, layer.Holes); - Assert.AreSame(properties, layer.Properties); + Assert.AreSame(properties, layer.Data); } [Test] public void Constructor_WithOuterRingAndProperties_NewInstanceWithPropertiesSet() { // Call var outerRing = new Point2D[0]; - var properties = new MacroStabilityInwardsSoilLayerProperties(); + var properties = new MacroStabilityInwardsSoilLayerData(); // Setup var layer = new MacroStabilityInwardsSoilLayerUnderSurfaceLine(outerRing, properties); // Assert Assert.AreSame(outerRing, layer.OuterRing); Assert.IsEmpty(layer.Holes); - Assert.AreSame(properties, layer.Properties); + Assert.AreSame(properties, layer.Data); } } } \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilProfile1DTest.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilProfile1DTest.cs (.../MacroStabilityInwardsSoilProfile1DTest.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilProfile1DTest.cs (.../MacroStabilityInwardsSoilProfile1DTest.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -101,7 +101,7 @@ { equivalentLayers.Add(new MacroStabilityInwardsSoilLayer1D(random.NextDouble()) { - Properties = + Data = { IsAquifer = i == 0 } @@ -321,7 +321,7 @@ { return new MacroStabilityInwardsSoilLayer1D(random.NextDouble()) { - Properties = + Data = { MaterialName = GetRandomName(random), Color = Color.FromKnownColor(random.NextEnumValue()), Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilProfile2DTest.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilProfile2DTest.cs (.../MacroStabilityInwardsSoilProfile2DTest.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilProfile2DTest.cs (.../MacroStabilityInwardsSoilProfile2DTest.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -314,7 +314,7 @@ CreateRandomRing(random.Next()) }) { - Properties = + Data = { Color = Color.FromKnownColor(random.NextEnumValue()) } @@ -328,9 +328,9 @@ soilLayer.Holes[0] }) { - Properties = + Data = { - Color = soilLayer.Properties.Color + Color = soilLayer.Data.Color } }; } Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLineFactoryTest.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLineFactoryTest.cs (.../MacroStabilityInwardsSoilProfileUnderSurfaceLineFactoryTest.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLineFactoryTest.cs (.../MacroStabilityInwardsSoilProfileUnderSurfaceLineFactoryTest.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -360,7 +360,7 @@ var layer = new MacroStabilityInwardsSoilLayer1D(1) { - Properties = + Data = { UsePop = usePop, IsAquifer = isAquifer, @@ -416,7 +416,7 @@ profile, surfaceLine); // Assert - Assert.AreSame(layer.Properties, profileUnderSurfaceLine.Layers.First().Properties); + Assert.AreSame(layer.Data, profileUnderSurfaceLine.Layers.First().Data); } [Test] @@ -516,44 +516,44 @@ double popCoefficientOfVariation = random.NextDouble(); MacroStabilityInwardsSoilLayer2D layer = GetSoilLayer(); - layer.Properties.UsePop = usePop; - layer.Properties.IsAquifer = isAquifer; - layer.Properties.ShearStrengthModel = shearStrengthModel; - layer.Properties.MaterialName = material; + layer.Data.UsePop = usePop; + layer.Data.IsAquifer = isAquifer; + layer.Data.ShearStrengthModel = shearStrengthModel; + layer.Data.MaterialName = material; - layer.Properties.AbovePhreaticLevel = new VariationCoefficientLogNormalDistribution + layer.Data.AbovePhreaticLevel = new VariationCoefficientLogNormalDistribution { Mean = (RoundedDouble) abovePhreaticLevelMean, CoefficientOfVariation = (RoundedDouble) abovePhreaticLevelCoefficientOfVariation, Shift = (RoundedDouble) abovePhreaticLevelShift }; - layer.Properties.BelowPhreaticLevel = new VariationCoefficientLogNormalDistribution + layer.Data.BelowPhreaticLevel = new VariationCoefficientLogNormalDistribution { Mean = (RoundedDouble) belowPhreaticLevelMean, CoefficientOfVariation = (RoundedDouble) belowPhreaticLevelCoefficientOfVariation, Shift = (RoundedDouble) belowPhreaticLevelShift }; - layer.Properties.Cohesion = new VariationCoefficientLogNormalDistribution + layer.Data.Cohesion = new VariationCoefficientLogNormalDistribution { Mean = (RoundedDouble) cohesionMean, CoefficientOfVariation = (RoundedDouble) cohesionCoefficientOfVariation }; - layer.Properties.FrictionAngle = new VariationCoefficientLogNormalDistribution + layer.Data.FrictionAngle = new VariationCoefficientLogNormalDistribution { Mean = (RoundedDouble) frictionAngleMean, CoefficientOfVariation = (RoundedDouble) frictionAngleCoefficientOfVariation }; - layer.Properties.ShearStrengthRatio = new VariationCoefficientLogNormalDistribution + layer.Data.ShearStrengthRatio = new VariationCoefficientLogNormalDistribution { Mean = (RoundedDouble) shearStrengthRatioMean, CoefficientOfVariation = (RoundedDouble) shearStrengthRatioCoefficientOfVariation }; - layer.Properties.StrengthIncreaseExponent = new VariationCoefficientLogNormalDistribution + layer.Data.StrengthIncreaseExponent = new VariationCoefficientLogNormalDistribution { Mean = (RoundedDouble) strengthIncreaseExponentMean, CoefficientOfVariation = (RoundedDouble) strengthIncreaseExponentCoefficientOfVariation }; - layer.Properties.Pop = new VariationCoefficientLogNormalDistribution + layer.Data.Pop = new VariationCoefficientLogNormalDistribution { Mean = (RoundedDouble) popMean, CoefficientOfVariation = (RoundedDouble) popCoefficientOfVariation @@ -569,7 +569,7 @@ profile, new MacroStabilityInwardsSurfaceLine(string.Empty)); // Assert - Assert.AreSame(layer.Properties, profileUnderSurfaceLine.Layers.First().Properties); + Assert.AreSame(layer.Data, profileUnderSurfaceLine.Layers.First().Data); } [Test] Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsStochasticSoilModelTest.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsStochasticSoilModelTest.cs (.../MacroStabilityInwardsStochasticSoilModelTest.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsStochasticSoilModelTest.cs (.../MacroStabilityInwardsStochasticSoilModelTest.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -27,7 +27,6 @@ using Core.Common.Base.Geometry; using NUnit.Framework; using Ringtoets.MacroStabilityInwards.Data.SoilProfile; -using Ringtoets.MacroStabilityInwards.Data.TestUtil; using Ringtoets.MacroStabilityInwards.Data.TestUtil.SoilProfile; namespace Ringtoets.MacroStabilityInwards.Data.Test.SoilProfile @@ -350,7 +349,7 @@ { new MacroStabilityInwardsSoilLayer1D(0.0) { - Properties = + Data = { IsAquifer = true } Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test/MacroStabilityInwardsInputFactoryTest.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test/MacroStabilityInwardsInputFactoryTest.cs (.../MacroStabilityInwardsInputFactoryTest.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test/MacroStabilityInwardsInputFactoryTest.cs (.../MacroStabilityInwardsInputFactoryTest.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -174,7 +174,7 @@ private static void AssertLayer(bool aquifer, double top, MacroStabilityInwardsSoilLayer1D soilLayer) { - Assert.AreEqual(aquifer, soilLayer.Properties.IsAquifer); + Assert.AreEqual(aquifer, soilLayer.Data.IsAquifer); Assert.AreEqual(top, soilLayer.Top); } } Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/MacroStabilityInwardsCalculationScenarioFactory.cs =================================================================== diff -u -rf2ba7f68f5de2fc3c8dec8baf7326808120cee52 -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/MacroStabilityInwardsCalculationScenarioFactory.cs (.../MacroStabilityInwardsCalculationScenarioFactory.cs) (revision f2ba7f68f5de2fc3c8dec8baf7326808120cee52) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/MacroStabilityInwardsCalculationScenarioFactory.cs (.../MacroStabilityInwardsCalculationScenarioFactory.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -137,14 +137,14 @@ { new MacroStabilityInwardsSoilLayer1D(top) { - Properties = + Data = { IsAquifer = false } }, new MacroStabilityInwardsSoilLayer1D(top / 2) { - Properties = + Data = { IsAquifer = true } Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/MacroStabilityInwardsInputFactory.cs =================================================================== diff -u -rd619624819b7200ac55b357b0a0c54d198fc20e4 -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/MacroStabilityInwardsInputFactory.cs (.../MacroStabilityInwardsInputFactory.cs) (revision d619624819b7200ac55b357b0a0c54d198fc20e4) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/MacroStabilityInwardsInputFactory.cs (.../MacroStabilityInwardsInputFactory.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -52,14 +52,14 @@ { new MacroStabilityInwardsSoilLayer1D(thicknessCoverageLayer) { - Properties = + Data = { IsAquifer = false } }, new MacroStabilityInwardsSoilLayer1D(0.0) { - Properties = + Data = { IsAquifer = true } @@ -90,7 +90,7 @@ { new MacroStabilityInwardsSoilLayer1D(0.0) { - Properties = + Data = { IsAquifer = true } @@ -122,21 +122,21 @@ { new MacroStabilityInwardsSoilLayer1D(surfaceLineTopLevel + deltaAboveSurfaceLine + 2) { - Properties = + Data = { IsAquifer = false } }, new MacroStabilityInwardsSoilLayer1D(surfaceLineTopLevel + deltaAboveSurfaceLine + 1) { - Properties = + Data = { IsAquifer = true } }, new MacroStabilityInwardsSoilLayer1D(surfaceLineTopLevel + deltaAboveSurfaceLine) { - Properties = + Data = { IsAquifer = false } @@ -168,21 +168,21 @@ { new MacroStabilityInwardsSoilLayer1D(4.3) { - Properties = + Data = { IsAquifer = false } }, new MacroStabilityInwardsSoilLayer1D(3.3) { - Properties = + Data = { IsAquifer = true } }, new MacroStabilityInwardsSoilLayer1D(1.1) { - Properties = + Data = { IsAquifer = true } Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Factories/MacroStabilityInwardsChartDataFactoryTest.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Factories/MacroStabilityInwardsChartDataFactoryTest.cs (.../MacroStabilityInwardsChartDataFactoryTest.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Factories/MacroStabilityInwardsChartDataFactoryTest.cs (.../MacroStabilityInwardsChartDataFactoryTest.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -186,7 +186,7 @@ } layers.Add(new MacroStabilityInwardsSoilLayer1D(-1.0) { - Properties = + Data = { MaterialName = name, Color = Color.Aquamarine Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsInputContextPropertiesTest.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsInputContextPropertiesTest.cs (.../MacroStabilityInwardsInputContextPropertiesTest.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsInputContextPropertiesTest.cs (.../MacroStabilityInwardsInputContextPropertiesTest.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -359,7 +359,7 @@ { new MacroStabilityInwardsSoilLayer1D(random.NextDouble()) { - Properties = + Data = { IsAquifer = true } Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsSoilLayer1DPropertiesTest.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsSoilLayer1DPropertiesTest.cs (.../MacroStabilityInwardsSoilLayer1DPropertiesTest.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsSoilLayer1DPropertiesTest.cs (.../MacroStabilityInwardsSoilLayer1DPropertiesTest.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -63,7 +63,7 @@ // Setup var layer = new MacroStabilityInwardsSoilLayer1D(-2.9) { - Properties = + Data = { MaterialName = "Test Name", IsAquifer = true @@ -74,8 +74,8 @@ var properties = new MacroStabilityInwardsSoilLayer1DProperties(layer); // Assert - Assert.AreEqual(layer.Properties.MaterialName, properties.Name); - Assert.AreEqual(layer.Properties.IsAquifer, properties.IsAquifer); + Assert.AreEqual(layer.Data.MaterialName, properties.Name); + Assert.AreEqual(layer.Data.IsAquifer, properties.IsAquifer); Assert.AreEqual(layer.Top.ToString(CultureInfo.CurrentCulture), properties.TopLevel); } @@ -85,7 +85,7 @@ // Setup var layer = new MacroStabilityInwardsSoilLayer1D(-2.9) { - Properties = + Data = { MaterialName = "Layer A" } @@ -97,7 +97,7 @@ string name = properties.ToString(); // Assert - Assert.AreEqual(layer.Properties.MaterialName, name); + Assert.AreEqual(layer.Data.MaterialName, name); } [Test] Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsSoilLayer2DPropertiesTest.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsSoilLayer2DPropertiesTest.cs (.../MacroStabilityInwardsSoilLayer2DPropertiesTest.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsSoilLayer2DPropertiesTest.cs (.../MacroStabilityInwardsSoilLayer2DPropertiesTest.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -80,7 +80,7 @@ }) }) { - Properties = + Data = { MaterialName = "Test Name", IsAquifer = true @@ -91,8 +91,8 @@ var properties = new MacroStabilityInwardsSoilLayer2DProperties(layer); // Assert - Assert.AreEqual(layer.Properties.MaterialName, properties.Name); - Assert.AreEqual(layer.Properties.IsAquifer, properties.IsAquifer); + Assert.AreEqual(layer.Data.MaterialName, properties.Name); + Assert.AreEqual(layer.Data.IsAquifer, properties.IsAquifer); CollectionAssert.AreEqual(layer.OuterRing.Points, properties.OuterRing); Assert.AreEqual(1, properties.Holes.Length); Assert.AreSame(layer.Holes[0], properties.Holes[0].Data); @@ -103,15 +103,15 @@ { // Setup MacroStabilityInwardsSoilLayer2D layer = CreateMacroStabilityInwardsSoilLayer2D(); - layer.Properties.MaterialName = "Layer A 2D"; + layer.Data.MaterialName = "Layer A 2D"; var properties = new MacroStabilityInwardsSoilLayer2DProperties(layer); // Call string name = properties.ToString(); // Assert - Assert.AreEqual(layer.Properties.MaterialName, name); + Assert.AreEqual(layer.Data.MaterialName, name); } [Test] Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsSoilLayerTableTest.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsSoilLayerTableTest.cs (.../MacroStabilityInwardsSoilLayerTableTest.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsSoilLayerTableTest.cs (.../MacroStabilityInwardsSoilLayerTableTest.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -156,9 +156,9 @@ MacroStabilityInwardsSoilLayer1D soilLayer = layers[i]; DataGridViewCellCollection rowCells = table.Rows[i].Cells; AssertColumnValueEqual(soilLayer.Top, rowCells[topColumnIndex].Value); - AssertColumnValueEqual(soilLayer.Properties.MaterialName, rowCells[nameColumnIndex].Value); - AssertColumnValueEqual(soilLayer.Properties.Color, rowCells[colorColumnIndex].Value); - AssertColumnValueEqual(soilLayer.Properties.IsAquifer, rowCells[isAquiferColumnIndex].Value); + AssertColumnValueEqual(soilLayer.Data.MaterialName, rowCells[nameColumnIndex].Value); + AssertColumnValueEqual(soilLayer.Data.Color, rowCells[colorColumnIndex].Value); + AssertColumnValueEqual(soilLayer.Data.IsAquifer, rowCells[isAquiferColumnIndex].Value); } } } @@ -183,7 +183,7 @@ return new MacroStabilityInwardsSoilLayer1D(random.NextDouble()) { - Properties = + Data = { MaterialName = $"{random.NextDouble()}", Color = Color.FromKnownColor(random.NextEnumValue()), Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfiles/MacroStabilityInwardsSoilLayerTransformerTest.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfiles/MacroStabilityInwardsSoilLayerTransformerTest.cs (.../MacroStabilityInwardsSoilLayerTransformerTest.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfiles/MacroStabilityInwardsSoilLayerTransformerTest.cs (.../MacroStabilityInwardsSoilLayerTransformerTest.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -108,57 +108,57 @@ // Assert Assert.AreEqual(top, soilLayer1D.Top); - MacroStabilityInwardsSoilLayerProperties properties = soilLayer1D.Properties; + MacroStabilityInwardsSoilLayerData data = soilLayer1D.Data; - Assert.AreEqual(materialName, properties.MaterialName); + Assert.AreEqual(materialName, data.MaterialName); bool expectedIsAquifer = isAquifer.Equals(1.0); - Assert.AreEqual(expectedIsAquifer, properties.IsAquifer); + Assert.AreEqual(expectedIsAquifer, data.IsAquifer); Color expectedColor = Color.FromArgb(Convert.ToInt32(color)); - Assert.AreEqual(expectedColor, properties.Color); + Assert.AreEqual(expectedColor, data.Color); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = (RoundedDouble) abovePhreaticLevelMean, CoefficientOfVariation = (RoundedDouble) abovePhreaticLevelCoefficientOfVariation, Shift = (RoundedDouble) abovePhreaticLevelShift - }, properties.AbovePhreaticLevel); + }, data.AbovePhreaticLevel); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = (RoundedDouble) belowPhreaticLevelMean, CoefficientOfVariation = (RoundedDouble) belowPhreaticLevelCoefficientOfVariation, Shift = (RoundedDouble) abovePhreaticLevelShift - }, properties.BelowPhreaticLevel); + }, data.BelowPhreaticLevel); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = (RoundedDouble) cohesionMean, CoefficientOfVariation = (RoundedDouble) cohesionCoefficientOfVariation - }, properties.Cohesion); + }, data.Cohesion); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = (RoundedDouble) frictionAngleMean, CoefficientOfVariation = (RoundedDouble) frictionAngleCoefficientOfVariation - }, properties.FrictionAngle); + }, data.FrictionAngle); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = (RoundedDouble) shearStrengthRatioMean, CoefficientOfVariation = (RoundedDouble) shearStrengthRatioCoefficientOfVariation - }, properties.ShearStrengthRatio); + }, data.ShearStrengthRatio); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = (RoundedDouble) strengthIncreaseExponentMean, CoefficientOfVariation = (RoundedDouble) strengthIncreaseExponentCoefficientOfVariation - }, properties.StrengthIncreaseExponent); + }, data.StrengthIncreaseExponent); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = (RoundedDouble) popMean, CoefficientOfVariation = (RoundedDouble) popCoefficientOfVariation - }, properties.Pop); + }, data.Pop); } [Test] @@ -174,7 +174,7 @@ MacroStabilityInwardsSoilLayer1D soilLayer1D = MacroStabilityInwardsSoilLayerTransformer.Transform(layer); // Assert - Assert.AreEqual(transformedUsePopValue, soilLayer1D.Properties.UsePop); + Assert.AreEqual(transformedUsePopValue, soilLayer1D.Data.UsePop); } [Test] @@ -207,7 +207,7 @@ MacroStabilityInwardsSoilLayer1D soilLayer1D = MacroStabilityInwardsSoilLayerTransformer.Transform(layer); // Assert - Assert.AreEqual(transformedShearStrengthModel, soilLayer1D.Properties.ShearStrengthModel); + Assert.AreEqual(transformedShearStrengthModel, soilLayer1D.Data.ShearStrengthModel); } [Test] @@ -253,7 +253,7 @@ MacroStabilityInwardsSoilLayer1D soilLayer1D = MacroStabilityInwardsSoilLayerTransformer.Transform(layer); // Assert - Assert.AreEqual(transformedIsAquifer, soilLayer1D.Properties.IsAquifer); + Assert.AreEqual(transformedIsAquifer, soilLayer1D.Data.IsAquifer); } [Test] @@ -286,7 +286,7 @@ MacroStabilityInwardsSoilLayer1D soilLayer1D = MacroStabilityInwardsSoilLayerTransformer.Transform(layer); // Assert - Assert.AreEqual(transformedColor, soilLayer1D.Properties.Color); + Assert.AreEqual(transformedColor, soilLayer1D.Data.Color); } [Test] @@ -376,57 +376,57 @@ MacroStabilityInwardsSoilLayer2D soilLayer2D = MacroStabilityInwardsSoilLayerTransformer.Transform(layer); // Assert - MacroStabilityInwardsSoilLayerProperties properties = soilLayer2D.Properties; + MacroStabilityInwardsSoilLayerData data = soilLayer2D.Data; - Assert.AreEqual(materialName, properties.MaterialName); + Assert.AreEqual(materialName, data.MaterialName); bool expectedIsAquifer = isAquifer.Equals(1.0); - Assert.AreEqual(expectedIsAquifer, properties.IsAquifer); + Assert.AreEqual(expectedIsAquifer, data.IsAquifer); Color expectedColor = Color.FromArgb(Convert.ToInt32(color)); - Assert.AreEqual(expectedColor, properties.Color); + Assert.AreEqual(expectedColor, data.Color); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = (RoundedDouble) abovePhreaticLevelMean, CoefficientOfVariation = (RoundedDouble) abovePhreaticLevelCoefficientOfVariation, Shift = (RoundedDouble) abovePhreaticLevelShift - }, properties.AbovePhreaticLevel); + }, data.AbovePhreaticLevel); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = (RoundedDouble) belowPhreaticLevelMean, CoefficientOfVariation = (RoundedDouble) belowPhreaticLevelCoefficientOfVariation, Shift = (RoundedDouble) abovePhreaticLevelShift - }, properties.BelowPhreaticLevel); + }, data.BelowPhreaticLevel); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = (RoundedDouble) cohesionMean, CoefficientOfVariation = (RoundedDouble) cohesionCoefficientOfVariation - }, properties.Cohesion); + }, data.Cohesion); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = (RoundedDouble) frictionAngleMean, CoefficientOfVariation = (RoundedDouble) frictionAngleCoefficientOfVariation - }, properties.FrictionAngle); + }, data.FrictionAngle); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = (RoundedDouble)shearStrengthRatioMean, CoefficientOfVariation = (RoundedDouble)shearStrengthRatioCoefficientOfVariation - }, properties.ShearStrengthRatio); + }, data.ShearStrengthRatio); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = (RoundedDouble)strengthIncreaseExponentMean, CoefficientOfVariation = (RoundedDouble)strengthIncreaseExponentCoefficientOfVariation - }, properties.StrengthIncreaseExponent); + }, data.StrengthIncreaseExponent); DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2) { Mean = (RoundedDouble)popMean, CoefficientOfVariation = (RoundedDouble)popCoefficientOfVariation - }, properties.Pop); + }, data.Pop); AssertRings(layer, soilLayer2D); } @@ -444,7 +444,7 @@ MacroStabilityInwardsSoilLayer2D soilLayer2D = MacroStabilityInwardsSoilLayerTransformer.Transform(layer); // Assert - Assert.AreEqual(transformedUsePopValue, soilLayer2D.Properties.UsePop); + Assert.AreEqual(transformedUsePopValue, soilLayer2D.Data.UsePop); } [Test] @@ -477,7 +477,7 @@ MacroStabilityInwardsSoilLayer2D soilLayer2D = MacroStabilityInwardsSoilLayerTransformer.Transform(layer); // Assert - Assert.AreEqual(transformedShearStrengthModel, soilLayer2D.Properties.ShearStrengthModel); + Assert.AreEqual(transformedShearStrengthModel, soilLayer2D.Data.ShearStrengthModel); } [Test] @@ -524,7 +524,7 @@ MacroStabilityInwardsSoilLayer2D soilLayer2D = MacroStabilityInwardsSoilLayerTransformer.Transform(layer); // Assert - Assert.AreEqual(transformedIsAquifer, soilLayer2D.Properties.IsAquifer); + Assert.AreEqual(transformedIsAquifer, soilLayer2D.Data.IsAquifer); } [Test] @@ -557,7 +557,7 @@ MacroStabilityInwardsSoilLayer2D soilLayer2D = MacroStabilityInwardsSoilLayerTransformer.Transform(layer); // Assert - Assert.AreEqual(transformedColor, soilLayer2D.Properties.Color); + Assert.AreEqual(transformedColor, soilLayer2D.Data.Color); } [Test] Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfiles/MacroStabilityInwardsStochasticSoilModelTransformerTest.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfiles/MacroStabilityInwardsStochasticSoilModelTransformerTest.cs (.../MacroStabilityInwardsStochasticSoilModelTransformerTest.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfiles/MacroStabilityInwardsStochasticSoilModelTransformerTest.cs (.../MacroStabilityInwardsStochasticSoilModelTransformerTest.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -110,7 +110,7 @@ { new MacroStabilityInwardsSoilLayer1D(top) { - Properties = + Data = { UsePop = true, ShearStrengthModel = MacroStabilityInwardsShearStrengthModel.CPhi, @@ -160,7 +160,7 @@ }) }) { - Properties = + Data = { UsePop = true, ShearStrengthModel = MacroStabilityInwardsShearStrengthModel.CPhi Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/Converters/UpliftVanSoilProfileConverterTest.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/Converters/UpliftVanSoilProfileConverterTest.cs (.../UpliftVanSoilProfileConverterTest.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/Converters/UpliftVanSoilProfileConverterTest.cs (.../UpliftVanSoilProfileConverterTest.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -61,7 +61,7 @@ { CreateRing(11), CreateRing(22) - }, new MacroStabilityInwardsSoilLayerProperties + }, new MacroStabilityInwardsSoilLayerData { UsePop = random.NextBoolean(), IsAquifer = random.NextBoolean(), @@ -123,7 +123,7 @@ var profile = new MacroStabilityInwardsSoilProfileUnderSurfaceLine(new[] { new MacroStabilityInwardsSoilLayerUnderSurfaceLine(CreateRing(21), new Point2D[0][], - new MacroStabilityInwardsSoilLayerProperties + new MacroStabilityInwardsSoilLayerData { ShearStrengthModel = (MacroStabilityInwardsShearStrengthModel) 99 }) @@ -148,7 +148,7 @@ var profile = new MacroStabilityInwardsSoilProfileUnderSurfaceLine(new[] { new MacroStabilityInwardsSoilLayerUnderSurfaceLine(CreateRing(21), new Point2D[0][], - new MacroStabilityInwardsSoilLayerProperties + new MacroStabilityInwardsSoilLayerData { ShearStrengthModel = originalShearStrengthModel }) Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.TestUtil/UpliftVanSoilProfileHelper.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.TestUtil/UpliftVanSoilProfileHelper.cs (.../UpliftVanSoilProfileHelper.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.TestUtil/UpliftVanSoilProfileHelper.cs (.../UpliftVanSoilProfileHelper.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -70,18 +70,18 @@ Assert.AreEqual(expectedLayers[i].OuterRing, actualLayers[i].OuterRing); CollectionAssert.AreEqual(expectedLayers[i].Holes, actualLayers[i].Holes); - MacroStabilityInwardsSoilLayerProperties expectedProperties = expectedLayers[i].Properties; - Assert.AreEqual(expectedProperties.MaterialName, actualLayers[i].MaterialName); - Assert.AreEqual(expectedProperties.UsePop, actualLayers[i].UsePop); - Assert.AreEqual(expectedProperties.IsAquifer, actualLayers[i].IsAquifer); + MacroStabilityInwardsSoilLayerData expectedData = expectedLayers[i].Data; + Assert.AreEqual(expectedData.MaterialName, actualLayers[i].MaterialName); + Assert.AreEqual(expectedData.UsePop, actualLayers[i].UsePop); + Assert.AreEqual(expectedData.IsAquifer, actualLayers[i].IsAquifer); - Assert.AreEqual(MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetAbovePhreaticLevel(expectedProperties).GetDesignValue(), actualLayers[i].AbovePhreaticLevel); - Assert.AreEqual(MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetBelowPhreaticLevel(expectedProperties).GetDesignValue(), actualLayers[i].BelowPhreaticLevel); - Assert.AreEqual(MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetCohesion(expectedProperties).GetDesignValue(), actualLayers[i].Cohesion); - Assert.AreEqual(MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetFrictionAngle(expectedProperties).GetDesignValue(), actualLayers[i].FrictionAngle); - Assert.AreEqual(MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetStrengthIncreaseExponent(expectedProperties).GetDesignValue(), actualLayers[i].StrengthIncreaseExponent); - Assert.AreEqual(MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetShearStrengthRatio(expectedProperties).GetDesignValue(), actualLayers[i].ShearStrengthRatio); - Assert.AreEqual(MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetPop(expectedProperties).GetDesignValue(), actualLayers[i].Pop); + Assert.AreEqual(MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetAbovePhreaticLevel(expectedData).GetDesignValue(), actualLayers[i].AbovePhreaticLevel); + Assert.AreEqual(MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetBelowPhreaticLevel(expectedData).GetDesignValue(), actualLayers[i].BelowPhreaticLevel); + Assert.AreEqual(MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetCohesion(expectedData).GetDesignValue(), actualLayers[i].Cohesion); + Assert.AreEqual(MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetFrictionAngle(expectedData).GetDesignValue(), actualLayers[i].FrictionAngle); + Assert.AreEqual(MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetStrengthIncreaseExponent(expectedData).GetDesignValue(), actualLayers[i].StrengthIncreaseExponent); + Assert.AreEqual(MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetShearStrengthRatio(expectedData).GetDesignValue(), actualLayers[i].ShearStrengthRatio); + Assert.AreEqual(MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetPop(expectedData).GetDesignValue(), actualLayers[i].Pop); } } } Index: Ringtoets/Piping/src/Ringtoets.Piping.IO/SoilProfiles/PipingSoilLayerTransformer.cs =================================================================== diff -u -r3fe99efe7580ec1d9eb850908c001c990dc43fe5 -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 --- Ringtoets/Piping/src/Ringtoets.Piping.IO/SoilProfiles/PipingSoilLayerTransformer.cs (.../PipingSoilLayerTransformer.cs) (revision 3fe99efe7580ec1d9eb850908c001c990dc43fe5) +++ Ringtoets/Piping/src/Ringtoets.Piping.IO/SoilProfiles/PipingSoilLayerTransformer.cs (.../PipingSoilLayerTransformer.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) @@ -248,7 +248,7 @@ catch (NotSupportedException) { throw new ImportedDataTransformException(string.Format(RingtoetsCommonIOResources.Transform_Invalid_value_ParameterName_0, - RingtoetsCommonIOResources.SoilLayerProperties_IsAquifer_DisplayName)); + RingtoetsCommonIOResources.SoilLayerData_IsAquifer_DisplayName)); } } }