Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingInputContextPropertiesTest.cs
===================================================================
diff -u -ra9aafffab97152303562110b1d789bacb465ce24 -rcda9bb0707f49cfb8e685d3ec04da01240c73f26
--- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingInputContextPropertiesTest.cs (.../PipingInputContextPropertiesTest.cs) (revision a9aafffab97152303562110b1d789bacb465ce24)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingInputContextPropertiesTest.cs (.../PipingInputContextPropertiesTest.cs) (revision cda9bb0707f49cfb8e685d3ec04da01240c73f26)
@@ -1,4 +1,25 @@
-using System;
+// Copyright (C) Stichting Deltares 2016. 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 System;
using System.ComponentModel;
using System.Linq;
using Core.Common.Base;
@@ -56,13 +77,17 @@
}
}, SoilProfileType.SoilProfile1D, 0)
};
+ StochasticSoilModel stochasticSoilModel = new StochasticSoilModel(0, "StochasticSoilModelName", "StochasticSoilModelSegmentName");
+ stochasticSoilModel.StochasticSoilProfiles.Add(stochasticSoilProfile);
+
var testHydraulicBoundaryLocation = new TestHydraulicBoundaryLocation(0.0);
var inputParameters = new PipingInput(new GeneralPipingInput())
{
HydraulicBoundaryLocation = testHydraulicBoundaryLocation
};
inputParameters.SurfaceLine = surfaceLine;
+ inputParameters.StochasticSoilModel = stochasticSoilModel;
inputParameters.StochasticSoilProfile = (stochasticSoilProfile);
var properties = new PipingInputContextProperties
@@ -94,6 +119,7 @@
Assert.AreSame(surfaceLine, properties.SurfaceLine);
Assert.AreSame(stochasticSoilProfile, properties.StochasticSoilProfile);
+ Assert.AreSame(stochasticSoilModel, properties.StochasticSoilModel);
Assert.AreSame(testHydraulicBoundaryLocation, properties.HydraulicBoundaryLocation);
mocks.ReplayAll();
@@ -137,7 +163,7 @@
var mocks = new MockRepository();
var assessmentSectionMock = mocks.StrictMock();
var projectObserver = mocks.StrictMock();
- int numberProperties = 8;
+ int numberProperties = 9;
projectObserver.Expect(o => o.UpdateObserver()).Repeat.Times(numberProperties);
mocks.ReplayAll();
@@ -159,6 +185,8 @@
{
SoilProfile = new TestPipingSoilProfile()
};
+ StochasticSoilModel stochasticSoilModel = new StochasticSoilModel(0, "StochasticSoilModelName", "StochasticSoilModelSegmentName");
+ stochasticSoilModel.StochasticSoilProfiles.Add(stochasticSoilProfile);
// Call
new PipingInputContextProperties
@@ -173,6 +201,7 @@
DarcyPermeability = new LognormalDistributionDesignVariable(darcyPermeability),
SaturatedVolumicWeightOfCoverageLayer = new ShiftedLognormalDistributionDesignVariable(saturatedVolumicWeightOfCoverageLoayer),
SurfaceLine = surfaceLine,
+ StochasticSoilModel = stochasticSoilModel,
StochasticSoilProfile = stochasticSoilProfile,
HydraulicBoundaryLocation = new TestHydraulicBoundaryLocation(assessmentLevel)
};
@@ -208,6 +237,7 @@
inputParameters.SaturatedVolumicWeightOfCoverageLayer.GetAccuracy());
Assert.AreEqual(surfaceLine, inputParameters.SurfaceLine);
+ Assert.AreEqual(stochasticSoilModel, inputParameters.StochasticSoilModel);
Assert.AreEqual(stochasticSoilProfile, inputParameters.StochasticSoilProfile);
mocks.VerifyAll();