Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsFailureMechanismSectionResultRowTest.cs =================================================================== diff -u -r1b10713698cbe378c5e0be2b73ddb14e514fcdd7 -r798ea39ea76cdab602fae22326d16083b143e3d4 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsFailureMechanismSectionResultRowTest.cs (.../GrassCoverErosionInwardsFailureMechanismSectionResultRowTest.cs) (revision 1b10713698cbe378c5e0be2b73ddb14e514fcdd7) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsFailureMechanismSectionResultRowTest.cs (.../GrassCoverErosionInwardsFailureMechanismSectionResultRowTest.cs) (revision 798ea39ea76cdab602fae22326d16083b143e3d4) @@ -42,12 +42,11 @@ public void Constructor_WithParameters_ExpectedValues() { // Setup - var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); - mocks.ReplayAll(); - var failureMechanism = new GrassCoverErosionInwardsFailureMechanism(); + var mocks = new MockRepository(); + IAssessmentSection assessmentSection = AssessmentSectionHelper.CreateAssessmentSectionStub(failureMechanism, mocks); + FailureMechanismSection section = FailureMechanismSectionTestFactory.CreateFailureMechanismSection(); var result = new GrassCoverErosionInwardsFailureMechanismSectionResult(section); @@ -56,7 +55,7 @@ // Assert Assert.IsInstanceOf>(row); - Assert.AreEqual(result.AssessmentLayerTwoA, row.AssessmentLayerTwoA); + Assert.AreEqual(result.GetAssessmentLayerTwoA(failureMechanism, assessmentSection), row.AssessmentLayerTwoA); Assert.AreEqual(row.AssessmentLayerThree, result.AssessmentLayerThree); TestHelper.AssertTypeConverter( @@ -132,12 +131,11 @@ public void AssessmentLayerTwoA_CalculationNotDone_ReturnNaN(CalculationScenarioStatus status) { // Setup - var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); - mocks.ReplayAll(); - var failureMechanism = new GrassCoverErosionInwardsFailureMechanism(); + var mocks = new MockRepository(); + IAssessmentSection assessmentSection = AssessmentSectionHelper.CreateAssessmentSectionStub(failureMechanism, mocks); + var calculation = new GrassCoverErosionInwardsCalculation(); if (status == CalculationScenarioStatus.Failed) { @@ -166,16 +164,14 @@ public void AssessmentLayerTwoA_CalculationSuccessful_ReturnAssessmentLayerTwoA() { // Setup - const double probability = 0.95; - var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); - mocks.ReplayAll(); - var failureMechanism = new GrassCoverErosionInwardsFailureMechanism(); + var mocks = new MockRepository(); + IAssessmentSection assessmentSection = AssessmentSectionHelper.CreateAssessmentSectionStub(failureMechanism, mocks); + var calculation = new GrassCoverErosionInwardsCalculation { - Output = new GrassCoverErosionInwardsOutput(new TestOvertoppingOutput(probability), + Output = new GrassCoverErosionInwardsOutput(new TestOvertoppingOutput(0.95), new TestDikeHeightOutput(0), new TestOvertoppingRateOutput(0)) }; @@ -192,7 +188,7 @@ double assessmentLayerTwoA = resultRow.AssessmentLayerTwoA; // Assert - Assert.AreEqual(probability, assessmentLayerTwoA); + Assert.AreEqual(0.17105612630848185, assessmentLayerTwoA); mocks.VerifyAll(); }