Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingStochasticSoilProfilePropertiesTest.cs =================================================================== diff -u -rc97c10b9f12175d0028b25f1c4971361afee76c9 -re8826cf67487baaa5f8b8f2e5d685a763104cd26 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingStochasticSoilProfilePropertiesTest.cs (.../PipingStochasticSoilProfilePropertiesTest.cs) (revision c97c10b9f12175d0028b25f1c4971361afee76c9) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingStochasticSoilProfilePropertiesTest.cs (.../PipingStochasticSoilProfilePropertiesTest.cs) (revision e8826cf67487baaa5f8b8f2e5d685a763104cd26) @@ -68,17 +68,40 @@ } [Test] - [SetCulture("nl-NL")] - public void GetProperties_WithDataAndDutchLocale_ReturnExpectedValues() + public void GetProperties_WithData_ReturnExpectedValues() { - GetProperties_WithData_ReturnExpectedValues(0.54321); - } + // Setup + var random = new Random(21); + var layerOne = new PipingSoilLayer(-2); + var layerTwo = new PipingSoilLayer(-4); - [Test] - [SetCulture("en-US")] - public void GetProperties_WithDataAndEnglishLocale_ReturnExpectedValues() - { - GetProperties_WithData_ReturnExpectedValues(0.54321); + IEnumerable layers = new[] + { + layerOne, + layerTwo + }; + + const double probability = 0.54321; + + var soilProfileType = random.NextEnumValue(); + var soilProfile = new PipingSoilProfile("", -5.0, layers, soilProfileType); + var stochasticSoilProfile = new PipingStochasticSoilProfile(probability, soilProfile); + + // Call + var properties = new PipingStochasticSoilProfileProperties(stochasticSoilProfile); + + // Assert + Assert.AreEqual(soilProfile.Name, properties.Name); + Assert.AreEqual(soilProfile.Name, properties.ToString()); + + Assert.AreEqual(2, properties.Layers.Length); + Assert.AreSame(layerOne, properties.Layers[0].Data); + Assert.AreSame(layerTwo, properties.Layers[1].Data); + + Assert.AreEqual(soilProfile.Bottom, properties.Bottom); + Assert.AreEqual(2, properties.Probability.NumberOfDecimalPlaces); + Assert.AreEqual(probability * 100, properties.Probability, properties.Probability.GetAccuracy()); + Assert.AreEqual(soilProfileType, properties.Type); } [Test] @@ -133,38 +156,5 @@ "Het type van de ondergrondschematisatie.", true); } - - private static void GetProperties_WithData_ReturnExpectedValues(double probability) - { - // Setup - var random = new Random(21); - var layerOne = new PipingSoilLayer(-2); - var layerTwo = new PipingSoilLayer(-4); - - IEnumerable layers = new[] - { - layerOne, - layerTwo - }; - - var soilProfileType = random.NextEnumValue(); - var soilProfile = new PipingSoilProfile("", -5.0, layers, soilProfileType); - var stochasticSoilProfile = new PipingStochasticSoilProfile(probability, soilProfile); - - // Call - var properties = new PipingStochasticSoilProfileProperties(stochasticSoilProfile); - - // Assert - Assert.AreEqual(soilProfile.Name, properties.Name); - Assert.AreEqual(soilProfile.Name, properties.ToString()); - Assert.AreEqual(2, properties.Layers.Length); - Assert.AreSame(layerOne, properties.Layers[0].Data); - Assert.AreSame(layerTwo, properties.Layers[1].Data); - - Assert.AreEqual(soilProfile.Bottom, properties.Bottom); - Assert.AreEqual(2, properties.Probability.NumberOfDecimalPlaces); - Assert.AreEqual(probability * 100, properties.Probability, properties.Probability.GetAccuracy()); - Assert.AreEqual(soilProfileType, properties.Type); - } } } \ No newline at end of file