Index: Ringtoets/Common/src/Ringtoets.Common.IO/PreconsolidationStress.cs
===================================================================
diff -u
--- Ringtoets/Common/src/Ringtoets.Common.IO/PreconsolidationStress.cs (revision 0)
+++ Ringtoets/Common/src/Ringtoets.Common.IO/PreconsolidationStress.cs (revision 6c59d09636a0a170b03797b7bb1f778dd70ac9a7)
@@ -0,0 +1,69 @@
+// 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.
+
+namespace Ringtoets.Common.IO
+{
+ ///
+ /// Class containing parameters for preconsolidation stress definitions.
+ ///
+ public class PreconsolidationStress
+ {
+ ///
+ /// Gets or sets the X coordinate of the preconsolidation stress location.
+ /// [m]
+ ///
+ public double XCoordinate { get; set; } = double.NaN;
+
+ ///
+ /// Gets or sets the Z coordinate of the preconsolidation stress location.
+ /// [m]
+ ///
+ public double ZCoordinate { get; set; } = double.NaN;
+
+ ///
+ /// Gets or sets the value of the preconsolidation stress.
+ ///
+ public double PreconsolidationStressValue { get; set; } = double.NaN;
+
+ ///
+ /// Gets or sets distribution type of the preconsolidation stress.
+ ///
+ public long? PreconsolidationStressDistributionType { get; set; }
+
+ ///
+ /// Gets or sets the mean for the distribution of the preconsolidation stress.
+ /// [kN/m³]
+ ///
+ public double PreconsolidationStressMean { get; set; } = double.NaN;
+
+ ///
+ /// Gets or sets the coefficient of variation for the distribution of the preconsolidation stress.
+ /// [kN/m³]
+ ///
+ public double PreconsolidationStressCoefficientOfVariation { get; set; } = double.NaN;
+
+ ///
+ /// Gets or sets the shift for the distribution of the preconsolidation stress.
+ /// [kN/m³]
+ ///
+ public double PreconsolidationStressShift { get; set; } = double.NaN;
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/src/Ringtoets.Common.IO/Ringtoets.Common.IO.csproj
===================================================================
diff -u -r96061b4c3b4d8e09c0a2e6d9afe794324256071c -r6c59d09636a0a170b03797b7bb1f778dd70ac9a7
--- Ringtoets/Common/src/Ringtoets.Common.IO/Ringtoets.Common.IO.csproj (.../Ringtoets.Common.IO.csproj) (revision 96061b4c3b4d8e09c0a2e6d9afe794324256071c)
+++ Ringtoets/Common/src/Ringtoets.Common.IO/Ringtoets.Common.IO.csproj (.../Ringtoets.Common.IO.csproj) (revision 6c59d09636a0a170b03797b7bb1f778dd70ac9a7)
@@ -100,6 +100,7 @@
+
Index: Ringtoets/Common/src/Ringtoets.Common.IO/SoilProfile/PreconsolidationStressProperties.cs
===================================================================
diff -u -r96061b4c3b4d8e09c0a2e6d9afe794324256071c -r6c59d09636a0a170b03797b7bb1f778dd70ac9a7
--- Ringtoets/Common/src/Ringtoets.Common.IO/SoilProfile/PreconsolidationStressProperties.cs (.../PreconsolidationStressProperties.cs) (revision 96061b4c3b4d8e09c0a2e6d9afe794324256071c)
+++ Ringtoets/Common/src/Ringtoets.Common.IO/SoilProfile/PreconsolidationStressProperties.cs (.../PreconsolidationStressProperties.cs) (revision 6c59d09636a0a170b03797b7bb1f778dd70ac9a7)
@@ -70,7 +70,7 @@
PreconsolidationStressValue = reader.ReadOrDefault(readColumn);
readColumn = PreconsolidationStressTableDefinitions.PreconsolidationStressDistribution;
- PreconsolidationStressDistribution = reader.ReadOrDefault(readColumn);
+ PreconsolidationStressDistributionType = reader.ReadOrDefault(readColumn);
readColumn = PreconsolidationStressTableDefinitions.PreconsolidationStressMean;
PreconsolidationStressMean = reader.ReadOrDefault(readColumn);
readColumn = PreconsolidationStressTableDefinitions.PreconsolidationStressCoefficientOfVariation;
@@ -91,42 +91,41 @@
/// Gets the value representing the X coordinate of the preconsolidation stress location.
/// [m]
///
- public double? XCoordinate { get; set; }
+ public double? XCoordinate { get; }
///
/// Gets the value representing the Z coordinate of the preconsolidation stress location.
/// [m]
///
- public double? ZCoordinate { get; set; }
+ public double? ZCoordinate { get; }
///
/// Gets the value representing the stress of the preconsolidation stress location.
/// [kN/m�]
///
- public double? PreconsolidationStressValue { get; set; }
+ public double? PreconsolidationStressValue { get; }
///
- /// Gets the distribution of the preconsolidation stress.
- /// [kN/m�]
+ /// Gets the distribution type of the preconsolidation stress.
///
- public double? PreconsolidationStressDistribution { get; set; }
+ public double? PreconsolidationStressDistributionType { get; }
///
- /// Gets the value representing the mean of the distribution of the preconsolidation stress.
+ /// Gets the value representing the mean of the distribution for the preconsolidation stress.
/// [kN/m�]
///
- public double? PreconsolidationStressMean { get; set; }
+ public double? PreconsolidationStressMean { get; }
///
- /// Gets the value representing the coefficient of variation of the distribution of the preconsolidation stress.
+ /// Gets the value representing the coefficient of variation of the distribution for the preconsolidation stress.
/// [kN/m�]
///
- public double? PreconsolidationStressCoefficientOfVariation { get; set; }
+ public double? PreconsolidationStressCoefficientOfVariation { get; }
///
/// Gets the value representing the shift of the distribution for the preconsolidation stress.
/// [kN/m�]
///
- public double? PreconsolidationStressShift { get; set; }
+ public double? PreconsolidationStressShift { get; }
}
}
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/Ringtoets.Common.IO.Test.csproj
===================================================================
diff -u -r96061b4c3b4d8e09c0a2e6d9afe794324256071c -r6c59d09636a0a170b03797b7bb1f778dd70ac9a7
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/Ringtoets.Common.IO.Test.csproj (.../Ringtoets.Common.IO.Test.csproj) (revision 96061b4c3b4d8e09c0a2e6d9afe794324256071c)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/Ringtoets.Common.IO.Test.csproj (.../Ringtoets.Common.IO.Test.csproj) (revision 6c59d09636a0a170b03797b7bb1f778dd70ac9a7)
@@ -113,6 +113,7 @@
+
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/SoilProfile/PreconsolidationStressPropertiesTest.cs
===================================================================
diff -u -r96061b4c3b4d8e09c0a2e6d9afe794324256071c -r6c59d09636a0a170b03797b7bb1f778dd70ac9a7
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/SoilProfile/PreconsolidationStressPropertiesTest.cs (.../PreconsolidationStressPropertiesTest.cs) (revision 96061b4c3b4d8e09c0a2e6d9afe794324256071c)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/SoilProfile/PreconsolidationStressPropertiesTest.cs (.../PreconsolidationStressPropertiesTest.cs) (revision 6c59d09636a0a170b03797b7bb1f778dd70ac9a7)
@@ -70,7 +70,7 @@
double xCoordinate = random.NextDouble();
double zCoordinate = random.NextDouble();
double preconsolidationStressValue = random.NextDouble();
- long preconsolidationStressDistribution = random.Next();
+ long preconsolidationStressDistributionType = random.Next();
double preconsolidationStressMean = random.Next();
double preconsolidationStressCoefficientOfVariation = random.Next();
double preconsolidationStressShift = random.Next();
@@ -80,7 +80,7 @@
reader.Expect(r => r.ReadOrDefault(PreconsolidationStressTableDefinitions.PreconsolidationStressXCoordinate)).Return(xCoordinate);
reader.Expect(r => r.ReadOrDefault(PreconsolidationStressTableDefinitions.PreconsolidationStressZCoordinate)).Return(zCoordinate);
reader.Expect(r => r.ReadOrDefault(PreconsolidationStressTableDefinitions.PreconsolidationStressValue)).Return(preconsolidationStressValue);
- reader.Expect(r => r.ReadOrDefault(PreconsolidationStressTableDefinitions.PreconsolidationStressDistribution)).Return(preconsolidationStressDistribution);
+ reader.Expect(r => r.ReadOrDefault(PreconsolidationStressTableDefinitions.PreconsolidationStressDistribution)).Return(preconsolidationStressDistributionType);
reader.Expect(r => r.ReadOrDefault(PreconsolidationStressTableDefinitions.PreconsolidationStressMean)).Return(preconsolidationStressMean);
reader.Expect(r => r.ReadOrDefault(PreconsolidationStressTableDefinitions.PreconsolidationStressCoefficientOfVariation)).Return(preconsolidationStressCoefficientOfVariation);
reader.Expect(r => r.ReadOrDefault(PreconsolidationStressTableDefinitions.PreconsolidationStressShift)).Return(preconsolidationStressShift);
@@ -93,7 +93,7 @@
Assert.AreEqual(xCoordinate, properties.XCoordinate);
Assert.AreEqual(zCoordinate, properties.ZCoordinate);
Assert.AreEqual(preconsolidationStressValue, properties.PreconsolidationStressValue);
- Assert.AreEqual(preconsolidationStressDistribution, properties.PreconsolidationStressDistribution);
+ Assert.AreEqual(preconsolidationStressDistributionType, properties.PreconsolidationStressDistributionType);
Assert.AreEqual(preconsolidationStressMean, properties.PreconsolidationStressMean);
Assert.AreEqual(preconsolidationStressCoefficientOfVariation, properties.PreconsolidationStressCoefficientOfVariation);
Assert.AreEqual(preconsolidationStressShift, properties.PreconsolidationStressShift);
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/SoilProfile/PreconsolidationStressTest.cs
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/SoilProfile/PreconsolidationStressTest.cs (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/SoilProfile/PreconsolidationStressTest.cs (revision 6c59d09636a0a170b03797b7bb1f778dd70ac9a7)
@@ -0,0 +1,45 @@
+// 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 NUnit.Framework;
+
+namespace Ringtoets.Common.IO.Test.SoilProfile
+{
+ [TestFixture]
+ public class PreconsolidationStressTest
+ {
+ [Test]
+ public void Constructor_ReturnsDefaultValues()
+ {
+ // Call
+ var stress = new PreconsolidationStress();
+
+ // Assert
+ Assert.IsNaN(stress.XCoordinate);
+ Assert.IsNaN(stress.ZCoordinate);
+ Assert.IsNaN(stress.PreconsolidationStressValue);
+ Assert.IsNull(stress.PreconsolidationStressDistributionType);
+ Assert.IsNaN(stress.PreconsolidationStressMean);
+ Assert.IsNaN(stress.PreconsolidationStressCoefficientOfVariation);
+ Assert.IsNaN(stress.PreconsolidationStressShift);
+ }
+ }
+}
\ No newline at end of file