Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresInputTest.cs
===================================================================
diff -u -r6582cffcc14571ddb78265e95a9da39785cc58cf -rd5e85f2275fe1ed39438aebb69eb04ee03610832
--- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresInputTest.cs (.../HeightStructuresInputTest.cs) (revision 6582cffcc14571ddb78265e95a9da39785cc58cf)
+++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresInputTest.cs (.../HeightStructuresInputTest.cs) (revision d5e85f2275fe1ed39438aebb69eb04ee03610832)
@@ -245,20 +245,8 @@
public void Clone_Always_ReturnNewInstanceWithCopiedValues()
{
// Setup
- var random = new Random(21);
- var original = new HeightStructuresInput
- {
- Structure = new TestHeightStructure(),
- LevelCrestStructure = new NormalDistribution
- {
- Mean = random.NextRoundedDouble(),
- StandardDeviation = random.NextRoundedDouble()
- },
- DeviationWaveDirection = random.NextRoundedDouble()
- };
+ HeightStructuresInput original = HeightStructuresTestDataGenerator.CreateRandomStructuresInput();
- CommonTestDataGenerator.SetRandomDataToStructuresInput(original);
-
// Call
object clone = original.Clone();
Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.TestUtil/HeightStructuresTestDataGenerator.cs
===================================================================
diff -u
--- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.TestUtil/HeightStructuresTestDataGenerator.cs (revision 0)
+++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.TestUtil/HeightStructuresTestDataGenerator.cs (revision d5e85f2275fe1ed39438aebb69eb04ee03610832)
@@ -0,0 +1,58 @@
+// 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.Probabilistics;
+using Ringtoets.Common.Data.TestUtil;
+
+namespace Ringtoets.HeightStructures.Data.TestUtil
+{
+ ///
+ /// Class responsible for generating test data configurations.
+ ///
+ public static class HeightStructuresTestDataGenerator
+ {
+ ///
+ /// This method creates a object with some random data values set to it.
+ ///
+ /// The created input object.
+ public static HeightStructuresInput CreateRandomStructuresInput()
+ {
+ var random = new Random(21);
+
+ var heightStructuresInput = new HeightStructuresInput
+ {
+ Structure = new TestHeightStructure(),
+ LevelCrestStructure = new NormalDistribution
+ {
+ Mean = random.NextRoundedDouble(),
+ StandardDeviation = random.NextRoundedDouble()
+ },
+ DeviationWaveDirection = random.NextRoundedDouble()
+ };
+
+ CommonTestDataGenerator.SetRandomDataToStructuresInput(heightStructuresInput);
+
+ return heightStructuresInput;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.TestUtil/Ringtoets.HeightStructures.Data.TestUtil.csproj
===================================================================
diff -u -r898d42ca6354285169751f4de231f96f40b1f6f9 -rd5e85f2275fe1ed39438aebb69eb04ee03610832
--- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.TestUtil/Ringtoets.HeightStructures.Data.TestUtil.csproj (.../Ringtoets.HeightStructures.Data.TestUtil.csproj) (revision 898d42ca6354285169751f4de231f96f40b1f6f9)
+++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.TestUtil/Ringtoets.HeightStructures.Data.TestUtil.csproj (.../Ringtoets.HeightStructures.Data.TestUtil.csproj) (revision d5e85f2275fe1ed39438aebb69eb04ee03610832)
@@ -51,6 +51,7 @@
+