Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PresentationObjects/ProbabilityFailureMechanismSectionResultContextTest.cs =================================================================== diff -u -rf603458169b1e2544bc933b05f169cc1637d59b2 -rf5b9652936357f6b97e4fc332b25f1c666248c3d --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PresentationObjects/ProbabilityFailureMechanismSectionResultContextTest.cs (.../ProbabilityFailureMechanismSectionResultContextTest.cs) (revision f603458169b1e2544bc933b05f169cc1637d59b2) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PresentationObjects/ProbabilityFailureMechanismSectionResultContextTest.cs (.../ProbabilityFailureMechanismSectionResultContextTest.cs) (revision f5b9652936357f6b97e4fc332b25f1c666248c3d) @@ -25,7 +25,6 @@ using Rhino.Mocks; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.FailureMechanism; -using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.Forms.PresentationObjects; namespace Ringtoets.Common.Forms.Test.PresentationObjects @@ -36,13 +35,20 @@ [Test] public void Constructor_AssessmentSectionNull_ThrowsArgumentNullException() { + // Setup + var mocks = new MockRepository(); + var sectionResults = mocks.Stub>(); + var failureMechanism = mocks.Stub(); + mocks.ReplayAll(); + // Call TestDelegate call = () => new ProbabilityFailureMechanismSectionResultContext( - new ObservableList(), new TestFailureMechanism(), null); + sectionResults, failureMechanism, null); // Assert var exception = Assert.Throws(call); Assert.AreEqual("assessmentSection", exception.ParamName); + mocks.VerifyAll(); } [Test] @@ -51,13 +57,13 @@ // Setup var mocks = new MockRepository(); var assessmentSection = mocks.Stub(); + var failureMechanism = mocks.Stub(); + var sectionResults = mocks.Stub>(); mocks.ReplayAll(); - IObservableEnumerable sectionResults = new ObservableList(); - var failureMechanism = new TestFailureMechanism(); - // Call - var context = new ProbabilityFailureMechanismSectionResultContext(sectionResults, failureMechanism, assessmentSection); + var context = new ProbabilityFailureMechanismSectionResultContext( + sectionResults, failureMechanism, assessmentSection); // Assert Assert.IsInstanceOf>(context);