Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/SoilProfile/PreconsolidationStressReaderTest.cs =================================================================== diff -u -r069fd5204ede2f98296a58237a203b3090cd9d89 -r9ea64fffa7ea64307fe446351577cbc3d6f4c220 --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/SoilProfile/PreconsolidationStressReaderTest.cs (.../PreconsolidationStressReaderTest.cs) (revision 069fd5204ede2f98296a58237a203b3090cd9d89) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/SoilProfile/PreconsolidationStressReaderTest.cs (.../PreconsolidationStressReaderTest.cs) (revision 9ea64fffa7ea64307fe446351577cbc3d6f4c220) @@ -190,7 +190,7 @@ } [Test] - public void ReadSoilProfile_EmptyFile_ReturnsEmptyPreconsolidationStressCollection() + public void ReadPreconsolidationStresses_EmptyFile_ReturnsEmptyPreconsolidationStressCollection() { // Setup string dbFile = Path.Combine(testDataPath, "emptySchema.soil"); @@ -305,7 +305,7 @@ // Given string dbFile = Path.Combine(testDataPath, "2dprofileWithPreconsolidationStressesAndUnparsableValues.soil"); - SoilProfileReadException expectedException = null; + SoilProfileReadException actualException = null; var readStresses = new List(); using (var reader = new PreconsolidationStressReader(dbFile)) { @@ -320,16 +320,16 @@ } catch (SoilProfileReadException e) { - expectedException = e; + actualException = e; } } // Then Assert.IsFalse(reader.HasNext); } - Assert.IsNotNull(expectedException); - Assert.AreEqual("Profile_1", expectedException.ProfileName); + Assert.IsNotNull(actualException); + Assert.AreEqual("Profile_1", actualException.ProfileName); CollectionAssert.AreEqual(new[] { Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/SoilProfile/SoilProfile2DReaderTest.cs =================================================================== diff -u -r069fd5204ede2f98296a58237a203b3090cd9d89 -r9ea64fffa7ea64307fe446351577cbc3d6f4c220 --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/SoilProfile/SoilProfile2DReaderTest.cs (.../SoilProfile2DReaderTest.cs) (revision 069fd5204ede2f98296a58237a203b3090cd9d89) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/SoilProfile/SoilProfile2DReaderTest.cs (.../SoilProfile2DReaderTest.cs) (revision 9ea64fffa7ea64307fe446351577cbc3d6f4c220) @@ -707,7 +707,7 @@ string dbFile = Path.Combine(testDataPath, "2dProfilesWithSoilLayersUnparsableValues.soil"); var readProfiles = new List(); - SoilProfileReadException expectedException = null; + SoilProfileReadException actualException = null; using (var reader = new SoilProfile2DReader(dbFile)) { reader.Initialize(); @@ -721,7 +721,7 @@ } catch (SoilProfileReadException e) { - expectedException = e; + actualException = e; } } @@ -730,8 +730,8 @@ Assert.AreEqual(2, readProfiles.Count); } - Assert.IsNotNull(expectedException); - Assert.AreEqual("InvalidProfile", expectedException.ProfileName); + Assert.IsNotNull(actualException); + Assert.AreEqual("InvalidProfile", actualException.ProfileName); CollectionAssert.AreEqual(new[] { Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsStochasticSoilModelTest.cs =================================================================== diff -u -r069fd5204ede2f98296a58237a203b3090cd9d89 -r9ea64fffa7ea64307fe446351577cbc3d6f4c220 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsStochasticSoilModelTest.cs (.../MacroStabilityInwardsStochasticSoilModelTest.cs) (revision 069fd5204ede2f98296a58237a203b3090cd9d89) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsStochasticSoilModelTest.cs (.../MacroStabilityInwardsStochasticSoilModelTest.cs) (revision 9ea64fffa7ea64307fe446351577cbc3d6f4c220) @@ -299,16 +299,17 @@ public void Update_ModelsWithAddedProfilesWithSameNames_ThrowsInvalidOperationException() { // Setup + const string profileName = "Name of Profile"; + MacroStabilityInwardsSoilProfile1D soilProfileOne = - MacroStabilityInwardsSoilProfile1DTestFactory.CreateMacroStabilityInwardsSoilProfile1D(); + MacroStabilityInwardsSoilProfile1DTestFactory.CreateMacroStabilityInwardsSoilProfile1D(profileName); var addedStochasticSoilProfile = new MacroStabilityInwardsStochasticSoilProfile(0.2, soilProfileOne); MacroStabilityInwardsStochasticSoilModel otherModel = CreateEmptyModel(); otherModel.StochasticSoilProfiles.Add(addedStochasticSoilProfile); - MacroStabilityInwardsSoilProfile1D existingSoilProfile = - MacroStabilityInwardsSoilProfile1DTestFactory.CreateMacroStabilityInwardsSoilProfile1D(); - var existingStochasticSoilProfileOne = new MacroStabilityInwardsStochasticSoilProfile(0.2, existingSoilProfile); - var existingStochasticSoilProfileTwo = new MacroStabilityInwardsStochasticSoilProfile(0.3, existingSoilProfile); + MacroStabilityInwardsSoilProfile1D soilProfile = MacroStabilityInwardsSoilProfile1DTestFactory.CreateMacroStabilityInwardsSoilProfile1D(profileName); + var existingStochasticSoilProfileOne = new MacroStabilityInwardsStochasticSoilProfile(0.2,soilProfile); + var existingStochasticSoilProfileTwo = new MacroStabilityInwardsStochasticSoilProfile(0.3, soilProfile); MacroStabilityInwardsStochasticSoilModel model = CreateEmptyModel(); model.StochasticSoilProfiles.Add(existingStochasticSoilProfileOne); Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfiles/MacroStabilityInwardsPreconsolidationStressTransformerTest.cs =================================================================== diff -u -r069fd5204ede2f98296a58237a203b3090cd9d89 -r9ea64fffa7ea64307fe446351577cbc3d6f4c220 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfiles/MacroStabilityInwardsPreconsolidationStressTransformerTest.cs (.../MacroStabilityInwardsPreconsolidationStressTransformerTest.cs) (revision 069fd5204ede2f98296a58237a203b3090cd9d89) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfiles/MacroStabilityInwardsPreconsolidationStressTransformerTest.cs (.../MacroStabilityInwardsPreconsolidationStressTransformerTest.cs) (revision 9ea64fffa7ea64307fe446351577cbc3d6f4c220) @@ -163,7 +163,7 @@ var random = new Random(21); double xCoordinate = random.NextDouble(); double zCoordinate = random.NextDouble(); - double preconsolidationStressMean = 0.005; + const double preconsolidationStressMean = 0.005; double preconsolidationStressCoefficientOfVariation = random.NextDouble(); yield return new TestCaseData(new PreconsolidationStress Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/SoilProfile/PipingStochasticSoilModelTest.cs =================================================================== diff -u -r069fd5204ede2f98296a58237a203b3090cd9d89 -r9ea64fffa7ea64307fe446351577cbc3d6f4c220 --- Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/SoilProfile/PipingStochasticSoilModelTest.cs (.../PipingStochasticSoilModelTest.cs) (revision 069fd5204ede2f98296a58237a203b3090cd9d89) +++ Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/SoilProfile/PipingStochasticSoilModelTest.cs (.../PipingStochasticSoilModelTest.cs) (revision 9ea64fffa7ea64307fe446351577cbc3d6f4c220) @@ -304,13 +304,14 @@ public void Update_ModelsWithAddedProfilesWithSameNames_ThrowsInvalidOperationException() { // Setup - var addedProfile = new PipingStochasticSoilProfile(0.2, PipingSoilProfileTestFactory.CreatePipingSoilProfile()); + const string profileName = "Name of the profile"; + var addedProfile = new PipingStochasticSoilProfile(0.2, PipingSoilProfileTestFactory.CreatePipingSoilProfile(profileName)); PipingStochasticSoilModel otherModel = CreateEmptyModel(); otherModel.StochasticSoilProfiles.Add(addedProfile); - PipingSoilProfile existingProfile = PipingSoilProfileTestFactory.CreatePipingSoilProfile(); - var existingStochasticSoilProfileOne = new PipingStochasticSoilProfile(0.2, existingProfile); - var existingStochasticSoilProfileTwo = new PipingStochasticSoilProfile(0.3, existingProfile); + PipingSoilProfile soilProfile = PipingSoilProfileTestFactory.CreatePipingSoilProfile(profileName); + var existingStochasticSoilProfileOne = new PipingStochasticSoilProfile( 0.2, soilProfile); + var existingStochasticSoilProfileTwo = new PipingStochasticSoilProfile(0.3, soilProfile); PipingStochasticSoilModel model = CreateEmptyModel(); model.StochasticSoilProfiles.Add(existingStochasticSoilProfileOne); model.StochasticSoilProfiles.Add(existingStochasticSoilProfileTwo);