Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Views/HeightStructuresFailureMechanismSectionResultRow.cs
===================================================================
diff -u -r14f1c579d4a13b84eeb322356105360231ed5401 -r269d51134bff0653b473b7e0bbc53b98c304ab7d
--- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Views/HeightStructuresFailureMechanismSectionResultRow.cs (.../HeightStructuresFailureMechanismSectionResultRow.cs) (revision 14f1c579d4a13b84eeb322356105360231ed5401)
+++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Views/HeightStructuresFailureMechanismSectionResultRow.cs (.../HeightStructuresFailureMechanismSectionResultRow.cs) (revision 269d51134bff0653b473b7e0bbc53b98c304ab7d)
@@ -81,6 +81,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 tailor made assessment probability of the .
///
/// Thrown when is
Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresFailureMechanismSectionResultRowTest.cs
===================================================================
diff -u -r14f1c579d4a13b84eeb322356105360231ed5401 -r269d51134bff0653b473b7e0bbc53b98c304ab7d
--- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresFailureMechanismSectionResultRowTest.cs (.../HeightStructuresFailureMechanismSectionResultRowTest.cs) (revision 14f1c579d4a13b84eeb322356105360231ed5401)
+++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresFailureMechanismSectionResultRowTest.cs (.../HeightStructuresFailureMechanismSectionResultRowTest.cs) (revision 269d51134bff0653b473b7e0bbc53b98c304ab7d)
@@ -104,6 +104,8 @@
Assert.AreEqual("assessmentSection", exception.ParamName);
}
+ #region Registration
+
[Test]
public void SimpleAssessmentResult_AlwaysOnChange_NotifyObserversOfResultAndResultPropertyChanged()
{
@@ -132,6 +134,33 @@
}
[Test]
+ public void DetailedAssessmentResult_SetNewValue_NotifyObserversAndPropertyChanged()
+ {
+ // Setup
+ var mocks = new MockRepository();
+ var assessmentSection = mocks.Stub();
+ 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 HeightStructuresFailureMechanismSectionResult(section);
+ result.Attach(observer);
+
+ var row = new HeightStructuresFailureMechanismSectionResultRow(result, new HeightStructuresFailureMechanism(), assessmentSection);
+
+ // Call
+ row.DetailedAssessmentResult = newValue;
+
+ // Assert
+ Assert.AreEqual(newValue, result.DetailedAssessmentResult);
+ mocks.VerifyAll();
+ }
+
+ [Test]
public void DetailedAssessmentProbability_NoCalculationSet_ReturnNaN()
{
// Setup
@@ -331,5 +360,7 @@
Assert.AreEqual(expectedMessage, message);
mocks.VerifyAll();
}
+
+ #endregion
}
}
\ No newline at end of file