Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/FileImporters/GrassCoverSlipOffInwardsFailureMechanismSectionResultUpdateStrategy.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/FileImporters/GrassCoverSlipOffInwardsFailureMechanismSectionResultUpdateStrategy.cs (revision 0)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/FileImporters/GrassCoverSlipOffInwardsFailureMechanismSectionResultUpdateStrategy.cs (revision 83533c155d88de10f0a8e37e3918effc0725ba77)
@@ -0,0 +1,54 @@
+// 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 Ringtoets.Common.IO.FileImporters;
+using Ringtoets.Integration.Data.StandAlone.SectionResults;
+
+namespace Ringtoets.Integration.Plugin.FileImporters
+{
+ ///
+ /// An update strategy that can be used to update a instance with data
+ /// from an old instance.
+ ///
+ public class GrassCoverSlipOffInwardsFailureMechanismSectionResultUpdateStrategy
+ : IFailureMechanismSectionResultUpdateStrategy
+ {
+ public void UpdateSectionResult(GrassCoverSlipOffInwardsFailureMechanismSectionResult origin, GrassCoverSlipOffInwardsFailureMechanismSectionResult target)
+ {
+ if (origin == null)
+ {
+ throw new ArgumentNullException(nameof(origin));
+ }
+
+ if (target == null)
+ {
+ throw new ArgumentNullException(nameof(target));
+ }
+
+ target.SimpleAssessmentResult = origin.SimpleAssessmentResult;
+ target.DetailedAssessmentResult = origin.DetailedAssessmentResult;
+ target.TailorMadeAssessmentResult = origin.TailorMadeAssessmentResult;
+ target.UseManualAssemblyCategoryGroup = origin.UseManualAssemblyCategoryGroup;
+ target.ManualAssemblyCategoryGroup = origin.ManualAssemblyCategoryGroup;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/FileImporters/GrassCoverSlipOffOutwardsFailureMechanismSectionResultUpdateStrategy.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/FileImporters/GrassCoverSlipOffOutwardsFailureMechanismSectionResultUpdateStrategy.cs (revision 0)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/FileImporters/GrassCoverSlipOffOutwardsFailureMechanismSectionResultUpdateStrategy.cs (revision 83533c155d88de10f0a8e37e3918effc0725ba77)
@@ -0,0 +1,54 @@
+// 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 Ringtoets.Common.IO.FileImporters;
+using Ringtoets.Integration.Data.StandAlone.SectionResults;
+
+namespace Ringtoets.Integration.Plugin.FileImporters
+{
+ ///
+ /// An update strategy that can be used to update a instance with data
+ /// from an old instance.
+ ///
+ public class GrassCoverSlipOffOutwardsFailureMechanismSectionResultUpdateStrategy
+ : IFailureMechanismSectionResultUpdateStrategy
+ {
+ public void UpdateSectionResult(GrassCoverSlipOffOutwardsFailureMechanismSectionResult origin, GrassCoverSlipOffOutwardsFailureMechanismSectionResult target)
+ {
+ if (origin == null)
+ {
+ throw new ArgumentNullException(nameof(origin));
+ }
+
+ if (target == null)
+ {
+ throw new ArgumentNullException(nameof(target));
+ }
+
+ target.SimpleAssessmentResult = origin.SimpleAssessmentResult;
+ target.DetailedAssessmentResult = origin.DetailedAssessmentResult;
+ target.TailorMadeAssessmentResult = origin.TailorMadeAssessmentResult;
+ target.UseManualAssemblyCategoryGroup = origin.UseManualAssemblyCategoryGroup;
+ target.ManualAssemblyCategoryGroup = origin.ManualAssemblyCategoryGroup;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/FileImporters/MacroStabilityOutwardsFailureMechanismSectionResultUpdateStrategy.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/FileImporters/MacroStabilityOutwardsFailureMechanismSectionResultUpdateStrategy.cs (revision 0)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/FileImporters/MacroStabilityOutwardsFailureMechanismSectionResultUpdateStrategy.cs (revision 83533c155d88de10f0a8e37e3918effc0725ba77)
@@ -0,0 +1,54 @@
+// 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 Ringtoets.Common.IO.FileImporters;
+using Ringtoets.Integration.Data.StandAlone.SectionResults;
+
+namespace Ringtoets.Integration.Plugin.FileImporters
+{
+ ///
+ /// An update strategy that can be used to update a instance with data
+ /// from an old instance.
+ ///
+ public class MacroStabilityOutwardsFailureMechanismSectionResultUpdateStrategy
+ : IFailureMechanismSectionResultUpdateStrategy
+ {
+ public void UpdateSectionResult(MacroStabilityOutwardsFailureMechanismSectionResult origin, MacroStabilityOutwardsFailureMechanismSectionResult target)
+ {
+ if (origin == null)
+ {
+ throw new ArgumentNullException(nameof(origin));
+ }
+
+ if (target == null)
+ {
+ throw new ArgumentNullException(nameof(target));
+ }
+
+ target.SimpleAssessmentResult = origin.SimpleAssessmentResult;
+ target.DetailedAssessmentResult = origin.DetailedAssessmentResult;
+ target.TailorMadeAssessmentResult = origin.TailorMadeAssessmentResult;
+ target.UseManualAssemblyCategoryGroup = origin.UseManualAssemblyCategoryGroup;
+ target.ManualAssemblyCategoryGroup = origin.ManualAssemblyCategoryGroup;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/FileImporters/MicrostabilityFailureMechanismSectionResultUpdateStrategy.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/FileImporters/MicrostabilityFailureMechanismSectionResultUpdateStrategy.cs (revision 0)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/FileImporters/MicrostabilityFailureMechanismSectionResultUpdateStrategy.cs (revision 83533c155d88de10f0a8e37e3918effc0725ba77)
@@ -0,0 +1,54 @@
+// 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 Ringtoets.Common.IO.FileImporters;
+using Ringtoets.Integration.Data.StandAlone.SectionResults;
+
+namespace Ringtoets.Integration.Plugin.FileImporters
+{
+ ///
+ /// An update strategy that can be used to update a instance with data
+ /// from an old instance.
+ ///
+ public class MicrostabilityFailureMechanismSectionResultUpdateStrategy
+ : IFailureMechanismSectionResultUpdateStrategy
+ {
+ public void UpdateSectionResult(MicrostabilityFailureMechanismSectionResult origin, MicrostabilityFailureMechanismSectionResult target)
+ {
+ if (origin == null)
+ {
+ throw new ArgumentNullException(nameof(origin));
+ }
+
+ if (target == null)
+ {
+ throw new ArgumentNullException(nameof(target));
+ }
+
+ target.SimpleAssessmentResult = origin.SimpleAssessmentResult;
+ target.DetailedAssessmentResult = origin.DetailedAssessmentResult;
+ target.TailorMadeAssessmentResult = origin.TailorMadeAssessmentResult;
+ target.UseManualAssemblyCategoryGroup = origin.UseManualAssemblyCategoryGroup;
+ target.ManualAssemblyCategoryGroup = origin.ManualAssemblyCategoryGroup;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/FileImporters/PipingStructureFailureMechanismSectionResultUpdateStrategy.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/FileImporters/PipingStructureFailureMechanismSectionResultUpdateStrategy.cs (revision 0)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/FileImporters/PipingStructureFailureMechanismSectionResultUpdateStrategy.cs (revision 83533c155d88de10f0a8e37e3918effc0725ba77)
@@ -0,0 +1,54 @@
+// 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 Ringtoets.Common.IO.FileImporters;
+using Ringtoets.Integration.Data.StandAlone.SectionResults;
+
+namespace Ringtoets.Integration.Plugin.FileImporters
+{
+ ///
+ /// An update strategy that can be used to update a instance with data
+ /// from an old instance.
+ ///
+ public class PipingStructureFailureMechanismSectionResultUpdateStrategy
+ : IFailureMechanismSectionResultUpdateStrategy
+ {
+ public void UpdateSectionResult(PipingStructureFailureMechanismSectionResult origin, PipingStructureFailureMechanismSectionResult target)
+ {
+ if (origin == null)
+ {
+ throw new ArgumentNullException(nameof(origin));
+ }
+
+ if (target == null)
+ {
+ throw new ArgumentNullException(nameof(target));
+ }
+
+ target.SimpleAssessmentResult = origin.SimpleAssessmentResult;
+ target.DetailedAssessmentResult = origin.DetailedAssessmentResult;
+ target.TailorMadeAssessmentResult = origin.TailorMadeAssessmentResult;
+ target.UseManualAssemblyCategoryGroup = origin.UseManualAssemblyCategoryGroup;
+ target.ManualAssemblyCategoryGroup = origin.ManualAssemblyCategoryGroup;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/FileImporters/StrengthStabilityLengthwiseConstructionFailureMechanismSectionResultUpdateStrategy.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/FileImporters/StrengthStabilityLengthwiseConstructionFailureMechanismSectionResultUpdateStrategy.cs (revision 0)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/FileImporters/StrengthStabilityLengthwiseConstructionFailureMechanismSectionResultUpdateStrategy.cs (revision 83533c155d88de10f0a8e37e3918effc0725ba77)
@@ -0,0 +1,53 @@
+// 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 Ringtoets.Common.IO.FileImporters;
+using Ringtoets.Integration.Data.StandAlone.SectionResults;
+
+namespace Ringtoets.Integration.Plugin.FileImporters
+{
+ ///
+ /// An update strategy that can be used to update a instance with data
+ /// from an old instance.
+ ///
+ public class StrengthStabilityLengthwiseConstructionFailureMechanismSectionResultUpdateStrategy
+ : IFailureMechanismSectionResultUpdateStrategy
+ {
+ public void UpdateSectionResult(StrengthStabilityLengthwiseConstructionFailureMechanismSectionResult origin, StrengthStabilityLengthwiseConstructionFailureMechanismSectionResult target)
+ {
+ if (origin == null)
+ {
+ throw new ArgumentNullException(nameof(origin));
+ }
+
+ if (target == null)
+ {
+ throw new ArgumentNullException(nameof(target));
+ }
+
+ target.SimpleAssessmentResult = origin.SimpleAssessmentResult;
+ target.TailorMadeAssessmentResult = origin.TailorMadeAssessmentResult;
+ target.UseManualAssemblyCategoryGroup = origin.UseManualAssemblyCategoryGroup;
+ target.ManualAssemblyCategoryGroup = origin.ManualAssemblyCategoryGroup;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/FileImporters/TechnicalInnovationFailureMechanismSectionResultUpdateStrategy.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/FileImporters/TechnicalInnovationFailureMechanismSectionResultUpdateStrategy.cs (revision 0)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/FileImporters/TechnicalInnovationFailureMechanismSectionResultUpdateStrategy.cs (revision 83533c155d88de10f0a8e37e3918effc0725ba77)
@@ -0,0 +1,53 @@
+// 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 Ringtoets.Common.IO.FileImporters;
+using Ringtoets.Integration.Data.StandAlone.SectionResults;
+
+namespace Ringtoets.Integration.Plugin.FileImporters
+{
+ ///
+ /// An update strategy that can be used to update a instance with data
+ /// from an old instance.
+ ///
+ public class TechnicalInnovationFailureMechanismSectionResultUpdateStrategy
+ : IFailureMechanismSectionResultUpdateStrategy
+ {
+ public void UpdateSectionResult(TechnicalInnovationFailureMechanismSectionResult origin, TechnicalInnovationFailureMechanismSectionResult target)
+ {
+ if (origin == null)
+ {
+ throw new ArgumentNullException(nameof(origin));
+ }
+
+ if (target == null)
+ {
+ throw new ArgumentNullException(nameof(target));
+ }
+
+ target.SimpleAssessmentResult = origin.SimpleAssessmentResult;
+ target.TailorMadeAssessmentResult = origin.TailorMadeAssessmentResult;
+ target.UseManualAssemblyCategoryGroup = origin.UseManualAssemblyCategoryGroup;
+ target.ManualAssemblyCategoryGroup = origin.ManualAssemblyCategoryGroup;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/FileImporters/WaterPressureAsphaltCoverFailureMechanismSectionResultUpdateStrategy.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/FileImporters/WaterPressureAsphaltCoverFailureMechanismSectionResultUpdateStrategy.cs (revision 0)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/FileImporters/WaterPressureAsphaltCoverFailureMechanismSectionResultUpdateStrategy.cs (revision 83533c155d88de10f0a8e37e3918effc0725ba77)
@@ -0,0 +1,53 @@
+// 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 Ringtoets.Common.IO.FileImporters;
+using Ringtoets.Integration.Data.StandAlone.SectionResults;
+
+namespace Ringtoets.Integration.Plugin.FileImporters
+{
+ ///
+ /// An update strategy that can be used to update a instance with data
+ /// from an old instance.
+ ///
+ public class WaterPressureAsphaltCoverFailureMechanismSectionResultUpdateStrategy
+ : IFailureMechanismSectionResultUpdateStrategy
+ {
+ public void UpdateSectionResult(WaterPressureAsphaltCoverFailureMechanismSectionResult origin, WaterPressureAsphaltCoverFailureMechanismSectionResult target)
+ {
+ if (origin == null)
+ {
+ throw new ArgumentNullException(nameof(origin));
+ }
+
+ if (target == null)
+ {
+ throw new ArgumentNullException(nameof(target));
+ }
+
+ target.SimpleAssessmentResult = origin.SimpleAssessmentResult;
+ target.TailorMadeAssessmentResult = origin.TailorMadeAssessmentResult;
+ target.UseManualAssemblyCategoryGroup = origin.UseManualAssemblyCategoryGroup;
+ target.ManualAssemblyCategoryGroup = origin.ManualAssemblyCategoryGroup;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Ringtoets.Integration.Plugin.csproj
===================================================================
diff -u -rbbc8a9be41850f8de8086c8bdda711f52a6767e9 -r83533c155d88de10f0a8e37e3918effc0725ba77
--- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Ringtoets.Integration.Plugin.csproj (.../Ringtoets.Integration.Plugin.csproj) (revision bbc8a9be41850f8de8086c8bdda711f52a6767e9)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Ringtoets.Integration.Plugin.csproj (.../Ringtoets.Integration.Plugin.csproj) (revision 83533c155d88de10f0a8e37e3918effc0725ba77)
@@ -25,6 +25,14 @@
+
+
+
+
+
+
+
+
@@ -103,6 +111,11 @@
Ringtoets.Common.Plugin
False
+
+ {78AA56F5-431D-465C-AC50-3173D7E90AC1}
+ Ringtoets.Common.Primitives
+ False
+
{6A074D65-A81C-4C1C-8E24-F36C916E4ED7}
Ringtoets.Common.Util
Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/FileImporters/GrassCoverSlipOffInwardsFailureMechanismSectionResultUpdateStrategyTest.cs
===================================================================
diff -u
--- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/FileImporters/GrassCoverSlipOffInwardsFailureMechanismSectionResultUpdateStrategyTest.cs (revision 0)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/FileImporters/GrassCoverSlipOffInwardsFailureMechanismSectionResultUpdateStrategyTest.cs (revision 83533c155d88de10f0a8e37e3918effc0725ba77)
@@ -0,0 +1,105 @@
+// 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 NUnit.Framework;
+using Ringtoets.AssemblyTool.Data;
+using Ringtoets.Common.Data.TestUtil;
+using Ringtoets.Common.IO.FileImporters;
+using Ringtoets.Common.Primitives;
+using Ringtoets.Integration.Data.StandAlone.SectionResults;
+using Ringtoets.Integration.Plugin.FileImporters;
+
+namespace Ringtoets.Integration.Plugin.Test.FileImporters
+{
+ [TestFixture]
+ public class GrassCoverSlipOffInwardsFailureMechanismSectionResultUpdateStrategyTest
+ {
+ [Test]
+ public void Constructor_ExpectedValues()
+ {
+ // Call
+ var strategy = new GrassCoverSlipOffInwardsFailureMechanismSectionResultUpdateStrategy();
+
+ // Assert
+ Assert.IsInstanceOf>(strategy);
+ }
+
+ [Test]
+ public void UpdateSectionResult_OriginNull_ThrowsArgumentNullException()
+ {
+ // Setup
+ var strategy = new GrassCoverSlipOffInwardsFailureMechanismSectionResultUpdateStrategy();
+
+ // Call
+ TestDelegate test = () => strategy.UpdateSectionResult(
+ null, new GrassCoverSlipOffInwardsFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection()));
+
+ // Assert
+ string paramName = Assert.Throws(test).ParamName;
+ Assert.AreEqual("origin", paramName);
+ }
+
+ [Test]
+ public void UpdateSectionResult_TargetNull_ThrowsArgumentNullException()
+ {
+ // Setup
+ var strategy = new GrassCoverSlipOffInwardsFailureMechanismSectionResultUpdateStrategy();
+
+ // Call
+ TestDelegate test = () => strategy.UpdateSectionResult(
+ new GrassCoverSlipOffInwardsFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection()), null);
+
+ // Assert
+ string paramName = Assert.Throws(test).ParamName;
+ Assert.AreEqual("target", paramName);
+ }
+
+ [Test]
+ public void UpdateSectionResult_WithData_UpdatesTargetSectionResult()
+ {
+ // Setup
+ var random = new Random(39);
+ var strategy = new GrassCoverSlipOffInwardsFailureMechanismSectionResultUpdateStrategy();
+ var originResult = new GrassCoverSlipOffInwardsFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection())
+ {
+ SimpleAssessmentResult = SimpleAssessmentResultType.AssessFurther,
+ DetailedAssessmentResult = DetailedAssessmentResultType.Sufficient,
+ TailorMadeAssessmentResult = TailorMadeAssessmentResultType.ProbabilityNegligible,
+ UseManualAssemblyCategoryGroup = true,
+ ManualAssemblyCategoryGroup = random.NextEnumValue()
+ };
+ var targetResult = new GrassCoverSlipOffInwardsFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection());
+
+ // Call
+ strategy.UpdateSectionResult(originResult, targetResult);
+
+ // Assert
+ Assert.AreEqual(originResult.SimpleAssessmentResult, targetResult.SimpleAssessmentResult);
+ Assert.AreEqual(originResult.DetailedAssessmentResult, targetResult.DetailedAssessmentResult);
+ Assert.AreEqual(originResult.TailorMadeAssessmentResult, targetResult.TailorMadeAssessmentResult);
+ Assert.AreEqual(originResult.UseManualAssemblyCategoryGroup, targetResult.UseManualAssemblyCategoryGroup);
+ Assert.AreEqual(originResult.ManualAssemblyCategoryGroup, targetResult.ManualAssemblyCategoryGroup);
+ Assert.AreNotSame(originResult.Section, targetResult.Section);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/FileImporters/GrassCoverSlipOffOutwardsFailureMechanismSectionResultUpdateStrategyTest.cs
===================================================================
diff -u
--- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/FileImporters/GrassCoverSlipOffOutwardsFailureMechanismSectionResultUpdateStrategyTest.cs (revision 0)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/FileImporters/GrassCoverSlipOffOutwardsFailureMechanismSectionResultUpdateStrategyTest.cs (revision 83533c155d88de10f0a8e37e3918effc0725ba77)
@@ -0,0 +1,105 @@
+// 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 NUnit.Framework;
+using Ringtoets.AssemblyTool.Data;
+using Ringtoets.Common.Data.TestUtil;
+using Ringtoets.Common.IO.FileImporters;
+using Ringtoets.Common.Primitives;
+using Ringtoets.Integration.Data.StandAlone.SectionResults;
+using Ringtoets.Integration.Plugin.FileImporters;
+
+namespace Ringtoets.Integration.Plugin.Test.FileImporters
+{
+ [TestFixture]
+ public class GrassCoverSlipOffOutwardsFailureMechanismSectionResultUpdateStrategyTest
+ {
+ [Test]
+ public void Constructor_ExpectedValues()
+ {
+ // Call
+ var strategy = new GrassCoverSlipOffOutwardsFailureMechanismSectionResultUpdateStrategy();
+
+ // Assert
+ Assert.IsInstanceOf>(strategy);
+ }
+
+ [Test]
+ public void UpdateSectionResult_OriginNull_ThrowsArgumentNullException()
+ {
+ // Setup
+ var strategy = new GrassCoverSlipOffOutwardsFailureMechanismSectionResultUpdateStrategy();
+
+ // Call
+ TestDelegate test = () => strategy.UpdateSectionResult(
+ null, new GrassCoverSlipOffOutwardsFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection()));
+
+ // Assert
+ string paramName = Assert.Throws(test).ParamName;
+ Assert.AreEqual("origin", paramName);
+ }
+
+ [Test]
+ public void UpdateSectionResult_TargetNull_ThrowsArgumentNullException()
+ {
+ // Setup
+ var strategy = new GrassCoverSlipOffOutwardsFailureMechanismSectionResultUpdateStrategy();
+
+ // Call
+ TestDelegate test = () => strategy.UpdateSectionResult(
+ new GrassCoverSlipOffOutwardsFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection()), null);
+
+ // Assert
+ string paramName = Assert.Throws(test).ParamName;
+ Assert.AreEqual("target", paramName);
+ }
+
+ [Test]
+ public void UpdateSectionResult_WithData_UpdatesTargetSectionResult()
+ {
+ // Setup
+ var random = new Random(39);
+ var strategy = new GrassCoverSlipOffOutwardsFailureMechanismSectionResultUpdateStrategy();
+ var originResult = new GrassCoverSlipOffOutwardsFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection())
+ {
+ SimpleAssessmentResult = SimpleAssessmentResultType.AssessFurther,
+ DetailedAssessmentResult = DetailedAssessmentResultType.Sufficient,
+ TailorMadeAssessmentResult = TailorMadeAssessmentResultType.ProbabilityNegligible,
+ UseManualAssemblyCategoryGroup = true,
+ ManualAssemblyCategoryGroup = random.NextEnumValue()
+ };
+ var targetResult = new GrassCoverSlipOffOutwardsFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection());
+
+ // Call
+ strategy.UpdateSectionResult(originResult, targetResult);
+
+ // Assert
+ Assert.AreEqual(originResult.SimpleAssessmentResult, targetResult.SimpleAssessmentResult);
+ Assert.AreEqual(originResult.DetailedAssessmentResult, targetResult.DetailedAssessmentResult);
+ Assert.AreEqual(originResult.TailorMadeAssessmentResult, targetResult.TailorMadeAssessmentResult);
+ Assert.AreEqual(originResult.UseManualAssemblyCategoryGroup, targetResult.UseManualAssemblyCategoryGroup);
+ Assert.AreEqual(originResult.ManualAssemblyCategoryGroup, targetResult.ManualAssemblyCategoryGroup);
+ Assert.AreNotSame(originResult.Section, targetResult.Section);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/FileImporters/MacroStabilityOutwardsFailureMechanismSectionResultUpdateStrategyTest.cs
===================================================================
diff -u
--- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/FileImporters/MacroStabilityOutwardsFailureMechanismSectionResultUpdateStrategyTest.cs (revision 0)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/FileImporters/MacroStabilityOutwardsFailureMechanismSectionResultUpdateStrategyTest.cs (revision 83533c155d88de10f0a8e37e3918effc0725ba77)
@@ -0,0 +1,105 @@
+// 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 NUnit.Framework;
+using Ringtoets.AssemblyTool.Data;
+using Ringtoets.Common.Data.TestUtil;
+using Ringtoets.Common.IO.FileImporters;
+using Ringtoets.Common.Primitives;
+using Ringtoets.Integration.Data.StandAlone.SectionResults;
+using Ringtoets.Integration.Plugin.FileImporters;
+
+namespace Ringtoets.Integration.Plugin.Test.FileImporters
+{
+ [TestFixture]
+ public class MacroStabilityOutwardsFailureMechanismSectionResultUpdateStrategyTest
+ {
+ [Test]
+ public void Constructor_ExpectedValues()
+ {
+ // Call
+ var strategy = new MacroStabilityOutwardsFailureMechanismSectionResultUpdateStrategy();
+
+ // Assert
+ Assert.IsInstanceOf>(strategy);
+ }
+
+ [Test]
+ public void UpdateSectionResult_OriginNull_ThrowsArgumentNullException()
+ {
+ // Setup
+ var strategy = new MacroStabilityOutwardsFailureMechanismSectionResultUpdateStrategy();
+
+ // Call
+ TestDelegate test = () => strategy.UpdateSectionResult(
+ null, new MacroStabilityOutwardsFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection()));
+
+ // Assert
+ string paramName = Assert.Throws(test).ParamName;
+ Assert.AreEqual("origin", paramName);
+ }
+
+ [Test]
+ public void UpdateSectionResult_TargetNull_ThrowsArgumentNullException()
+ {
+ // Setup
+ var strategy = new MacroStabilityOutwardsFailureMechanismSectionResultUpdateStrategy();
+
+ // Call
+ TestDelegate test = () => strategy.UpdateSectionResult(
+ new MacroStabilityOutwardsFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection()), null);
+
+ // Assert
+ string paramName = Assert.Throws(test).ParamName;
+ Assert.AreEqual("target", paramName);
+ }
+
+ [Test]
+ public void UpdateSectionResult_WithData_UpdatesTargetSectionResult()
+ {
+ // Setup
+ var random = new Random(39);
+ var strategy = new MacroStabilityOutwardsFailureMechanismSectionResultUpdateStrategy();
+ var originResult = new MacroStabilityOutwardsFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection())
+ {
+ SimpleAssessmentResult = SimpleAssessmentResultType.AssessFurther,
+ DetailedAssessmentResult = DetailedAssessmentProbabilityOnlyResultType.NotAssessed,
+ TailorMadeAssessmentResult = TailorMadeAssessmentProbabilityAndDetailedCalculationResultType.ProbabilityNegligible,
+ UseManualAssemblyCategoryGroup = true,
+ ManualAssemblyCategoryGroup = random.NextEnumValue()
+ };
+ var targetResult = new MacroStabilityOutwardsFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection());
+
+ // Call
+ strategy.UpdateSectionResult(originResult, targetResult);
+
+ // Assert
+ Assert.AreEqual(originResult.SimpleAssessmentResult, targetResult.SimpleAssessmentResult);
+ Assert.AreEqual(originResult.DetailedAssessmentResult, targetResult.DetailedAssessmentResult);
+ Assert.AreEqual(originResult.TailorMadeAssessmentResult, targetResult.TailorMadeAssessmentResult);
+ Assert.AreEqual(originResult.UseManualAssemblyCategoryGroup, targetResult.UseManualAssemblyCategoryGroup);
+ Assert.AreEqual(originResult.ManualAssemblyCategoryGroup, targetResult.ManualAssemblyCategoryGroup);
+ Assert.AreNotSame(originResult.Section, targetResult.Section);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/FileImporters/MicrostabilityFailureMechanismSectionResultUpdateStrategyTest.cs
===================================================================
diff -u
--- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/FileImporters/MicrostabilityFailureMechanismSectionResultUpdateStrategyTest.cs (revision 0)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/FileImporters/MicrostabilityFailureMechanismSectionResultUpdateStrategyTest.cs (revision 83533c155d88de10f0a8e37e3918effc0725ba77)
@@ -0,0 +1,105 @@
+// 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 NUnit.Framework;
+using Ringtoets.AssemblyTool.Data;
+using Ringtoets.Common.Data.TestUtil;
+using Ringtoets.Common.IO.FileImporters;
+using Ringtoets.Common.Primitives;
+using Ringtoets.Integration.Data.StandAlone.SectionResults;
+using Ringtoets.Integration.Plugin.FileImporters;
+
+namespace Ringtoets.Integration.Plugin.Test.FileImporters
+{
+ [TestFixture]
+ public class MicrostabilityFailureMechanismSectionResultUpdateStrategyTest
+ {
+ [Test]
+ public void Constructor_ExpectedValues()
+ {
+ // Call
+ var strategy = new MicrostabilityFailureMechanismSectionResultUpdateStrategy();
+
+ // Assert
+ Assert.IsInstanceOf>(strategy);
+ }
+
+ [Test]
+ public void UpdateSectionResult_OriginNull_ThrowsArgumentNullException()
+ {
+ // Setup
+ var strategy = new MicrostabilityFailureMechanismSectionResultUpdateStrategy();
+
+ // Call
+ TestDelegate test = () => strategy.UpdateSectionResult(
+ null, new MicrostabilityFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection()));
+
+ // Assert
+ string paramName = Assert.Throws(test).ParamName;
+ Assert.AreEqual("origin", paramName);
+ }
+
+ [Test]
+ public void UpdateSectionResult_TargetNull_ThrowsArgumentNullException()
+ {
+ // Setup
+ var strategy = new MicrostabilityFailureMechanismSectionResultUpdateStrategy();
+
+ // Call
+ TestDelegate test = () => strategy.UpdateSectionResult(
+ new MicrostabilityFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection()), null);
+
+ // Assert
+ string paramName = Assert.Throws(test).ParamName;
+ Assert.AreEqual("target", paramName);
+ }
+
+ [Test]
+ public void UpdateSectionResult_WithData_UpdatesTargetSectionResult()
+ {
+ // Setup
+ var random = new Random(39);
+ var strategy = new MicrostabilityFailureMechanismSectionResultUpdateStrategy();
+ var originResult = new MicrostabilityFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection())
+ {
+ SimpleAssessmentResult = SimpleAssessmentResultType.AssessFurther,
+ DetailedAssessmentResult = DetailedAssessmentResultType.Sufficient,
+ TailorMadeAssessmentResult = TailorMadeAssessmentResultType.ProbabilityNegligible,
+ UseManualAssemblyCategoryGroup = true,
+ ManualAssemblyCategoryGroup = random.NextEnumValue()
+ };
+ var targetResult = new MicrostabilityFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection());
+
+ // Call
+ strategy.UpdateSectionResult(originResult, targetResult);
+
+ // Assert
+ Assert.AreEqual(originResult.SimpleAssessmentResult, targetResult.SimpleAssessmentResult);
+ Assert.AreEqual(originResult.DetailedAssessmentResult, targetResult.DetailedAssessmentResult);
+ Assert.AreEqual(originResult.TailorMadeAssessmentResult, targetResult.TailorMadeAssessmentResult);
+ Assert.AreEqual(originResult.UseManualAssemblyCategoryGroup, targetResult.UseManualAssemblyCategoryGroup);
+ Assert.AreEqual(originResult.ManualAssemblyCategoryGroup, targetResult.ManualAssemblyCategoryGroup);
+ Assert.AreNotSame(originResult.Section, targetResult.Section);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/FileImporters/PipingStructureFailureMechanismSectionResultUpdateStrategyTest.cs
===================================================================
diff -u
--- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/FileImporters/PipingStructureFailureMechanismSectionResultUpdateStrategyTest.cs (revision 0)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/FileImporters/PipingStructureFailureMechanismSectionResultUpdateStrategyTest.cs (revision 83533c155d88de10f0a8e37e3918effc0725ba77)
@@ -0,0 +1,105 @@
+// 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 NUnit.Framework;
+using Ringtoets.AssemblyTool.Data;
+using Ringtoets.Common.Data.TestUtil;
+using Ringtoets.Common.IO.FileImporters;
+using Ringtoets.Common.Primitives;
+using Ringtoets.Integration.Data.StandAlone.SectionResults;
+using Ringtoets.Integration.Plugin.FileImporters;
+
+namespace Ringtoets.Integration.Plugin.Test.FileImporters
+{
+ [TestFixture]
+ public class PipingStructureFailureMechanismSectionResultUpdateStrategyTest
+ {
+ [Test]
+ public void Constructor_ExpectedValues()
+ {
+ // Call
+ var strategy = new PipingStructureFailureMechanismSectionResultUpdateStrategy();
+
+ // Assert
+ Assert.IsInstanceOf>(strategy);
+ }
+
+ [Test]
+ public void UpdateSectionResult_OriginNull_ThrowsArgumentNullException()
+ {
+ // Setup
+ var strategy = new PipingStructureFailureMechanismSectionResultUpdateStrategy();
+
+ // Call
+ TestDelegate test = () => strategy.UpdateSectionResult(
+ null, new PipingStructureFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection()));
+
+ // Assert
+ string paramName = Assert.Throws(test).ParamName;
+ Assert.AreEqual("origin", paramName);
+ }
+
+ [Test]
+ public void UpdateSectionResult_TargetNull_ThrowsArgumentNullException()
+ {
+ // Setup
+ var strategy = new PipingStructureFailureMechanismSectionResultUpdateStrategy();
+
+ // Call
+ TestDelegate test = () => strategy.UpdateSectionResult(
+ new PipingStructureFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection()), null);
+
+ // Assert
+ string paramName = Assert.Throws(test).ParamName;
+ Assert.AreEqual("target", paramName);
+ }
+
+ [Test]
+ public void UpdateSectionResult_WithData_UpdatesTargetSectionResult()
+ {
+ // Setup
+ var random = new Random(39);
+ var strategy = new PipingStructureFailureMechanismSectionResultUpdateStrategy();
+ var originResult = new PipingStructureFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection())
+ {
+ SimpleAssessmentResult = SimpleAssessmentResultType.AssessFurther,
+ DetailedAssessmentResult = DetailedAssessmentResultType.Sufficient,
+ TailorMadeAssessmentResult = TailorMadeAssessmentResultType.ProbabilityNegligible,
+ UseManualAssemblyCategoryGroup = true,
+ ManualAssemblyCategoryGroup = random.NextEnumValue()
+ };
+ var targetResult = new PipingStructureFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection());
+
+ // Call
+ strategy.UpdateSectionResult(originResult, targetResult);
+
+ // Assert
+ Assert.AreEqual(originResult.SimpleAssessmentResult, targetResult.SimpleAssessmentResult);
+ Assert.AreEqual(originResult.DetailedAssessmentResult, targetResult.DetailedAssessmentResult);
+ Assert.AreEqual(originResult.TailorMadeAssessmentResult, targetResult.TailorMadeAssessmentResult);
+ Assert.AreEqual(originResult.UseManualAssemblyCategoryGroup, targetResult.UseManualAssemblyCategoryGroup);
+ Assert.AreEqual(originResult.ManualAssemblyCategoryGroup, targetResult.ManualAssemblyCategoryGroup);
+ Assert.AreNotSame(originResult.Section, targetResult.Section);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/FileImporters/StrengthStabilityLengthwiseConstructionFailureMechanismSectionResultUpdateStrategyTest.cs
===================================================================
diff -u
--- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/FileImporters/StrengthStabilityLengthwiseConstructionFailureMechanismSectionResultUpdateStrategyTest.cs (revision 0)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/FileImporters/StrengthStabilityLengthwiseConstructionFailureMechanismSectionResultUpdateStrategyTest.cs (revision 83533c155d88de10f0a8e37e3918effc0725ba77)
@@ -0,0 +1,103 @@
+// 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 NUnit.Framework;
+using Ringtoets.AssemblyTool.Data;
+using Ringtoets.Common.Data.TestUtil;
+using Ringtoets.Common.IO.FileImporters;
+using Ringtoets.Common.Primitives;
+using Ringtoets.Integration.Data.StandAlone.SectionResults;
+using Ringtoets.Integration.Plugin.FileImporters;
+
+namespace Ringtoets.Integration.Plugin.Test.FileImporters
+{
+ [TestFixture]
+ public class StrengthStabilityLengthwiseConstructionFailureMechanismSectionResultUpdateStrategyTest
+ {
+ [Test]
+ public void Constructor_ExpectedValues()
+ {
+ // Call
+ var strategy = new StrengthStabilityLengthwiseConstructionFailureMechanismSectionResultUpdateStrategy();
+
+ // Assert
+ Assert.IsInstanceOf>(strategy);
+ }
+
+ [Test]
+ public void UpdateSectionResult_OriginNull_ThrowsArgumentNullException()
+ {
+ // Setup
+ var strategy = new StrengthStabilityLengthwiseConstructionFailureMechanismSectionResultUpdateStrategy();
+
+ // Call
+ TestDelegate test = () => strategy.UpdateSectionResult(
+ null, new StrengthStabilityLengthwiseConstructionFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection()));
+
+ // Assert
+ string paramName = Assert.Throws(test).ParamName;
+ Assert.AreEqual("origin", paramName);
+ }
+
+ [Test]
+ public void UpdateSectionResult_TargetNull_ThrowsArgumentNullException()
+ {
+ // Setup
+ var strategy = new StrengthStabilityLengthwiseConstructionFailureMechanismSectionResultUpdateStrategy();
+
+ // Call
+ TestDelegate test = () => strategy.UpdateSectionResult(
+ new StrengthStabilityLengthwiseConstructionFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection()), null);
+
+ // Assert
+ string paramName = Assert.Throws(test).ParamName;
+ Assert.AreEqual("target", paramName);
+ }
+
+ [Test]
+ public void UpdateSectionResult_WithData_UpdatesTargetSectionResult()
+ {
+ // Setup
+ var random = new Random(39);
+ var strategy = new StrengthStabilityLengthwiseConstructionFailureMechanismSectionResultUpdateStrategy();
+ var originResult = new StrengthStabilityLengthwiseConstructionFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection())
+ {
+ SimpleAssessmentResult = SimpleAssessmentResultType.AssessFurther,
+ TailorMadeAssessmentResult = TailorMadeAssessmentResultType.ProbabilityNegligible,
+ UseManualAssemblyCategoryGroup = true,
+ ManualAssemblyCategoryGroup = random.NextEnumValue()
+ };
+ var targetResult = new StrengthStabilityLengthwiseConstructionFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection());
+
+ // Call
+ strategy.UpdateSectionResult(originResult, targetResult);
+
+ // Assert
+ Assert.AreEqual(originResult.SimpleAssessmentResult, targetResult.SimpleAssessmentResult);
+ Assert.AreEqual(originResult.TailorMadeAssessmentResult, targetResult.TailorMadeAssessmentResult);
+ Assert.AreEqual(originResult.UseManualAssemblyCategoryGroup, targetResult.UseManualAssemblyCategoryGroup);
+ Assert.AreEqual(originResult.ManualAssemblyCategoryGroup, targetResult.ManualAssemblyCategoryGroup);
+ Assert.AreNotSame(originResult.Section, targetResult.Section);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/FileImporters/TechnicalInnovationFailureMechanismSectionResultUpdateStrategyTest.cs
===================================================================
diff -u
--- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/FileImporters/TechnicalInnovationFailureMechanismSectionResultUpdateStrategyTest.cs (revision 0)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/FileImporters/TechnicalInnovationFailureMechanismSectionResultUpdateStrategyTest.cs (revision 83533c155d88de10f0a8e37e3918effc0725ba77)
@@ -0,0 +1,103 @@
+// 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 NUnit.Framework;
+using Ringtoets.AssemblyTool.Data;
+using Ringtoets.Common.Data.TestUtil;
+using Ringtoets.Common.IO.FileImporters;
+using Ringtoets.Common.Primitives;
+using Ringtoets.Integration.Data.StandAlone.SectionResults;
+using Ringtoets.Integration.Plugin.FileImporters;
+
+namespace Ringtoets.Integration.Plugin.Test.FileImporters
+{
+ [TestFixture]
+ public class TechnicalInnovationFailureMechanismSectionResultUpdateStrategyTest
+ {
+ [Test]
+ public void Constructor_ExpectedValues()
+ {
+ // Call
+ var strategy = new TechnicalInnovationFailureMechanismSectionResultUpdateStrategy();
+
+ // Assert
+ Assert.IsInstanceOf>(strategy);
+ }
+
+ [Test]
+ public void UpdateSectionResult_OriginNull_ThrowsArgumentNullException()
+ {
+ // Setup
+ var strategy = new TechnicalInnovationFailureMechanismSectionResultUpdateStrategy();
+
+ // Call
+ TestDelegate test = () => strategy.UpdateSectionResult(
+ null, new TechnicalInnovationFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection()));
+
+ // Assert
+ string paramName = Assert.Throws(test).ParamName;
+ Assert.AreEqual("origin", paramName);
+ }
+
+ [Test]
+ public void UpdateSectionResult_TargetNull_ThrowsArgumentNullException()
+ {
+ // Setup
+ var strategy = new TechnicalInnovationFailureMechanismSectionResultUpdateStrategy();
+
+ // Call
+ TestDelegate test = () => strategy.UpdateSectionResult(
+ new TechnicalInnovationFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection()), null);
+
+ // Assert
+ string paramName = Assert.Throws(test).ParamName;
+ Assert.AreEqual("target", paramName);
+ }
+
+ [Test]
+ public void UpdateSectionResult_WithData_UpdatesTargetSectionResult()
+ {
+ // Setup
+ var random = new Random(39);
+ var strategy = new TechnicalInnovationFailureMechanismSectionResultUpdateStrategy();
+ var originResult = new TechnicalInnovationFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection())
+ {
+ SimpleAssessmentResult = SimpleAssessmentResultType.AssessFurther,
+ TailorMadeAssessmentResult = TailorMadeAssessmentResultType.ProbabilityNegligible,
+ UseManualAssemblyCategoryGroup = true,
+ ManualAssemblyCategoryGroup = random.NextEnumValue()
+ };
+ var targetResult = new TechnicalInnovationFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection());
+
+ // Call
+ strategy.UpdateSectionResult(originResult, targetResult);
+
+ // Assert
+ Assert.AreEqual(originResult.SimpleAssessmentResult, targetResult.SimpleAssessmentResult);
+ Assert.AreEqual(originResult.TailorMadeAssessmentResult, targetResult.TailorMadeAssessmentResult);
+ Assert.AreEqual(originResult.UseManualAssemblyCategoryGroup, targetResult.UseManualAssemblyCategoryGroup);
+ Assert.AreEqual(originResult.ManualAssemblyCategoryGroup, targetResult.ManualAssemblyCategoryGroup);
+ Assert.AreNotSame(originResult.Section, targetResult.Section);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/FileImporters/WaterPressureAsphaltCoverFailureMechanismSectionResultUpdateStrategyTest.cs
===================================================================
diff -u
--- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/FileImporters/WaterPressureAsphaltCoverFailureMechanismSectionResultUpdateStrategyTest.cs (revision 0)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/FileImporters/WaterPressureAsphaltCoverFailureMechanismSectionResultUpdateStrategyTest.cs (revision 83533c155d88de10f0a8e37e3918effc0725ba77)
@@ -0,0 +1,103 @@
+// 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 NUnit.Framework;
+using Ringtoets.AssemblyTool.Data;
+using Ringtoets.Common.Data.TestUtil;
+using Ringtoets.Common.IO.FileImporters;
+using Ringtoets.Common.Primitives;
+using Ringtoets.Integration.Data.StandAlone.SectionResults;
+using Ringtoets.Integration.Plugin.FileImporters;
+
+namespace Ringtoets.Integration.Plugin.Test.FileImporters
+{
+ [TestFixture]
+ public class WaterPressureAsphaltCoverFailureMechanismSectionResultUpdateStrategyTest
+ {
+ [Test]
+ public void Constructor_ExpectedValues()
+ {
+ // Call
+ var strategy = new WaterPressureAsphaltCoverFailureMechanismSectionResultUpdateStrategy();
+
+ // Assert
+ Assert.IsInstanceOf>(strategy);
+ }
+
+ [Test]
+ public void UpdateSectionResult_OriginNull_ThrowsArgumentNullException()
+ {
+ // Setup
+ var strategy = new WaterPressureAsphaltCoverFailureMechanismSectionResultUpdateStrategy();
+
+ // Call
+ TestDelegate test = () => strategy.UpdateSectionResult(
+ null, new WaterPressureAsphaltCoverFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection()));
+
+ // Assert
+ string paramName = Assert.Throws(test).ParamName;
+ Assert.AreEqual("origin", paramName);
+ }
+
+ [Test]
+ public void UpdateSectionResult_TargetNull_ThrowsArgumentNullException()
+ {
+ // Setup
+ var strategy = new WaterPressureAsphaltCoverFailureMechanismSectionResultUpdateStrategy();
+
+ // Call
+ TestDelegate test = () => strategy.UpdateSectionResult(
+ new WaterPressureAsphaltCoverFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection()), null);
+
+ // Assert
+ string paramName = Assert.Throws(test).ParamName;
+ Assert.AreEqual("target", paramName);
+ }
+
+ [Test]
+ public void UpdateSectionResult_WithData_UpdatesTargetSectionResult()
+ {
+ // Setup
+ var random = new Random(39);
+ var strategy = new WaterPressureAsphaltCoverFailureMechanismSectionResultUpdateStrategy();
+ var originResult = new WaterPressureAsphaltCoverFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection())
+ {
+ SimpleAssessmentResult = SimpleAssessmentResultType.AssessFurther,
+ TailorMadeAssessmentResult = TailorMadeAssessmentResultType.ProbabilityNegligible,
+ UseManualAssemblyCategoryGroup = true,
+ ManualAssemblyCategoryGroup = random.NextEnumValue()
+ };
+ var targetResult = new WaterPressureAsphaltCoverFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection());
+
+ // Call
+ strategy.UpdateSectionResult(originResult, targetResult);
+
+ // Assert
+ Assert.AreEqual(originResult.SimpleAssessmentResult, targetResult.SimpleAssessmentResult);
+ Assert.AreEqual(originResult.TailorMadeAssessmentResult, targetResult.TailorMadeAssessmentResult);
+ Assert.AreEqual(originResult.UseManualAssemblyCategoryGroup, targetResult.UseManualAssemblyCategoryGroup);
+ Assert.AreEqual(originResult.ManualAssemblyCategoryGroup, targetResult.ManualAssemblyCategoryGroup);
+ Assert.AreNotSame(originResult.Section, targetResult.Section);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/Ringtoets.Integration.Plugin.Test.csproj
===================================================================
diff -u -rc75b6a10192a82221b099fa56444031ea9a96636 -r83533c155d88de10f0a8e37e3918effc0725ba77
--- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/Ringtoets.Integration.Plugin.Test.csproj (.../Ringtoets.Integration.Plugin.Test.csproj) (revision c75b6a10192a82221b099fa56444031ea9a96636)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/Ringtoets.Integration.Plugin.Test.csproj (.../Ringtoets.Integration.Plugin.Test.csproj) (revision 83533c155d88de10f0a8e37e3918effc0725ba77)
@@ -48,6 +48,14 @@
+
+
+
+
+
+
+
+
@@ -235,6 +243,10 @@
{52ba7627-cbab-4209-be77-3b5f31378277}
Ringtoets.Common.IO
+
+ {78AA56F5-431D-465C-AC50-3173D7E90AC1}
+ Ringtoets.Common.Primitives
+
{d951d6da-fe83-4920-9fdb-63bf96480b54}
Ringtoets.Common.Service