Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/TreeNodeInfos/DesignWaterLevelCalculationsGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -rf8f82b94a5b6a3a47b2b32fc1a8ab704b33f356b -r4218a421a57a8044e5112abac83f6650234f80ec --- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/TreeNodeInfos/DesignWaterLevelCalculationsGroupContextTreeNodeInfoTest.cs (.../DesignWaterLevelCalculationsGroupContextTreeNodeInfoTest.cs) (revision f8f82b94a5b6a3a47b2b32fc1a8ab704b33f356b) +++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/TreeNodeInfos/DesignWaterLevelCalculationsGroupContextTreeNodeInfoTest.cs (.../DesignWaterLevelCalculationsGroupContextTreeNodeInfoTest.cs) (revision 4218a421a57a8044e5112abac83f6650234f80ec) @@ -30,9 +30,8 @@ using NUnit.Framework; using Rhino.Mocks; using Ringtoets.Common.Data.AssessmentSection; -using Ringtoets.Common.Data.Contribution; -using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.Hydraulics; +using Ringtoets.Common.Data.TestUtil; using Ringtoets.Integration.Forms.PresentationObjects; using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; @@ -151,18 +150,10 @@ const double signalingNorm = 0.002; const double lowerLimitNorm = 0.005; - var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); - assessmentSection.Expect(a => a.FailureMechanismContribution) - .Return(new FailureMechanismContribution( - Enumerable.Empty(), - 10, - lowerLimitNorm, - signalingNorm)) - .Repeat.Any(); + var assessmentSection = new ObservableTestAssessmentSectionStub(); + assessmentSection.FailureMechanismContribution.LowerLimitNorm = lowerLimitNorm; + assessmentSection.FailureMechanismContribution.SignalingNorm = signalingNorm; - mocks.ReplayAll(); - var locations = new ObservableList(); var calculationsGroupContext = new DesignWaterLevelCalculationsGroupContext(locations, assessmentSection); @@ -182,23 +173,21 @@ Assert.IsTrue(calculationsContexts.All(c => ReferenceEquals(assessmentSection, c.AssessmentSection))); Assert.AreEqual("Categorie A+->A", calculationsContexts[0].CategoryBoundaryName); - CollectionAssert.AreEqual(locations.Select(loc => loc.DesignWaterLevelCalculation1), calculationsContexts[0].WrappedData); + Assert.AreSame(assessmentSection.WaterLevelCalculationsForFactorizedSignalingNorm, calculationsContexts[0].WrappedData); Assert.AreEqual(signalingNorm / 30, calculationsContexts[0].GetNormFunc()); Assert.AreEqual("Categorie A->B", calculationsContexts[1].CategoryBoundaryName); - CollectionAssert.AreEqual(locations.Select(loc => loc.DesignWaterLevelCalculation2), calculationsContexts[1].WrappedData); + Assert.AreSame(assessmentSection.WaterLevelCalculationsForSignalingNorm, calculationsContexts[1].WrappedData); Assert.AreEqual(signalingNorm, calculationsContexts[1].GetNormFunc()); Assert.AreEqual("Categorie B->C", calculationsContexts[2].CategoryBoundaryName); - CollectionAssert.AreEqual(locations.Select(loc => loc.DesignWaterLevelCalculation3), calculationsContexts[2].WrappedData); + Assert.AreSame(assessmentSection.WaterLevelCalculationsForLowerLimitNorm, calculationsContexts[2].WrappedData); Assert.AreEqual(lowerLimitNorm, calculationsContexts[2].GetNormFunc()); Assert.AreEqual("Categorie C->D", calculationsContexts[3].CategoryBoundaryName); - CollectionAssert.AreEqual(locations.Select(loc => loc.DesignWaterLevelCalculation4), calculationsContexts[3].WrappedData); + Assert.AreSame(assessmentSection.WaterLevelCalculationsForFactorizedLowerLimitNorm, calculationsContexts[3].WrappedData); Assert.AreEqual(lowerLimitNorm * 30, calculationsContexts[3].GetNormFunc()); } - - mocks.VerifyAll(); } private static TreeNodeInfo GetInfo(RingtoetsPlugin plugin)