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 failureMechanismContexts = WrapFailureMechanismsInContexts(nodeData); Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/AssessmentSectionTest.cs =================================================================== diff -u -r4a204921c07e423981a5c4c0e51202a9859abe25 -reef76311cf166ff9bf9f08b3c5ca879307b7f7d7 --- Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/AssessmentSectionTest.cs (.../AssessmentSectionTest.cs) (revision 4a204921c07e423981a5c4c0e51202a9859abe25) +++ Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/AssessmentSectionTest.cs (.../AssessmentSectionTest.cs) (revision eef76311cf166ff9bf9f08b3c5ca879307b7f7d7) @@ -24,7 +24,6 @@ using Core.Common.Base; using Core.Common.Base.Geometry; using NUnit.Framework; -using Ringtoets.Common.Data; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.Contribution; using Ringtoets.Common.Data.FailureMechanism; @@ -110,10 +109,9 @@ // Assert Assert.IsInstanceOf(section); Assert.IsInstanceOf(section); - Assert.IsInstanceOf(section); Assert.AreEqual("Traject", section.Name); - Assert.IsNull(section.Comments); + Assert.IsNull(section.Comments.Comments); Assert.IsNull(section.ReferenceLine); Assert.AreEqual(composition, section.Composition); Assert.IsInstanceOf(section.FailureMechanismContribution); @@ -173,10 +171,10 @@ const string newValue = "new comment value"; // Call - section.Comments = newValue; + section.Comments.Comments = newValue; // Assert - Assert.AreEqual(newValue, section.Comments); + Assert.AreEqual(newValue, section.Comments.Comments); } [Test] Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/AssessmentSectionTreeNodeInfoTest.cs =================================================================== diff -u -r2973c5f790a5131e427bd5f73e2a620044199639 -reef76311cf166ff9bf9f08b3c5ca879307b7f7d7 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/AssessmentSectionTreeNodeInfoTest.cs (.../AssessmentSectionTreeNodeInfoTest.cs) (revision 2973c5f790a5131e427bd5f73e2a620044199639) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/AssessmentSectionTreeNodeInfoTest.cs (.../AssessmentSectionTreeNodeInfoTest.cs) (revision eef76311cf166ff9bf9f08b3c5ca879307b7f7d7) @@ -164,7 +164,7 @@ Assert.AreSame(assessmentSection, context.WrappedData); var commentContext = (CommentContext) objects[3]; - Assert.AreSame(assessmentSection, commentContext.WrappedData); + Assert.AreSame(assessmentSection.Comments, commentContext.WrappedData); var pipingFailureMechanismContext = (PipingFailureMechanismContext) objects[4]; Assert.AreSame(assessmentSection.PipingFailureMechanism, pipingFailureMechanismContext.WrappedData); Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/AssessmentSectionViewTest.cs =================================================================== diff -u -rc09cca89155759682fcb5f11e1c4bf35051795b0 -reef76311cf166ff9bf9f08b3c5ca879307b7f7d7 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/AssessmentSectionViewTest.cs (.../AssessmentSectionViewTest.cs) (revision c09cca89155759682fcb5f11e1c4bf35051795b0) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/AssessmentSectionViewTest.cs (.../AssessmentSectionViewTest.cs) (revision eef76311cf166ff9bf9f08b3c5ca879307b7f7d7) @@ -28,6 +28,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; @@ -372,7 +373,7 @@ public AssessmentSectionComposition Composition { get; private set; } - public string Comments { get; set; } + public Commentable Comments { get; private set; } public ReferenceLine ReferenceLine { get; set; } Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/DesignWaterLevelLocationsViewTest.cs =================================================================== diff -u -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 -reef76311cf166ff9bf9f08b3c5ca879307b7f7d7 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/DesignWaterLevelLocationsViewTest.cs (.../DesignWaterLevelLocationsViewTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/DesignWaterLevelLocationsViewTest.cs (.../DesignWaterLevelLocationsViewTest.cs) (revision eef76311cf166ff9bf9f08b3c5ca879307b7f7d7) @@ -29,6 +29,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; @@ -353,7 +354,7 @@ FailureMechanismContribution = new FailureMechanismContribution(Enumerable.Empty(), 0, 300000); } - public string Comments { get; set; } + public Commentable Comments { get; private set; } public string Id { get; set; } public string Name { get; set; } public AssessmentSectionComposition Composition { get; private set; } Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WaveHeightLocationsViewTest.cs =================================================================== diff -u -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 -reef76311cf166ff9bf9f08b3c5ca879307b7f7d7 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WaveHeightLocationsViewTest.cs (.../WaveHeightLocationsViewTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WaveHeightLocationsViewTest.cs (.../WaveHeightLocationsViewTest.cs) (revision eef76311cf166ff9bf9f08b3c5ca879307b7f7d7) @@ -29,6 +29,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; @@ -323,7 +324,7 @@ FailureMechanismContribution = new FailureMechanismContribution(Enumerable.Empty(), 0, 300000); } - public string Comments { get; set; } + public Commentable Comments { get; private set; } public string Id { get; set; } public string Name { get; set; } public AssessmentSectionComposition Composition { get; private set; } Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/ViewInfos/CommentViewInfoTest.cs =================================================================== diff -u -r1fc8bda15c287de13ee83b96004e4d28c8ae54d8 -reef76311cf166ff9bf9f08b3c5ca879307b7f7d7 --- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/ViewInfos/CommentViewInfoTest.cs (.../CommentViewInfoTest.cs) (revision 1fc8bda15c287de13ee83b96004e4d28c8ae54d8) +++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/ViewInfos/CommentViewInfoTest.cs (.../CommentViewInfoTest.cs) (revision eef76311cf166ff9bf9f08b3c5ca879307b7f7d7) @@ -162,11 +162,12 @@ // Setup var assessmentSection = mocks.Stub(); assessmentSection.Stub(s => s.GetFailureMechanisms()).Return(Enumerable.Empty()); + assessmentSection.Stub(s => s.Comments).Return(new Commentable()); mocks.ReplayAll(); using (var view = new CommentView { - Data = assessmentSection + Data = assessmentSection.Comments }) { // Call @@ -187,11 +188,12 @@ var viewDataAssessmentSection = mocks.Stub(); viewDataAssessmentSection.Stub(s => s.GetFailureMechanisms()).Return(Enumerable.Empty()); + viewDataAssessmentSection.Stub(s => s.Comments).Return(new Commentable()); mocks.ReplayAll(); using (var view = new CommentView { - Data = viewDataAssessmentSection + Data = viewDataAssessmentSection.Comments }) { // Call Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingFailureMechanismViewTest.cs =================================================================== diff -u -r0b7a1c98a784ad9ac3eff8c0e8f1fae117ab47f0 -reef76311cf166ff9bf9f08b3c5ca879307b7f7d7 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingFailureMechanismViewTest.cs (.../PipingFailureMechanismViewTest.cs) (revision 0b7a1c98a784ad9ac3eff8c0e8f1fae117ab47f0) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingFailureMechanismViewTest.cs (.../PipingFailureMechanismViewTest.cs) (revision eef76311cf166ff9bf9f08b3c5ca879307b7f7d7) @@ -30,6 +30,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; @@ -866,7 +867,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/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/Views/StabilityPointStructuresFailureMechanismViewTest.cs =================================================================== diff -u -radddff4153e676955aceeb958276c710a731cec4 -reef76311cf166ff9bf9f08b3c5ca879307b7f7d7 --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/Views/StabilityPointStructuresFailureMechanismViewTest.cs (.../StabilityPointStructuresFailureMechanismViewTest.cs) (revision adddff4153e676955aceeb958276c710a731cec4) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/Views/StabilityPointStructuresFailureMechanismViewTest.cs (.../StabilityPointStructuresFailureMechanismViewTest.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/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Forms.Test/Views/StabilityStoneCoverFailureMechanismViewTest.cs =================================================================== diff -u -radddff4153e676955aceeb958276c710a731cec4 -reef76311cf166ff9bf9f08b3c5ca879307b7f7d7 --- Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Forms.Test/Views/StabilityStoneCoverFailureMechanismViewTest.cs (.../StabilityStoneCoverFailureMechanismViewTest.cs) (revision adddff4153e676955aceeb958276c710a731cec4) +++ Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Forms.Test/Views/StabilityStoneCoverFailureMechanismViewTest.cs (.../StabilityStoneCoverFailureMechanismViewTest.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/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Forms.Test/Views/WaveImpactAsphaltCoverFailureMechanismViewTest.cs =================================================================== diff -u -radddff4153e676955aceeb958276c710a731cec4 -reef76311cf166ff9bf9f08b3c5ca879307b7f7d7 --- Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Forms.Test/Views/WaveImpactAsphaltCoverFailureMechanismViewTest.cs (.../WaveImpactAsphaltCoverFailureMechanismViewTest.cs) (revision adddff4153e676955aceeb958276c710a731cec4) +++ Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Forms.Test/Views/WaveImpactAsphaltCoverFailureMechanismViewTest.cs (.../WaveImpactAsphaltCoverFailureMechanismViewTest.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; }