Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsInputContextPropertiesTest.cs =================================================================== diff -u -r39a23ed506dae102d10481951067c380408c7335 -r25c94cb9fb71365a0bf91e4e755736dfcb8cfae1 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsInputContextPropertiesTest.cs (.../MacroStabilityInwardsInputContextPropertiesTest.cs) (revision 39a23ed506dae102d10481951067c380408c7335) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsInputContextPropertiesTest.cs (.../MacroStabilityInwardsInputContextPropertiesTest.cs) (revision 25c94cb9fb71365a0bf91e4e755736dfcb8cfae1) @@ -75,7 +75,7 @@ mocks.ReplayAll(); // Call - TestDelegate test = () => new MacroStabilityInwardsInputContextProperties(null, handler); + TestDelegate test = () => new MacroStabilityInwardsInputContextProperties(null, GetCalculatedTestAssessmentLevel, handler); // Assert var exception = Assert.Throws(test); @@ -84,11 +84,12 @@ } [Test] - public void Constructor_HandlerNull_ThrowArgumentNullException() + public void Constructor_GetAssessmentLevelFuncNull_ThrowArgumentNullException() { // Setup var mocks = new MockRepository(); var assessmentSection = mocks.Stub(); + var handler = mocks.Stub(); mocks.ReplayAll(); var calculationItem = new MacroStabilityInwardsCalculationScenario(); @@ -102,15 +103,42 @@ assessmentSection); // Call - TestDelegate test = () => new MacroStabilityInwardsInputContextProperties(context, null); + TestDelegate test = () => new MacroStabilityInwardsInputContextProperties(context, null, handler); // Assert var exception = Assert.Throws(test); - Assert.AreEqual("handler", exception.ParamName); + Assert.AreEqual("getNormativeAssessmentLevelFunc", exception.ParamName); mocks.VerifyAll(); } [Test] + public void Constructor_PropertyChangeHandlerNull_ThrowArgumentNullException() + { + // Setup + var mocks = new MockRepository(); + var assessmentSection = mocks.Stub(); + mocks.ReplayAll(); + + var calculationItem = new MacroStabilityInwardsCalculationScenario(); + var failureMechanism = new MacroStabilityInwardsFailureMechanism(); + + var context = new MacroStabilityInwardsInputContext(calculationItem.InputParameters, + calculationItem, + Enumerable.Empty(), + Enumerable.Empty(), + failureMechanism, + assessmentSection); + + // Call + TestDelegate test = () => new MacroStabilityInwardsInputContextProperties(context, GetCalculatedTestAssessmentLevel, null); + + // Assert + var exception = Assert.Throws(test); + Assert.AreEqual("propertyChangeHandler", exception.ParamName); + mocks.VerifyAll(); + } + + [Test] public void Constructor_WithParameters_ExpectedValues() { var mocks = new MockRepository(); @@ -129,7 +157,7 @@ assessmentSection); // Call - var properties = new MacroStabilityInwardsInputContextProperties(context, handler); + var properties = new MacroStabilityInwardsInputContextProperties(context, GetCalculatedTestAssessmentLevel, handler); // Assert Assert.IsInstanceOf>(properties); @@ -159,7 +187,7 @@ var handler = new ObservablePropertyChangeHandler(calculationItem, calculationItem.InputParameters); // Call - var properties = new MacroStabilityInwardsInputContextProperties(context, handler) + var properties = new MacroStabilityInwardsInputContextProperties(context, GetCalculatedTestAssessmentLevel, handler) { UseAssessmentLevelManualInput = false }; @@ -302,7 +330,7 @@ var handler = new ObservablePropertyChangeHandler(calculationItem, calculationItem.InputParameters); // Call - var properties = new MacroStabilityInwardsInputContextProperties(context, handler) + var properties = new MacroStabilityInwardsInputContextProperties(context, GetCalculatedTestAssessmentLevel, handler) { UseAssessmentLevelManualInput = useManualAssessmentLevelInput }; @@ -346,7 +374,9 @@ } [Test] - public void GetProperties_WithData_ReturnExpectedValues() + [TestCase(true)] + [TestCase(false)] + public void GetProperties_WithData_ReturnExpectedValues(bool useManualAssessmentLevelInput) { // Setup var mocks = new MockRepository(); @@ -380,11 +410,11 @@ { InputParameters = { + UseAssessmentLevelManualInput = useManualAssessmentLevelInput, HydraulicBoundaryLocation = testHydraulicBoundaryLocation, SurfaceLine = surfaceLine, StochasticSoilModel = stochasticSoilModel, - StochasticSoilProfile = stochasticSoilProfile, - UseAssessmentLevelManualInput = false + StochasticSoilProfile = stochasticSoilProfile } }; MacroStabilityInwardsInput inputParameters = calculationItem.InputParameters; @@ -398,16 +428,19 @@ assessmentSection); // Call - var properties = new MacroStabilityInwardsInputContextProperties(context, handler); + var properties = new MacroStabilityInwardsInputContextProperties(context, GetCalculatedTestAssessmentLevel, handler); // Assert - Assert.AreEqual(inputParameters.AssessmentLevel, properties.AssessmentLevel); + RoundedDouble expectedAssessmentLevel = useManualAssessmentLevelInput + ? inputParameters.AssessmentLevel + : GetCalculatedTestAssessmentLevel(); + Assert.AreEqual(expectedAssessmentLevel, properties.AssessmentLevel); + Assert.AreSame(testHydraulicBoundaryLocation, properties.SelectedHydraulicBoundaryLocation.HydraulicBoundaryLocation); + Assert.AreEqual(inputParameters.UseAssessmentLevelManualInput, properties.UseAssessmentLevelManualInput); + Assert.AreSame(surfaceLine, properties.SurfaceLine); Assert.AreSame(stochasticSoilProfile, properties.StochasticSoilProfile); Assert.AreSame(stochasticSoilModel, properties.StochasticSoilModel); - Assert.AreSame(testHydraulicBoundaryLocation, properties.SelectedHydraulicBoundaryLocation.HydraulicBoundaryLocation); - - Assert.AreEqual(inputParameters.UseAssessmentLevelManualInput, properties.UseAssessmentLevelManualInput); Assert.AreEqual(inputParameters.DikeSoilScenario, properties.DikeSoilScenario); Assert.AreSame(inputParameters, properties.WaterStressesProperties.Data); @@ -444,7 +477,7 @@ assessmentSection); var handler = new ObservablePropertyChangeHandler(calculationItem, calculationItem.InputParameters); - var properties = new MacroStabilityInwardsInputContextProperties(context, handler); + var properties = new MacroStabilityInwardsInputContextProperties(context, GetCalculatedTestAssessmentLevel, handler); var random = new Random(21); const double assessmentLevel = 0.36; @@ -457,7 +490,6 @@ double maximumSliceWidth = random.NextDouble(); // When - properties.UseAssessmentLevelManualInput = true; properties.AssessmentLevel = (RoundedDouble) assessmentLevel; properties.SurfaceLine = surfaceLine; properties.StochasticSoilModel = soilModel; @@ -517,13 +549,7 @@ { // Setup RoundedDouble newAssessmentLevel = new Random(21).NextRoundedDouble(); - var calculation = new MacroStabilityInwardsCalculationScenario - { - InputParameters = - { - UseAssessmentLevelManualInput = true - } - }; + var calculation = new MacroStabilityInwardsCalculationScenario(); // Call & Assert SetPropertyAndVerifyNotificationsForCalculation(properties => properties.AssessmentLevel = newAssessmentLevel, calculation); @@ -541,6 +567,17 @@ } [Test] + public void SelectedHydraulicBoundaryLocation_SetValidValue_SetsValueAndUpdatesObservers() + { + // Setup + var calculation = new MacroStabilityInwardsCalculationScenario(); + + // Call & Assert + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.SelectedHydraulicBoundaryLocation = new SelectableHydraulicBoundaryLocation(new TestHydraulicBoundaryLocation(), null), + calculation); + } + + [Test] public void DikeSoilScenario_SetNewValue_SetsValuesAndUpdatesObservers() { // Setup @@ -586,225 +623,6 @@ } [Test] - public void HydraulicBoundaryLocation_DesignWaterLevelIsNaN_AssessmentLevelSetToNaN() - { - // Setup - var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); - var observable = mocks.StrictMock(); - observable.Expect(o => o.NotifyObservers()); - mocks.ReplayAll(); - - var calculationItem = new MacroStabilityInwardsCalculationScenario(); - var failureMechanism = new MacroStabilityInwardsFailureMechanism(); - - var hydraulicBoundaryLocation = new TestHydraulicBoundaryLocation(); - var selectableHydraulicBoundaryLocation = new SelectableHydraulicBoundaryLocation(hydraulicBoundaryLocation, null); - - var context = new MacroStabilityInwardsInputContext(calculationItem.InputParameters, - calculationItem, - Enumerable.Empty(), - Enumerable.Empty(), - failureMechanism, - assessmentSection); - - var handler = new SetPropertyValueAfterConfirmationParameterTester(new[] - { - observable - }); - - var properties = new MacroStabilityInwardsInputContextProperties(context, handler); - - // Call - properties.SelectedHydraulicBoundaryLocation = selectableHydraulicBoundaryLocation; - - // Assert - Assert.IsNaN(properties.AssessmentLevel.Value); - mocks.VerifyAll(); - } - - [Test] - public void HydraulicBoundaryLocation_DesignWaterLevelSet_SetsAssessmentLevelToDesignWaterLevelAndNotifiesOnce() - { - // Setup - var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); - var observable = mocks.StrictMock(); - observable.Expect(o => o.NotifyObservers()); - mocks.ReplayAll(); - - var failureMechanism = new MacroStabilityInwardsFailureMechanism(); - - var calculationItem = new MacroStabilityInwardsCalculationScenario(); - var testLevel = (RoundedDouble) new Random(21).NextDouble(); - HydraulicBoundaryLocation hydraulicBoundaryLocation = TestHydraulicBoundaryLocation.CreateDesignWaterLevelCalculated( - testLevel); - var selectableHydraulicBoundaryLocation = new SelectableHydraulicBoundaryLocation(hydraulicBoundaryLocation, null); - - var context = new MacroStabilityInwardsInputContext(calculationItem.InputParameters, - calculationItem, - Enumerable.Empty(), - Enumerable.Empty(), - failureMechanism, - assessmentSection); - - var handler = new SetPropertyValueAfterConfirmationParameterTester(new[] - { - observable - }); - - var properties = new MacroStabilityInwardsInputContextProperties(context, handler); - - // Call - properties.SelectedHydraulicBoundaryLocation = selectableHydraulicBoundaryLocation; - - // Assert - Assert.AreEqual(testLevel, properties.AssessmentLevel, properties.AssessmentLevel.GetAccuracy()); - - mocks.VerifyAll(); - } - - [Test] - public void GivenHydraulicBoundaryLocationAndUseHydraulicBoundaryLocation_WhenUnuseLocationAndSetNewAssessmentLevel_UpdateAssessmentLevelAndRemovesLocation() - { - // Given - var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); - mocks.ReplayAll(); - - var calculationItem = new MacroStabilityInwardsCalculationScenario(); - var failureMechanism = new MacroStabilityInwardsFailureMechanism(); - - var random = new Random(21); - var inputParameters = new MacroStabilityInwardsInput(new MacroStabilityInwardsInput.ConstructionProperties()) - { - HydraulicBoundaryLocation = TestHydraulicBoundaryLocation.CreateDesignWaterLevelCalculated(50) - }; - - var context = new MacroStabilityInwardsInputContext(inputParameters, - calculationItem, - Enumerable.Empty(), - Enumerable.Empty(), - failureMechanism, - assessmentSection); - - var handler = new ObservablePropertyChangeHandler(calculationItem, calculationItem.InputParameters); - - var properties = new MacroStabilityInwardsInputContextProperties(context, handler) - { - UseAssessmentLevelManualInput = false - }; - - var testLevel = (RoundedDouble) random.NextDouble(); - - // When - properties.UseAssessmentLevelManualInput = true; - properties.AssessmentLevel = testLevel; - - // Then - Assert.AreEqual(2, properties.AssessmentLevel.NumberOfDecimalPlaces); - Assert.AreEqual(testLevel, properties.AssessmentLevel, properties.AssessmentLevel.GetAccuracy()); - Assert.IsNull(properties.SelectedHydraulicBoundaryLocation); - - mocks.VerifyAll(); - } - - [Test] - [TestCase(double.NegativeInfinity)] - [TestCase(double.PositiveInfinity)] - [TestCase(double.NaN)] - [TestCase(1234)] - public void AssessmentLevel_SetNewValue_UpdateDataAndNotifyObservers(double testLevel) - { - // Setup - var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); - var observable = mocks.StrictMock(); - observable.Expect(o => o.NotifyObservers()); - mocks.ReplayAll(); - - var calculationItem = new MacroStabilityInwardsCalculationScenario - { - InputParameters = - { - UseAssessmentLevelManualInput = true - } - }; - var failureMechanism = new MacroStabilityInwardsFailureMechanism(); - - var context = new MacroStabilityInwardsInputContext(calculationItem.InputParameters, - calculationItem, - Enumerable.Empty(), - Enumerable.Empty(), - failureMechanism, - assessmentSection); - - var handler = new SetPropertyValueAfterConfirmationParameterTester(new[] - { - observable - }); - - var properties = new MacroStabilityInwardsInputContextProperties(context, handler); - - // Call - properties.AssessmentLevel = (RoundedDouble) testLevel; - - // Assert - Assert.AreEqual(2, properties.AssessmentLevel.NumberOfDecimalPlaces); - Assert.AreEqual(testLevel, properties.AssessmentLevel, properties.AssessmentLevel.GetAccuracy()); - Assert.IsTrue(handler.Called); - - mocks.VerifyAll(); - } - - [Test] - public void GivenAssessmentLevelSetWithoutHydraulicBoundaryLocation_WhenUseAndSetNewLocation_UpdateAssessmentLevelWithLocationValues() - { - // Given - var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); - mocks.ReplayAll(); - - var random = new Random(21); - var calculationItem = new MacroStabilityInwardsCalculationScenario - { - InputParameters = - { - UseAssessmentLevelManualInput = true, - AssessmentLevel = (RoundedDouble) random.NextDouble() - } - }; - var failureMechanism = new MacroStabilityInwardsFailureMechanism(); - - var context = new MacroStabilityInwardsInputContext(calculationItem.InputParameters, - calculationItem, - Enumerable.Empty(), - Enumerable.Empty(), - failureMechanism, - assessmentSection); - - var handler = new ObservablePropertyChangeHandler(calculationItem, calculationItem.InputParameters); - - var properties = new MacroStabilityInwardsInputContextProperties(context, handler); - - var testLevel = (RoundedDouble) random.NextDouble(); - HydraulicBoundaryLocation hydraulicBoundaryLocation = TestHydraulicBoundaryLocation.CreateDesignWaterLevelCalculated( - testLevel); - var selectableHydraulicBoundaryLocation = new SelectableHydraulicBoundaryLocation(hydraulicBoundaryLocation, null); - - // When - properties.UseAssessmentLevelManualInput = false; - properties.SelectedHydraulicBoundaryLocation = selectableHydraulicBoundaryLocation; - - // Then - Assert.AreEqual(2, properties.AssessmentLevel.NumberOfDecimalPlaces); - Assert.AreSame(hydraulicBoundaryLocation, properties.SelectedHydraulicBoundaryLocation.HydraulicBoundaryLocation); - Assert.AreEqual(testLevel, properties.AssessmentLevel, properties.AssessmentLevel.GetAccuracy()); - - mocks.VerifyAll(); - } - - [Test] public void SurfaceLine_NewSurfaceLine_StochasticSoilModelAndSoilProfileSetToNull() { // Setup @@ -834,7 +652,7 @@ var handler = new SetPropertyValueAfterConfirmationParameterTester(new IObservable[0]); - var properties = new MacroStabilityInwardsInputContextProperties(context, handler); + var properties = new MacroStabilityInwardsInputContextProperties(context, GetCalculatedTestAssessmentLevel, handler); MacroStabilityInwardsSoilProfile1D soilProfile = MacroStabilityInwardsSoilProfile1DTestFactory.CreateMacroStabilityInwardsSoilProfile1D(); inputParameters.StochasticSoilProfile = new MacroStabilityInwardsStochasticSoilProfile(0.0, soilProfile); @@ -888,7 +706,7 @@ failureMechanism, assessmentSection); - var properties = new MacroStabilityInwardsInputContextProperties(context, handler); + var properties = new MacroStabilityInwardsInputContextProperties(context, GetCalculatedTestAssessmentLevel, handler); // Call properties.SurfaceLine = testSurfaceLine; @@ -942,7 +760,7 @@ var handler = new SetPropertyValueAfterConfirmationParameterTester(new IObservable[0]); - var properties = new MacroStabilityInwardsInputContextProperties(context, handler); + var properties = new MacroStabilityInwardsInputContextProperties(context, GetCalculatedTestAssessmentLevel, handler); // Call properties.SurfaceLine = newSurfaceLine; @@ -1007,7 +825,7 @@ observable }); - var properties = new MacroStabilityInwardsInputContextProperties(context, handler); + var properties = new MacroStabilityInwardsInputContextProperties(context, GetCalculatedTestAssessmentLevel, handler); // Call properties.StochasticSoilModel = stochasticSoilModel2; @@ -1031,7 +849,7 @@ var context = new MacroStabilityInwardsInputContext(calculation.InputParameters, calculation, failureMechanism.SurfaceLines, failureMechanism.StochasticSoilModels, failureMechanism, assessmentSection); - var properties = new MacroStabilityInwardsInputContextProperties(context, handler); + var properties = new MacroStabilityInwardsInputContextProperties(context, GetCalculatedTestAssessmentLevel, handler); // Call IEnumerable surfaceLines = properties.GetAvailableSurfaceLines(); @@ -1055,7 +873,7 @@ var context = new MacroStabilityInwardsInputContext(calculation.InputParameters, calculation, failureMechanism.SurfaceLines, failureMechanism.StochasticSoilModels, failureMechanism, assessmentSection); - var properties = new MacroStabilityInwardsInputContextProperties(context, handler); + var properties = new MacroStabilityInwardsInputContextProperties(context, GetCalculatedTestAssessmentLevel, handler); // Precondition: Assert.IsNull(calculation.InputParameters.SurfaceLine); @@ -1125,7 +943,7 @@ var context = new MacroStabilityInwardsInputContext(calculation.InputParameters, calculation, failureMechanism.SurfaceLines, failureMechanism.StochasticSoilModels, failureMechanism, assessmentSection); - var properties = new MacroStabilityInwardsInputContextProperties(context, handler); + var properties = new MacroStabilityInwardsInputContextProperties(context, GetCalculatedTestAssessmentLevel, handler); // Precondition: Assert.IsNotNull(calculation.InputParameters.SurfaceLine); @@ -1156,7 +974,7 @@ var context = new MacroStabilityInwardsInputContext(calculation.InputParameters, calculation, failureMechanism.SurfaceLines, failureMechanism.StochasticSoilModels, failureMechanism, assessmentSection); - var properties = new MacroStabilityInwardsInputContextProperties(context, handler); + var properties = new MacroStabilityInwardsInputContextProperties(context, GetCalculatedTestAssessmentLevel, handler); // Precondition Assert.IsNull(calculation.InputParameters.StochasticSoilModel); @@ -1195,7 +1013,7 @@ var context = new MacroStabilityInwardsInputContext(calculation.InputParameters, calculation, failureMechanism.SurfaceLines, failureMechanism.StochasticSoilModels, failureMechanism, assessmentSection); - var properties = new MacroStabilityInwardsInputContextProperties(context, handler); + var properties = new MacroStabilityInwardsInputContextProperties(context, GetCalculatedTestAssessmentLevel, handler); // Precondition Assert.IsNotNull(calculation.InputParameters.StochasticSoilModel); @@ -1222,7 +1040,7 @@ var context = new MacroStabilityInwardsInputContext(calculation.InputParameters, calculation, failureMechanism.SurfaceLines, failureMechanism.StochasticSoilModels, failureMechanism, assessmentSection); - var properties = new MacroStabilityInwardsInputContextProperties(context, handler); + var properties = new MacroStabilityInwardsInputContextProperties(context, GetCalculatedTestAssessmentLevel, handler); SelectableHydraulicBoundaryLocation selectedHydraulicBoundaryLocation = null; @@ -1272,7 +1090,7 @@ failureMechanism.SurfaceLines, failureMechanism.StochasticSoilModels, failureMechanism, assessmentSection); - var properties = new MacroStabilityInwardsInputContextProperties(context, handler); + var properties = new MacroStabilityInwardsInputContextProperties(context, GetCalculatedTestAssessmentLevel, handler); // When IEnumerable availableHydraulicBoundaryLocations = @@ -1314,7 +1132,7 @@ var context = new MacroStabilityInwardsInputContext(calculation.InputParameters, calculation, failureMechanism.SurfaceLines, failureMechanism.StochasticSoilModels, failureMechanism, assessmentSection); - var properties = new MacroStabilityInwardsInputContextProperties(context, handler); + var properties = new MacroStabilityInwardsInputContextProperties(context, GetCalculatedTestAssessmentLevel, handler); // Call IEnumerable selectableHydraulicBoundaryLocations = @@ -1366,7 +1184,7 @@ var context = new MacroStabilityInwardsInputContext(calculation.InputParameters, calculation, failureMechanism.SurfaceLines, failureMechanism.StochasticSoilModels, failureMechanism, assessmentSection); - var properties = new MacroStabilityInwardsInputContextProperties(context, handler); + var properties = new MacroStabilityInwardsInputContextProperties(context, GetCalculatedTestAssessmentLevel, handler); // Call IEnumerable selectableHydraulicBoundaryLocations = @@ -1431,7 +1249,7 @@ observable }); - var properties = new MacroStabilityInwardsInputContextProperties(context, handler); + var properties = new MacroStabilityInwardsInputContextProperties(context, GetCalculatedTestAssessmentLevel, handler); IEnumerable originalList = properties.GetSelectableHydraulicBoundaryLocations() .ToList(); @@ -1481,7 +1299,7 @@ Enumerable.Empty(), failureMechanism, assessmentSection); - var properties = new MacroStabilityInwardsInputContextProperties(context, handler); + var properties = new MacroStabilityInwardsInputContextProperties(context, GetCalculatedTestAssessmentLevel, handler); // Call bool result = properties.DynamicReadOnlyValidationMethod("AssessmentLevel"); @@ -1508,7 +1326,7 @@ Enumerable.Empty(), failureMechanism, assessmentSection); - var properties = new MacroStabilityInwardsInputContextProperties(context, handler); + var properties = new MacroStabilityInwardsInputContextProperties(context, GetCalculatedTestAssessmentLevel, handler); // Call bool result = properties.DynamicReadOnlyValidationMethod("prop"); @@ -1544,7 +1362,7 @@ Enumerable.Empty(), failureMechanism, assessmentSection); - var properties = new MacroStabilityInwardsInputContextProperties(context, handler); + var properties = new MacroStabilityInwardsInputContextProperties(context, GetCalculatedTestAssessmentLevel, handler); // Call bool result = properties.DynamicVisibleValidationMethod("SelectedHydraulicBoundaryLocation"); @@ -1571,7 +1389,7 @@ Enumerable.Empty(), failureMechanism, assessmentSection); - var properties = new MacroStabilityInwardsInputContextProperties(context, handler); + var properties = new MacroStabilityInwardsInputContextProperties(context, GetCalculatedTestAssessmentLevel, handler); // Call bool result = properties.DynamicVisibleValidationMethod("prop"); @@ -1607,7 +1425,7 @@ observable }); - var properties = new MacroStabilityInwardsInputContextProperties(context, handler); + var properties = new MacroStabilityInwardsInputContextProperties(context, GetCalculatedTestAssessmentLevel, handler); // Call setProperty(properties); @@ -1617,6 +1435,11 @@ mocks.VerifyAll(); } + private static RoundedDouble GetCalculatedTestAssessmentLevel() + { + return (RoundedDouble) 1.1; + } + private static MacroStabilityInwardsStochasticSoilModel ValidStochasticSoilModel(double xMin, double xMax) { MacroStabilityInwardsSoilProfile1D soilProfile = MacroStabilityInwardsSoilProfile1DTestFactory.CreateMacroStabilityInwardsSoilProfile1D();