Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Structures/StructuresInputBaseTest.cs
===================================================================
diff -u -r898d42ca6354285169751f4de231f96f40b1f6f9 -r6582cffcc14571ddb78265e95a9da39785cc58cf
--- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Structures/StructuresInputBaseTest.cs (.../StructuresInputBaseTest.cs) (revision 898d42ca6354285169751f4de231f96f40b1f6f9)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Structures/StructuresInputBaseTest.cs (.../StructuresInputBaseTest.cs) (revision 6582cffcc14571ddb78265e95a9da39785cc58cf)
@@ -290,7 +290,7 @@
Structure = new TestStructure()
};
- CloneTestHelper.SetRandomDataToStructuresInput(original);
+ CommonTestDataGenerator.SetRandomDataToStructuresInput(original);
// Call
object clone = original.Clone();
Fisheye: Tag 6582cffcc14571ddb78265e95a9da39785cc58cf refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/CloneTestHelper.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/CommonTestDataGenerator.cs
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/CommonTestDataGenerator.cs (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/CommonTestDataGenerator.cs (revision 6582cffcc14571ddb78265e95a9da39785cc58cf)
@@ -0,0 +1,95 @@
+// Copyright (C) Stichting Deltares 2017. 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 Core.Common.TestUtil;
+using Ringtoets.Common.Data.DikeProfiles;
+using Ringtoets.Common.Data.Probabilistics;
+using Ringtoets.Common.Data.Structures;
+
+namespace Ringtoets.Common.Data.TestUtil
+{
+ ///
+ /// Class responsible for generating test data configurations.
+ ///
+ public static class CommonTestDataGenerator
+ {
+ ///
+ /// This method sets some random data values to .
+ ///
+ /// The type of structure contained by the input.
+ /// The input object to set the random data values to.
+ public static void SetRandomDataToStructuresInput(StructuresInputBase input) where T : StructureBase
+ {
+ var random = new Random(21);
+
+ input.ModelFactorSuperCriticalFlow = new NormalDistribution
+ {
+ Mean = random.NextRoundedDouble()
+ };
+
+ input.AllowedLevelIncreaseStorage = new LogNormalDistribution
+ {
+ Mean = random.NextRoundedDouble(),
+ StandardDeviation = random.NextRoundedDouble()
+ };
+
+ input.StorageStructureArea = new VariationCoefficientLogNormalDistribution
+ {
+ Mean = random.NextRoundedDouble(),
+ CoefficientOfVariation = random.NextRoundedDouble()
+ };
+
+ input.FlowWidthAtBottomProtection = new LogNormalDistribution
+ {
+ Mean = random.NextRoundedDouble(),
+ StandardDeviation = random.NextRoundedDouble()
+ };
+
+ input.CriticalOvertoppingDischarge = new VariationCoefficientLogNormalDistribution
+ {
+ Mean = random.NextRoundedDouble(),
+ CoefficientOfVariation = random.NextRoundedDouble()
+ };
+
+ input.WidthFlowApertures = new NormalDistribution
+ {
+ Mean = random.NextRoundedDouble(),
+ StandardDeviation = random.NextRoundedDouble()
+ };
+
+ input.StormDuration = new VariationCoefficientLogNormalDistribution
+ {
+ Mean = random.NextRoundedDouble()
+ };
+
+ input.StructureNormalOrientation = random.NextRoundedDouble();
+ input.FailureProbabilityStructureWithErosion = random.NextDouble();
+ input.ForeshoreProfile = new TestForeshoreProfile();
+ input.ShouldIllustrationPointsBeCalculated = random.NextBoolean();
+ input.HydraulicBoundaryLocation = new TestHydraulicBoundaryLocation();
+ input.UseBreakWater = random.NextBoolean();
+ input.BreakWater.Type = random.NextEnumValue();
+ input.BreakWater.Height = random.NextRoundedDouble();
+ input.UseForeshore = random.NextBoolean();
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/Ringtoets.Common.Data.TestUtil.csproj
===================================================================
diff -u -r898d42ca6354285169751f4de231f96f40b1f6f9 -r6582cffcc14571ddb78265e95a9da39785cc58cf
--- Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/Ringtoets.Common.Data.TestUtil.csproj (.../Ringtoets.Common.Data.TestUtil.csproj) (revision 898d42ca6354285169751f4de231f96f40b1f6f9)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/Ringtoets.Common.Data.TestUtil.csproj (.../Ringtoets.Common.Data.TestUtil.csproj) (revision 6582cffcc14571ddb78265e95a9da39785cc58cf)
@@ -57,7 +57,7 @@
-
+
Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresInputTest.cs
===================================================================
diff -u -r898d42ca6354285169751f4de231f96f40b1f6f9 -r6582cffcc14571ddb78265e95a9da39785cc58cf
--- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresInputTest.cs (.../HeightStructuresInputTest.cs) (revision 898d42ca6354285169751f4de231f96f40b1f6f9)
+++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresInputTest.cs (.../HeightStructuresInputTest.cs) (revision 6582cffcc14571ddb78265e95a9da39785cc58cf)
@@ -257,7 +257,7 @@
DeviationWaveDirection = random.NextRoundedDouble()
};
- CloneTestHelper.SetRandomDataToStructuresInput(original);
+ CommonTestDataGenerator.SetRandomDataToStructuresInput(original);
// Call
object clone = original.Clone();