Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/AssessmentSectionCreateExtensions.cs
===================================================================
diff -u -r583a729a502f52ca415627efcb2287886e8efb1d -reef76311cf166ff9bf9f08b3c5ca879307b7f7d7
--- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/AssessmentSectionCreateExtensions.cs (.../AssessmentSectionCreateExtensions.cs) (revision 583a729a502f52ca415627efcb2287886e8efb1d)
+++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/AssessmentSectionCreateExtensions.cs (.../AssessmentSectionCreateExtensions.cs) (revision eef76311cf166ff9bf9f08b3c5ca879307b7f7d7)
@@ -70,7 +70,7 @@
Id = section.Id.DeepClone(),
Name = section.Name.DeepClone(),
Composition = (short) section.Composition,
- Comments = section.Comments.DeepClone(),
+ Comments = section.Comments.Comments.DeepClone(),
Norm = section.FailureMechanismContribution.Norm,
Order = order
};
Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/AssessmentSectionEntityReadExtensions.cs
===================================================================
diff -u -r86ce17cdf5cf329f4d5bcd444320994fead52294 -reef76311cf166ff9bf9f08b3c5ca879307b7f7d7
--- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/AssessmentSectionEntityReadExtensions.cs (.../AssessmentSectionEntityReadExtensions.cs) (revision 86ce17cdf5cf329f4d5bcd444320994fead52294)
+++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/AssessmentSectionEntityReadExtensions.cs (.../AssessmentSectionEntityReadExtensions.cs) (revision eef76311cf166ff9bf9f08b3c5ca879307b7f7d7)
@@ -54,7 +54,10 @@
{
Id = entity.Id,
Name = entity.Name,
- Comments = entity.Comments,
+ Comments =
+ {
+ Comments = entity.Comments
+ },
FailureMechanismContribution =
{
Norm = entity.Norm
Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/AssessmentSectionCreateExtensionsTest.cs
===================================================================
diff -u -rae14c5d4e4624fa87390e6d63bb419c648e12dda -reef76311cf166ff9bf9f08b3c5ca879307b7f7d7
--- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/AssessmentSectionCreateExtensionsTest.cs (.../AssessmentSectionCreateExtensionsTest.cs) (revision ae14c5d4e4624fa87390e6d63bb419c648e12dda)
+++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/AssessmentSectionCreateExtensionsTest.cs (.../AssessmentSectionCreateExtensionsTest.cs) (revision eef76311cf166ff9bf9f08b3c5ca879307b7f7d7)
@@ -68,7 +68,10 @@
{
Id = testId,
Name = testName,
- Comments = comments,
+ Comments =
+ {
+ Comments = comments
+ },
FailureMechanismContribution =
{
Norm = norm
@@ -124,7 +127,10 @@
var section = new AssessmentSection(AssessmentSectionComposition.Dike)
{
Name = originalName,
- Comments = originalComments
+ Comments =
+ {
+ Comments = originalComments
+ }
};
var registry = new PersistenceRegistry();
Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/AssessmentSectionEntityReadExtensionsTest.cs
===================================================================
diff -u -r8e310b99d8873ca1a46282c54302acb1d1678dab -reef76311cf166ff9bf9f08b3c5ca879307b7f7d7
--- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/AssessmentSectionEntityReadExtensionsTest.cs (.../AssessmentSectionEntityReadExtensionsTest.cs) (revision 8e310b99d8873ca1a46282c54302acb1d1678dab)
+++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/AssessmentSectionEntityReadExtensionsTest.cs (.../AssessmentSectionEntityReadExtensionsTest.cs) (revision eef76311cf166ff9bf9f08b3c5ca879307b7f7d7)
@@ -80,7 +80,7 @@
Assert.IsNotNull(section);
Assert.AreEqual(testId, section.Id);
Assert.AreEqual(testName, section.Name);
- Assert.AreEqual(comments, section.Comments);
+ Assert.AreEqual(comments, section.Comments.Comments);
Assert.AreEqual(norm, section.FailureMechanismContribution.Norm);
Assert.AreEqual(assessmentSectionComposition, section.Composition);
Assert.IsNull(section.HydraulicBoundaryDatabase);
Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresFailureMechanismViewTest.cs
===================================================================
diff -u -radddff4153e676955aceeb958276c710a731cec4 -reef76311cf166ff9bf9f08b3c5ca879307b7f7d7
--- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresFailureMechanismViewTest.cs (.../ClosingStructuresFailureMechanismViewTest.cs) (revision adddff4153e676955aceeb958276c710a731cec4)
+++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresFailureMechanismViewTest.cs (.../ClosingStructuresFailureMechanismViewTest.cs) (revision eef76311cf166ff9bf9f08b3c5ca879307b7f7d7)
@@ -813,7 +813,7 @@
{
public string Id { get; set; }
public string Name { get; set; }
- public string Comments { get; set; }
+ public Commentable Comments { get; private set; }
public AssessmentSectionComposition Composition { get; private set; }
public ReferenceLine ReferenceLine { get; set; }
public FailureMechanismContribution FailureMechanismContribution { get; private set; }
Index: Ringtoets/Common/src/Ringtoets.Common.Data/AssessmentSection/IAssessmentSection.cs
===================================================================
diff -u -r11f0867b39150ae5fac83dc178a89fee46d27611 -reef76311cf166ff9bf9f08b3c5ca879307b7f7d7
--- Ringtoets/Common/src/Ringtoets.Common.Data/AssessmentSection/IAssessmentSection.cs (.../IAssessmentSection.cs) (revision 11f0867b39150ae5fac83dc178a89fee46d27611)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/AssessmentSection/IAssessmentSection.cs (.../IAssessmentSection.cs) (revision eef76311cf166ff9bf9f08b3c5ca879307b7f7d7)
@@ -30,7 +30,7 @@
///
/// Base implementation of assessment sections.
///
- public interface IAssessmentSection : ICommentable, IObservable
+ public interface IAssessmentSection : IObservable
{
///
/// Gets the identifier of the assessment section.
@@ -43,6 +43,11 @@
string Name { get; set; }
///
+ /// Gets the comments associated with the assessment section.
+ ///
+ Commentable Comments { get; }
+
+ ///
/// Gets the composition of the assessment section, i.e. what type of elements can
/// be found within the assessment section.
///
Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/FailureMechanismViewTest.cs
===================================================================
diff -u -r52289b39d16efbf1ea1cd2980d62a8541527d23c -reef76311cf166ff9bf9f08b3c5ca879307b7f7d7
--- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/FailureMechanismViewTest.cs (.../FailureMechanismViewTest.cs) (revision 52289b39d16efbf1ea1cd2980d62a8541527d23c)
+++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/FailureMechanismViewTest.cs (.../FailureMechanismViewTest.cs) (revision eef76311cf166ff9bf9f08b3c5ca879307b7f7d7)
@@ -29,6 +29,7 @@
using Core.Components.Gis.Data;
using Core.Components.Gis.Forms;
using NUnit.Framework;
+using Ringtoets.Common.Data;
using Ringtoets.Common.Data.AssessmentSection;
using Ringtoets.Common.Data.Contribution;
using Ringtoets.Common.Data.FailureMechanism;
@@ -524,7 +525,7 @@
{
public string Id { get; set; }
public string Name { get; set; }
- public string Comments { get; set; }
+ public Commentable Comments { get; private set; }
public AssessmentSectionComposition Composition { get; private set; }
public ReferenceLine ReferenceLine { get; set; }
public FailureMechanismContribution FailureMechanismContribution { get; private set; }
Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/HydraulicBoundaryLocationsViewTest.cs
===================================================================
diff -u -r650277f75faab8d29b4a07b738f0fd2a99ac7ed3 -reef76311cf166ff9bf9f08b3c5ca879307b7f7d7
--- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/HydraulicBoundaryLocationsViewTest.cs (.../HydraulicBoundaryLocationsViewTest.cs) (revision 650277f75faab8d29b4a07b738f0fd2a99ac7ed3)
+++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/HydraulicBoundaryLocationsViewTest.cs (.../HydraulicBoundaryLocationsViewTest.cs) (revision eef76311cf166ff9bf9f08b3c5ca879307b7f7d7)
@@ -30,6 +30,7 @@
using NUnit.Extensions.Forms;
using NUnit.Framework;
using Rhino.Mocks;
+using Ringtoets.Common.Data;
using Ringtoets.Common.Data.AssessmentSection;
using Ringtoets.Common.Data.Contribution;
using Ringtoets.Common.Data.FailureMechanism;
@@ -361,7 +362,7 @@
private class TestAssessmentSection : Observable, IAssessmentSection
{
- public string Comments { get; set; }
+ public Commentable Comments { get; private set; }
public string Id { get; set; }
Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsFailureMechanismViewTest.cs
===================================================================
diff -u -radddff4153e676955aceeb958276c710a731cec4 -reef76311cf166ff9bf9f08b3c5ca879307b7f7d7
--- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsFailureMechanismViewTest.cs (.../GrassCoverErosionInwardsFailureMechanismViewTest.cs) (revision adddff4153e676955aceeb958276c710a731cec4)
+++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsFailureMechanismViewTest.cs (.../GrassCoverErosionInwardsFailureMechanismViewTest.cs) (revision eef76311cf166ff9bf9f08b3c5ca879307b7f7d7)
@@ -29,6 +29,7 @@
using Core.Components.Gis.Data;
using Core.Components.Gis.Forms;
using NUnit.Framework;
+using Ringtoets.Common.Data;
using Ringtoets.Common.Data.AssessmentSection;
using Ringtoets.Common.Data.Contribution;
using Ringtoets.Common.Data.DikeProfiles;
@@ -809,7 +810,7 @@
{
public string Id { get; set; }
public string Name { get; set; }
- public string Comments { get; set; }
+ public Commentable Comments { get; private set; }
public AssessmentSectionComposition Composition { get; private set; }
public ReferenceLine ReferenceLine { get; set; }
public FailureMechanismContribution FailureMechanismContribution { get; private set; }
Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsFailureMechanismViewTest.cs
===================================================================
diff -u -radddff4153e676955aceeb958276c710a731cec4 -reef76311cf166ff9bf9f08b3c5ca879307b7f7d7
--- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsFailureMechanismViewTest.cs (.../GrassCoverErosionOutwardsFailureMechanismViewTest.cs) (revision adddff4153e676955aceeb958276c710a731cec4)
+++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsFailureMechanismViewTest.cs (.../GrassCoverErosionOutwardsFailureMechanismViewTest.cs) (revision eef76311cf166ff9bf9f08b3c5ca879307b7f7d7)
@@ -29,6 +29,7 @@
using Core.Components.Gis.Data;
using Core.Components.Gis.Forms;
using NUnit.Framework;
+using Ringtoets.Common.Data;
using Ringtoets.Common.Data.AssessmentSection;
using Ringtoets.Common.Data.Contribution;
using Ringtoets.Common.Data.DikeProfiles;
@@ -744,7 +745,7 @@
{
public string Id { get; set; }
public string Name { get; set; }
- public string Comments { get; set; }
+ public Commentable Comments { get; private set; }
public AssessmentSectionComposition Composition { get; private set; }
public ReferenceLine ReferenceLine { get; set; }
public FailureMechanismContribution FailureMechanismContribution { get; private set; }
Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs
===================================================================
diff -u -r7ae9100ff4e61169edcefaeb01b72d492431742f -reef76311cf166ff9bf9f08b3c5ca879307b7f7d7
--- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs) (revision 7ae9100ff4e61169edcefaeb01b72d492431742f)
+++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs) (revision eef76311cf166ff9bf9f08b3c5ca879307b7f7d7)
@@ -420,28 +420,5 @@
view.Data = locations;
return view;
}
-
- private class TestAssessmentSection : Observable, IAssessmentSection
- {
- public TestAssessmentSection()
- {
- FailureMechanismContribution = new FailureMechanismContribution(Enumerable.Empty(), 0, 300000);
- }
-
- public string Comments { get; set; }
- public string Id { get; set; }
- public string Name { get; set; }
- public AssessmentSectionComposition Composition { get; private set; }
- public ReferenceLine ReferenceLine { get; set; }
- public FailureMechanismContribution FailureMechanismContribution { get; private set; }
- public HydraulicBoundaryDatabase HydraulicBoundaryDatabase { get; set; }
-
- public IEnumerable GetFailureMechanisms()
- {
- yield break;
- }
-
- public void ChangeComposition(AssessmentSectionComposition newComposition) {}
- }
}
}
\ No newline at end of file
Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresFailureMechanismViewTest.cs
===================================================================
diff -u -radddff4153e676955aceeb958276c710a731cec4 -reef76311cf166ff9bf9f08b3c5ca879307b7f7d7
--- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresFailureMechanismViewTest.cs (.../HeightStructuresFailureMechanismViewTest.cs) (revision adddff4153e676955aceeb958276c710a731cec4)
+++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresFailureMechanismViewTest.cs (.../HeightStructuresFailureMechanismViewTest.cs) (revision eef76311cf166ff9bf9f08b3c5ca879307b7f7d7)
@@ -812,7 +812,7 @@
{
public string Id { get; set; }
public string Name { get; set; }
- public string Comments { get; set; }
+ public Commentable Comments { get; private set; }
public AssessmentSectionComposition Composition { get; private set; }
public ReferenceLine ReferenceLine { get; set; }
public FailureMechanismContribution FailureMechanismContribution { get; private set; }
Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/AssessmentSection.cs
===================================================================
diff -u -r814349430deb526dabf1cd5ac5bd71e0ff3597cb -reef76311cf166ff9bf9f08b3c5ca879307b7f7d7
--- Ringtoets/Integration/src/Ringtoets.Integration.Data/AssessmentSection.cs (.../AssessmentSection.cs) (revision 814349430deb526dabf1cd5ac5bd71e0ff3597cb)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Data/AssessmentSection.cs (.../AssessmentSection.cs) (revision eef76311cf166ff9bf9f08b3c5ca879307b7f7d7)
@@ -24,6 +24,7 @@
using Core.Common.Base;
using Core.Common.Base.Geometry;
using Ringtoets.ClosingStructures.Data;
+using Ringtoets.Common.Data;
using Ringtoets.Common.Data.AssessmentSection;
using Ringtoets.Common.Data.Contribution;
using Ringtoets.Common.Data.FailureMechanism;
@@ -55,6 +56,7 @@
public AssessmentSection(AssessmentSectionComposition composition)
{
Name = Resources.AssessmentSection_DisplayName;
+ Comments = new Commentable();
PipingFailureMechanism = new PipingFailureMechanism();
GrassCoverErosionInwards = new GrassCoverErosionInwardsFailureMechanism();
@@ -174,7 +176,7 @@
public string Name { get; set; }
- public string Comments { get; set; }
+ public Commentable Comments { get; private set; }
public AssessmentSectionComposition Composition { get; private set; }
Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs
===================================================================
diff -u -r7618e47c7ff0d09102d56e2c25545f57a4269352 -reef76311cf166ff9bf9f08b3c5ca879307b7f7d7
--- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs (.../RingtoetsPlugin.cs) (revision 7618e47c7ff0d09102d56e2c25545f57a4269352)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs (.../RingtoetsPlugin.cs) (revision eef76311cf166ff9bf9f08b3c5ca879307b7f7d7)
@@ -1017,7 +1017,7 @@
private static IEnumerable GetCommentableElements(IAssessmentSection assessmentSection)
{
- yield return assessmentSection;
+ yield return assessmentSection.Comments;
foreach (var commentable in assessmentSection.GetFailureMechanisms().SelectMany(GetCommentableElements))
{
yield return commentable;
@@ -1046,7 +1046,7 @@
new ReferenceLineContext(nodeData),
new FailureMechanismContributionContext(nodeData.FailureMechanismContribution, nodeData),
new HydraulicBoundaryDatabaseContext(nodeData),
- new CommentContext(nodeData)
+ new CommentContext(nodeData.Comments)
};
IEnumerable