Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfiles/MacroStabilityInwardsSoilProfileTransformerTest.cs =================================================================== diff -u -rd0d3ed3067ec66c52283bd4d1c44011b1a412492 -r1992d18b2bbb21978616eab455a1035cdf2ff397 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfiles/MacroStabilityInwardsSoilProfileTransformerTest.cs (.../MacroStabilityInwardsSoilProfileTransformerTest.cs) (revision d0d3ed3067ec66c52283bd4d1c44011b1a412492) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfiles/MacroStabilityInwardsSoilProfileTransformerTest.cs (.../MacroStabilityInwardsSoilProfileTransformerTest.cs) (revision 1992d18b2bbb21978616eab455a1035cdf2ff397) @@ -68,7 +68,7 @@ } [Test] - public void Transform_SoilProfile1DWithoutLayers_ThrowsImportedDataTransformException() + public void Transform_MinimumSoilProfile1D_ThrowsImportedDataTransformException() { // Setup var profile = new SoilProfile1D(1, "test", 3, Enumerable.Empty()); @@ -85,28 +85,6 @@ } [Test] - public void Transform_SoilProfile1DBottomAboveTop_ThrowsImportedDataTransformException() - { - // Setup - const double bottom = 10; - const double top = -bottom; - var profile = new SoilProfile1D(1, "test", 3, new [] - { - SoilLayer1DTestFactory.CreateSoilLayer1DWithValidAquifer(top) - }); - - // Call - TestDelegate call = () => MacroStabilityInwardsSoilProfileTransformer.Transform(profile); - - // Assert - var exception = Assert.Throws(call); - - Exception innerException = exception.InnerException; - Assert.IsInstanceOf(innerException); - Assert.AreEqual(innerException.Message, exception.Message); - } - - [Test] public void Transform_ValidSoilProfile1D_ReturnMacroStabilityInwardsSoilProfile1D() { // Setup @@ -126,7 +104,7 @@ } [Test] - public void Transform_SoilProfile2DWithoutLayers_ThrowsImportedDataException() + public void Transform_MinimumSoilProfile2D_ThrowsImportedDataException() { // Setup var profile = new SoilProfile2D(1, "test", Enumerable.Empty(), Enumerable.Empty()); Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfiles/MacroStabilityInwardsStochasticSoilModelTransformerTest.cs =================================================================== diff -u -r30b4bd298c03a8c2162f5dd306d282453428c609 -r1992d18b2bbb21978616eab455a1035cdf2ff397 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfiles/MacroStabilityInwardsStochasticSoilModelTransformerTest.cs (.../MacroStabilityInwardsStochasticSoilModelTransformerTest.cs) (revision 30b4bd298c03a8c2162f5dd306d282453428c609) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfiles/MacroStabilityInwardsStochasticSoilModelTransformerTest.cs (.../MacroStabilityInwardsStochasticSoilModelTransformerTest.cs) (revision 1992d18b2bbb21978616eab455a1035cdf2ff397) @@ -81,7 +81,7 @@ } [Test] - public void Transform_StochasticSoilModelWithoutGeometry_ThrowsImportedDataException() + public void Transform_MinimumStochasticSoilModel_ThrowsImportedDataException() { // Setup var stochasticSoilModel = new StochasticSoilModel("name", FailureMechanismType.Stability); @@ -101,27 +101,6 @@ } [Test] - public void Transform_StochasticSoilModelWithoutStochasticSoilProfiles_ThrowsImportedDataException() - { - // Setup - StochasticSoilModel stochasticSoilModel = - MacroStabilityInwardsStochasticSoilModelTestFactory.CreateMacroStabilityInwardsStochasticSoilModelWithGeometry(Enumerable.Empty()); - - var transformer = new MacroStabilityInwardsStochasticSoilModelTransformer(); - - // Call - TestDelegate test = () => transformer.Transform(stochasticSoilModel); - - // Assert - var exception = Assert.Throws(test); - - Exception innerException = exception.InnerException; - Assert.IsNotNull(innerException); - Assert.IsInstanceOf(innerException); - Assert.AreEqual(innerException.Message, exception.Message); - } - - [Test] public void Transform_ValidStochasticSoilModelWithSoilProfile1D_ReturnsExpectedMacroStabilityInwardsStochasticSoilModel() { // Setup Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfiles/MacroStabilityInwardsStochasticSoilProfileTransformerTest.cs =================================================================== diff -u -r30baf70ea42def18e66d1ec3c71aa0e54a89229a -r1992d18b2bbb21978616eab455a1035cdf2ff397 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfiles/MacroStabilityInwardsStochasticSoilProfileTransformerTest.cs (.../MacroStabilityInwardsStochasticSoilProfileTransformerTest.cs) (revision 30baf70ea42def18e66d1ec3c71aa0e54a89229a) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfiles/MacroStabilityInwardsStochasticSoilProfileTransformerTest.cs (.../MacroStabilityInwardsStochasticSoilProfileTransformerTest.cs) (revision 1992d18b2bbb21978616eab455a1035cdf2ff397) @@ -70,18 +70,15 @@ } [Test] - [TestCase(double.NaN)] - [TestCase(1.1)] - [TestCase(-0.1)] - public void Transform_StochasticSoilProfileWithInvalidProbability_ThrowsImportedDataTransformException(double probability) + public void Transform_StochasticSoilProfileWithInvalidProbability_ThrowsImportedDataTransformException() { // Setup var mocks = new MockRepository(); var soilProfile = mocks.Stub(); var macroStabilityInwardsSoilProfile = mocks.Stub(); mocks.ReplayAll(); - var stochasticSoilProfile = new StochasticSoilProfile(probability, soilProfile); + var stochasticSoilProfile = new StochasticSoilProfile(double.NaN, soilProfile); // Call TestDelegate call = () => MacroStabilityInwardsStochasticSoilProfileTransformer.Transform(stochasticSoilProfile, macroStabilityInwardsSoilProfile); Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/FileImporter/MacroStabilityInwardsStochasticSoilModelUpdateDataStrategyTest.cs =================================================================== diff -u -rb13759ad077f9e2b4104de000b5bdeafa9abe358 -r1992d18b2bbb21978616eab455a1035cdf2ff397 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/FileImporter/MacroStabilityInwardsStochasticSoilModelUpdateDataStrategyTest.cs (.../MacroStabilityInwardsStochasticSoilModelUpdateDataStrategyTest.cs) (revision b13759ad077f9e2b4104de000b5bdeafa9abe358) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/FileImporter/MacroStabilityInwardsStochasticSoilModelUpdateDataStrategyTest.cs (.../MacroStabilityInwardsStochasticSoilModelUpdateDataStrategyTest.cs) (revision 1992d18b2bbb21978616eab455a1035cdf2ff397) @@ -385,9 +385,8 @@ // Setup const string modelsName = "same model"; - MacroStabilityInwardsStochasticSoilModel model = + MacroStabilityInwardsStochasticSoilModel existingModel = MacroStabilityInwardsStochasticSoilModelTestFactory.CreateValidStochasticSoilModel(modelsName, CreateStochasticSoilProfiles()); - MacroStabilityInwardsStochasticSoilModel existingModel = model; var failureMechanism = new MacroStabilityInwardsFailureMechanism(); MacroStabilityInwardsStochasticSoilModelCollection targetCollection = failureMechanism.StochasticSoilModels; Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/SoilProfiles/PipingSoilProfileTransformerTest.cs =================================================================== diff -u -re0ee945d52cc611d081c9a1412e92023a63f91c9 -r1992d18b2bbb21978616eab455a1035cdf2ff397 --- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/SoilProfiles/PipingSoilProfileTransformerTest.cs (.../PipingSoilProfileTransformerTest.cs) (revision e0ee945d52cc611d081c9a1412e92023a63f91c9) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/SoilProfiles/PipingSoilProfileTransformerTest.cs (.../PipingSoilProfileTransformerTest.cs) (revision 1992d18b2bbb21978616eab455a1035cdf2ff397) @@ -178,7 +178,7 @@ } [Test] - public void Transform_SoilProfile2DWithoutLayers_ThrowsImportedDataTransformException() + public void Transform_MinimumSoilProfile2D_ThrowsImportedDataTransformException() { // Setup var random = new Random(21); @@ -371,7 +371,7 @@ } [Test] - public void Transform_SoilProfile1DWithoutLayers_ThrowsImportedDataTransformException() + public void Transform_MinimumSoilProfile1D_ThrowsImportedDataTransformException() { // Setup const string profileName = "SomeProfile"; @@ -396,34 +396,6 @@ } [Test] - public void Transform_SoilProfileBottomAboveTop_ThrowsImportedDataTransformException() - { - // Setup - const string profileName = "SomeProfile"; - const double bottom = 10; - const double top = -10; - const long pipingSoilProfileId = 1234L; - - var profile = new SoilProfile1D(pipingSoilProfileId, - profileName, - bottom, - new[] - { - SoilLayer1DTestFactory.CreateSoilLayer1DWithValidAquifer(top) - }); - - // Call - TestDelegate call = () => PipingSoilProfileTransformer.Transform(profile); - - // Assert - var exception = Assert.Throws(call); - - Exception innerException = exception.InnerException; - Assert.IsInstanceOf(innerException); - Assert.AreEqual(innerException.Message, exception.Message); - } - - [Test] public void Transform_SoilProfile1DWithSingleLayer_ReturnsProfileWithBottomAndALayer() { // Setup Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/SoilProfiles/PipingStochasticSoilModelTransformerTest.cs =================================================================== diff -u -r30b4bd298c03a8c2162f5dd306d282453428c609 -r1992d18b2bbb21978616eab455a1035cdf2ff397 --- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/SoilProfiles/PipingStochasticSoilModelTransformerTest.cs (.../PipingStochasticSoilModelTransformerTest.cs) (revision 30b4bd298c03a8c2162f5dd306d282453428c609) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/SoilProfiles/PipingStochasticSoilModelTransformerTest.cs (.../PipingStochasticSoilModelTransformerTest.cs) (revision 1992d18b2bbb21978616eab455a1035cdf2ff397) @@ -123,7 +123,7 @@ } [Test] - public void Transform_StochasticSoilModelWithoutGeometry_ThrowsImportedDataException() + public void Transform_MinimumStochasticSoilModel_ThrowsImportedDataException() { // Setup var stochasticSoilModel = new StochasticSoilModel("name", FailureMechanismType.Piping); @@ -143,27 +143,6 @@ } [Test] - public void Transform_StochasticSoilModelWithoutStochasticSoilProfiles_ThrowsImportedDataException() - { - // Setup - StochasticSoilModel stochasticSoilModel = - PipingStochasticSoilModelTestFactory.CreatePipingStochasticSoilModelWithGeometry(Enumerable.Empty()); - - var transformer = new PipingStochasticSoilModelTransformer(); - - // Call - TestDelegate test = () => transformer.Transform(stochasticSoilModel); - - // Assert - var exception = Assert.Throws(test); - - Exception innerException = exception.InnerException; - Assert.IsNotNull(innerException); - Assert.IsInstanceOf(innerException); - Assert.AreEqual(innerException.Message, exception.Message); - } - - [Test] public void Transform_ValidStochasticSoilModelWithSoilProfile2D_ReturnsExpectedPipingStochasticSoilModel() { // Setup Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/SoilProfiles/PipingStochasticSoilProfileTransformerTest.cs =================================================================== diff -u -r30baf70ea42def18e66d1ec3c71aa0e54a89229a -r1992d18b2bbb21978616eab455a1035cdf2ff397 --- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/SoilProfiles/PipingStochasticSoilProfileTransformerTest.cs (.../PipingStochasticSoilProfileTransformerTest.cs) (revision 30baf70ea42def18e66d1ec3c71aa0e54a89229a) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/SoilProfiles/PipingStochasticSoilProfileTransformerTest.cs (.../PipingStochasticSoilProfileTransformerTest.cs) (revision 1992d18b2bbb21978616eab455a1035cdf2ff397) @@ -69,10 +69,7 @@ } [Test] - [TestCase(double.NaN)] - [TestCase(1.1)] - [TestCase(-0.1)] - public void Transform_StochasticSoilProfileWithInvalidProbability_ThrowsImportedDataTransformException(double probability) + public void Transform_StochasticSoilProfileWithInvalidProbability_ThrowsImportedDataTransformException() { // Setup var mocks = new MockRepository(); @@ -81,7 +78,7 @@ PipingSoilProfile pipingSoilProfile = PipingSoilProfileTestFactory.CreatePipingSoilProfile(); - var stochasticSoilProfile = new StochasticSoilProfile(probability, soilProfile); + var stochasticSoilProfile = new StochasticSoilProfile(double.NaN, soilProfile); // Call TestDelegate call = () => PipingStochasticSoilProfileTransformer.Transform(stochasticSoilProfile, pipingSoilProfile);