Index: Ringtoets/Common/src/Ringtoets.Common.Data/FailureMechanism/FailureMechanismSectionResult.cs
===================================================================
diff -u -r8abb584035c1788f6e1d92985da399a9921e3a09 -r565199265c3608d4242ffeecb4e5ec1731e1dc84
--- Ringtoets/Common/src/Ringtoets.Common.Data/FailureMechanism/FailureMechanismSectionResult.cs (.../FailureMechanismSectionResult.cs) (revision 8abb584035c1788f6e1d92985da399a9921e3a09)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/FailureMechanism/FailureMechanismSectionResult.cs (.../FailureMechanismSectionResult.cs) (revision 565199265c3608d4242ffeecb4e5ec1731e1dc84)
@@ -6,7 +6,7 @@
///
/// This class holds the information of the result of the .
///
- public class FailureMechanismSectionResult : Observable
+ public abstract class FailureMechanismSectionResult : Observable
{
///
/// Creates a new instance of .
Index: Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/Ringtoets.Common.Data.TestUtil.Test.csproj
===================================================================
diff -u -rea99af5c043eadf5c2ba83b82a847ae009181191 -r565199265c3608d4242ffeecb4e5ec1731e1dc84
--- Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/Ringtoets.Common.Data.TestUtil.Test.csproj (.../Ringtoets.Common.Data.TestUtil.Test.csproj) (revision ea99af5c043eadf5c2ba83b82a847ae009181191)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/Ringtoets.Common.Data.TestUtil.Test.csproj (.../Ringtoets.Common.Data.TestUtil.Test.csproj) (revision 565199265c3608d4242ffeecb4e5ec1731e1dc84)
@@ -52,6 +52,7 @@
+
Index: Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/TestFailureMechanismSectionResultTest.cs
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/TestFailureMechanismSectionResultTest.cs (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/TestFailureMechanismSectionResultTest.cs (revision 565199265c3608d4242ffeecb4e5ec1731e1dc84)
@@ -0,0 +1,58 @@
+// 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 Core.Common.Base.Geometry;
+using NUnit.Framework;
+using Ringtoets.Common.Data.FailureMechanism;
+
+namespace Ringtoets.Common.Data.TestUtil.Test
+{
+ [TestFixture]
+ public class TestFailureMechanismSectionResultTest
+ {
+ [Test]
+ public void Constructor_WithoutSection_ThrowsArgumentNullException()
+ {
+ // Call
+ TestDelegate test = () => new TestFailureMechanismSectionResult(null);
+
+ // Assert
+ var paramName = Assert.Throws(test).ParamName;
+ Assert.AreEqual("section", paramName);
+ }
+
+ [Test]
+ public void Constructor_WithSection_ResultCreatedForSection()
+ {
+ // Setup
+ var section = new FailureMechanismSection("Section", new [] {new Point2D(0,0)});
+
+ // Call
+ var result = new TestFailureMechanismSectionResult(section);
+
+ // Assert
+ Assert.IsInstanceOf(result);
+ Assert.AreSame(section, result.Section);
+ Assert.IsFalse(result.AssessmentLayerOne);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/Ringtoets.Common.Data.TestUtil.csproj
===================================================================
diff -u -rea99af5c043eadf5c2ba83b82a847ae009181191 -r565199265c3608d4242ffeecb4e5ec1731e1dc84
--- Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/Ringtoets.Common.Data.TestUtil.csproj (.../Ringtoets.Common.Data.TestUtil.csproj) (revision ea99af5c043eadf5c2ba83b82a847ae009181191)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/Ringtoets.Common.Data.TestUtil.csproj (.../Ringtoets.Common.Data.TestUtil.csproj) (revision 565199265c3608d4242ffeecb4e5ec1731e1dc84)
@@ -49,6 +49,7 @@
+
Index: Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/TestFailureMechanism.cs
===================================================================
diff -u -rea99af5c043eadf5c2ba83b82a847ae009181191 -r565199265c3608d4242ffeecb4e5ec1731e1dc84
--- Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/TestFailureMechanism.cs (.../TestFailureMechanism.cs) (revision ea99af5c043eadf5c2ba83b82a847ae009181191)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/TestFailureMechanism.cs (.../TestFailureMechanism.cs) (revision 565199265c3608d4242ffeecb4e5ec1731e1dc84)
@@ -62,7 +62,7 @@
public override void AddSection(FailureMechanismSection section)
{
base.AddSection(section);
- sectionResults.Add(new FailureMechanismSectionResult(section));
+ sectionResults.Add(new TestFailureMechanismSectionResult(section));
}
public IEnumerable SectionResults
Index: Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/TestFailureMechanismSectionResult.cs
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/TestFailureMechanismSectionResult.cs (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/TestFailureMechanismSectionResult.cs (revision 565199265c3608d4242ffeecb4e5ec1731e1dc84)
@@ -0,0 +1,37 @@
+// 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 Ringtoets.Common.Data.FailureMechanism;
+
+namespace Ringtoets.Common.Data.TestUtil
+{
+ ///
+ /// Class represents the most simple implementation of a .
+ ///
+ public class TestFailureMechanismSectionResult : FailureMechanismSectionResult
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The for which the result was made.
+ public TestFailureMechanismSectionResult(FailureMechanismSection section) : base(section) { }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PresentationObjects/FailureMechanismSectionResultContextTest.cs
===================================================================
diff -u -r64d5609bb2912cd52dc74deffdd189222e240599 -r565199265c3608d4242ffeecb4e5ec1731e1dc84
--- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PresentationObjects/FailureMechanismSectionResultContextTest.cs (.../FailureMechanismSectionResultContextTest.cs) (revision 64d5609bb2912cd52dc74deffdd189222e240599)
+++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PresentationObjects/FailureMechanismSectionResultContextTest.cs (.../FailureMechanismSectionResultContextTest.cs) (revision 565199265c3608d4242ffeecb4e5ec1731e1dc84)
@@ -3,6 +3,7 @@
using NUnit.Framework;
using Rhino.Mocks;
using Ringtoets.Common.Data.FailureMechanism;
+using Ringtoets.Common.Data.TestUtil;
using Ringtoets.Common.Forms.PresentationObjects;
namespace Ringtoets.Common.Forms.Test.PresentationObjects
@@ -80,7 +81,7 @@
};
var section = new FailureMechanismSection("test", points);
- var sectionResult = new FailureMechanismSectionResult(section);
+ var sectionResult = new TestFailureMechanismSectionResult(section);
return sectionResult;
}
}
Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/FailureMechanismResultViewTest.cs
===================================================================
diff -u -r8abb584035c1788f6e1d92985da399a9921e3a09 -r565199265c3608d4242ffeecb4e5ec1731e1dc84
--- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/FailureMechanismResultViewTest.cs (.../FailureMechanismResultViewTest.cs) (revision 8abb584035c1788f6e1d92985da399a9921e3a09)
+++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/FailureMechanismResultViewTest.cs (.../FailureMechanismResultViewTest.cs) (revision 565199265c3608d4242ffeecb4e5ec1731e1dc84)
@@ -100,7 +100,7 @@
};
var section = new FailureMechanismSection("test", points);
- var sectionResult = new FailureMechanismSectionResult(section);
+ var sectionResult = new TestFailureMechanismSectionResult(section);
var testData = new List
{
sectionResult
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/CustomFailureMechanismResultViewTest.cs
===================================================================
diff -u -r80744f9014a001284116723df29bab8b319c38b7 -r565199265c3608d4242ffeecb4e5ec1731e1dc84
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/CustomFailureMechanismResultViewTest.cs (.../CustomFailureMechanismResultViewTest.cs) (revision 80744f9014a001284116723df29bab8b319c38b7)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/CustomFailureMechanismResultViewTest.cs (.../CustomFailureMechanismResultViewTest.cs) (revision 565199265c3608d4242ffeecb4e5ec1731e1dc84)
@@ -26,7 +26,9 @@
using Core.Common.Base.Geometry;
using NUnit.Extensions.Forms;
using NUnit.Framework;
+using Rhino.Mocks;
using Ringtoets.Common.Data.FailureMechanism;
+using Ringtoets.Common.Data.TestUtil;
using Ringtoets.Common.Forms.Properties;
using Ringtoets.Integration.Forms.Views;
@@ -200,10 +202,9 @@
{
new Point2D(0, 0)
});
- var result1 = new FailureMechanismSectionResult(section1);
- var result2 = new FailureMechanismSectionResult(section2);
+ var result1 = new TestFailureMechanismSectionResult(section1);
+ var result2 = new TestFailureMechanismSectionResult(section2);
-
using (var form = new Form())
{
using (var view = new CustomFailureMechanismResultView())
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SimpleFailureMechanismResultViewTest.cs
===================================================================
diff -u -r80744f9014a001284116723df29bab8b319c38b7 -r565199265c3608d4242ffeecb4e5ec1731e1dc84
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SimpleFailureMechanismResultViewTest.cs (.../SimpleFailureMechanismResultViewTest.cs) (revision 80744f9014a001284116723df29bab8b319c38b7)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SimpleFailureMechanismResultViewTest.cs (.../SimpleFailureMechanismResultViewTest.cs) (revision 565199265c3608d4242ffeecb4e5ec1731e1dc84)
@@ -26,7 +26,9 @@
using Core.Common.Base.Geometry;
using NUnit.Extensions.Forms;
using NUnit.Framework;
+using Rhino.Mocks;
using Ringtoets.Common.Data.FailureMechanism;
+using Ringtoets.Common.Data.TestUtil;
using Ringtoets.Common.Forms.Properties;
using Ringtoets.Integration.Forms.Views;
@@ -203,8 +205,8 @@
{
new Point2D(0, 0)
});
- var result1 = new FailureMechanismSectionResult(section1);
- var result2 = new FailureMechanismSectionResult(section2);
+ var result1 = new TestFailureMechanismSectionResult(section1);
+ var result2 = new TestFailureMechanismSectionResult(section2);
using (var form = new Form())
{