Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultRows/MacroStabilityOutwardsSectionResultRow.cs
===================================================================
diff -u -r6bf62bc0a3a325a5ea3c02c39958a74726377b8b -r0ce3b4060bd6f506be441ad65ef646167b7987aa
--- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultRows/MacroStabilityOutwardsSectionResultRow.cs (.../MacroStabilityOutwardsSectionResultRow.cs) (revision 6bf62bc0a3a325a5ea3c02c39958a74726377b8b)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultRows/MacroStabilityOutwardsSectionResultRow.cs (.../MacroStabilityOutwardsSectionResultRow.cs) (revision 0ce3b4060bd6f506be441ad65ef646167b7987aa)
@@ -58,6 +58,22 @@
}
///
+ /// Gets or sets the value representing the detailed assessment result.
+ ///
+ public DetailedAssessmentResultType DetailedAssessmentResult
+ {
+ get
+ {
+ return SectionResult.DetailedAssessmentResult;
+ }
+ set
+ {
+ SectionResult.DetailedAssessmentResult = value;
+ SectionResult.NotifyObservers();
+ }
+ }
+
+ ///
/// Gets or sets the detailed assessment probability of the .
///
/// Thrown when is
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/MacroStabilityOutwardsSectionResultRowTest.cs
===================================================================
diff -u -r6bf62bc0a3a325a5ea3c02c39958a74726377b8b -r0ce3b4060bd6f506be441ad65ef646167b7987aa
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/MacroStabilityOutwardsSectionResultRowTest.cs (.../MacroStabilityOutwardsSectionResultRowTest.cs) (revision 6bf62bc0a3a325a5ea3c02c39958a74726377b8b)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/MacroStabilityOutwardsSectionResultRowTest.cs (.../MacroStabilityOutwardsSectionResultRowTest.cs) (revision 0ce3b4060bd6f506be441ad65ef646167b7987aa)
@@ -50,6 +50,7 @@
// Assert
Assert.IsInstanceOf>(row);
Assert.AreEqual(result.SimpleAssessmentResult, row.SimpleAssessmentResult);
+ Assert.AreEqual(result.DetailedAssessmentResult, row.DetailedAssessmentResult);
Assert.AreEqual(result.DetailedAssessmentProbability, row.DetailedAssessmentProbability);
Assert.AreEqual(result.TailorMadeAssessmentProbability, row.TailorMadeAssessmentProbability);
@@ -88,6 +89,32 @@
}
[Test]
+ public void DetailedAssessmentResult_SetNewValue_NotifyObserversAndPropertyChanged()
+ {
+ // Setup
+ var mocks = new MockRepository();
+ var observer = mocks.StrictMock();
+ observer.Expect(o => o.UpdateObserver());
+ mocks.ReplayAll();
+
+ var random = new Random(39);
+ var newValue = random.NextEnumValue();
+
+ FailureMechanismSection section = FailureMechanismSectionTestFactory.CreateFailureMechanismSection();
+ var result = new MacroStabilityOutwardsFailureMechanismSectionResult(section);
+ result.Attach(observer);
+
+ var row = new MacroStabilityOutwardsSectionResultRow(result);
+
+ // Call
+ row.DetailedAssessmentResult = newValue;
+
+ // Assert
+ Assert.AreEqual(newValue, result.DetailedAssessmentResult);
+ mocks.VerifyAll();
+ }
+
+ [Test]
[TestCase(0)]
[TestCase(1)]
[TestCase(0.5)]