Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PresentationObjects/FailureMechanismSectionResultContextTest.cs =================================================================== diff -u -rf603458169b1e2544bc933b05f169cc1637d59b2 -rf5b9652936357f6b97e4fc332b25f1c666248c3d --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PresentationObjects/FailureMechanismSectionResultContextTest.cs (.../FailureMechanismSectionResultContextTest.cs) (revision f603458169b1e2544bc933b05f169cc1637d59b2) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PresentationObjects/FailureMechanismSectionResultContextTest.cs (.../FailureMechanismSectionResultContextTest.cs) (revision f5b9652936357f6b97e4fc332b25f1c666248c3d) @@ -21,12 +21,10 @@ using System; using Core.Common.Base; -using Core.Common.Base.Geometry; using Core.Common.Controls.PresentationObjects; 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 @@ -40,19 +38,15 @@ // Setup var mocks = new MockRepository(); var failureMechanism = mocks.Stub(); + var sectionResults = mocks.Stub>(); mocks.ReplayAll(); - var failureMechanismSectionResults = new ObservableList - { - CreateFailureMechanismSectionResult() - }; - // Call - var context = new FailureMechanismSectionResultContext(failureMechanismSectionResults, failureMechanism); + var context = new FailureMechanismSectionResultContext(sectionResults, failureMechanism); // Assert Assert.IsInstanceOf>>(context); - Assert.AreSame(failureMechanismSectionResults, context.WrappedData); + Assert.AreSame(sectionResults, context.WrappedData); Assert.AreSame(failureMechanism, context.FailureMechanism); mocks.VerifyAll(); } @@ -61,31 +55,17 @@ public void Constructor_FailureMechanismNull_ThrowsArgumentNullException() { // Setup - FailureMechanismSectionResult sectionResult = CreateFailureMechanismSectionResult(); + var mocks = new MockRepository(); + var sectionResults = mocks.Stub>(); + mocks.ReplayAll(); // Call - TestDelegate call = () => new FailureMechanismSectionResultContext( - new ObservableList - { - sectionResult - }, null); + TestDelegate call = () => new FailureMechanismSectionResultContext(sectionResults, null); // Assert var exception = Assert.Throws(call); Assert.AreEqual("failureMechanism", exception.ParamName); + mocks.VerifyAll(); } - - private static FailureMechanismSectionResult CreateFailureMechanismSectionResult() - { - var points = new[] - { - new Point2D(1, 2), - new Point2D(3, 4) - }; - - var section = new FailureMechanismSection("test", points); - var sectionResult = new TestFailureMechanismSectionResult(section); - return sectionResult; - } } } \ No newline at end of file