Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/Views/StabilityPointStructuresFailureMechanismSectionResultRow.cs
===================================================================
diff -u -r0cd69ba0625074aa3562ee931d873286f63cf213 -r9fbb85cdbc3fd1dd58ae2d03dbe37fe2714d0e04
--- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/Views/StabilityPointStructuresFailureMechanismSectionResultRow.cs (.../StabilityPointStructuresFailureMechanismSectionResultRow.cs) (revision 0cd69ba0625074aa3562ee931d873286f63cf213)
+++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/Views/StabilityPointStructuresFailureMechanismSectionResultRow.cs (.../StabilityPointStructuresFailureMechanismSectionResultRow.cs) (revision 9fbb85cdbc3fd1dd58ae2d03dbe37fe2714d0e04)
@@ -111,6 +111,22 @@
}
///
+ /// Gets or sets the value representing the tailor made assessment result.
+ ///
+ public TailorMadeAssessmentProbabilityCalculationResultType TailorMadeAssessmentResult
+ {
+ get
+ {
+ return SectionResult.TailorMadeAssessmentResult;
+ }
+ set
+ {
+ SectionResult.TailorMadeAssessmentResult = value;
+ UpdateInternalData();
+ }
+ }
+
+ ///
/// Gets or sets the value of the tailored assessment of safety.
///
/// Thrown when
Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/Views/StabilityPointStructuresFailureMechanismSectionResultRowTest.cs
===================================================================
diff -u -r0cd69ba0625074aa3562ee931d873286f63cf213 -r9fbb85cdbc3fd1dd58ae2d03dbe37fe2714d0e04
--- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/Views/StabilityPointStructuresFailureMechanismSectionResultRowTest.cs (.../StabilityPointStructuresFailureMechanismSectionResultRowTest.cs) (revision 0cd69ba0625074aa3562ee931d873286f63cf213)
+++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/Views/StabilityPointStructuresFailureMechanismSectionResultRowTest.cs (.../StabilityPointStructuresFailureMechanismSectionResultRowTest.cs) (revision 9fbb85cdbc3fd1dd58ae2d03dbe37fe2714d0e04)
@@ -312,6 +312,36 @@
}
[Test]
+ public void TailorMadeAssessmentResult_SetNewValue_NotifyObserversAndPropertyChanged()
+ {
+ // Setup
+ var failureMechanism = new StabilityPointStructuresFailureMechanism();
+
+ var mocks = new MockRepository();
+ IAssessmentSection assessmentSection = AssessmentSectionHelper.CreateAssessmentSectionStub(failureMechanism, mocks);
+ 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 StabilityPointStructuresFailureMechanismSectionResult(section);
+ result.Attach(observer);
+
+ var row = new StabilityPointStructuresFailureMechanismSectionResultRow(
+ result, failureMechanism, assessmentSection);
+
+ // Call
+ row.TailorMadeAssessmentResult = newValue;
+
+ // Assert
+ Assert.AreEqual(newValue, result.TailorMadeAssessmentResult);
+ mocks.VerifyAll();
+ }
+
+ [Test]
[TestCase(0)]
[TestCase(1)]
[TestCase(0.5)]