Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/PresentationObjects/GrassCoverErosionOutwardsDesignWaterLevelCalculationsGroupContext.cs =================================================================== diff -u -ra6b891e507d9ffaeb11f85651cb02ae394f37065 -r674f11dfe18c7b7353adea889fdff691353ad272 --- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/PresentationObjects/GrassCoverErosionOutwardsDesignWaterLevelCalculationsGroupContext.cs (.../GrassCoverErosionOutwardsDesignWaterLevelCalculationsGroupContext.cs) (revision a6b891e507d9ffaeb11f85651cb02ae394f37065) +++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/PresentationObjects/GrassCoverErosionOutwardsDesignWaterLevelCalculationsGroupContext.cs (.../GrassCoverErosionOutwardsDesignWaterLevelCalculationsGroupContext.cs) (revision 674f11dfe18c7b7353adea889fdff691353ad272) @@ -21,9 +21,9 @@ using System; using Core.Common.Base; -using Core.Common.Controls.PresentationObjects; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.Hydraulics; +using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.GrassCoverErosionOutwards.Data; namespace Ringtoets.GrassCoverErosionOutwards.Forms.PresentationObjects @@ -33,7 +33,7 @@ /// with a design water level calculation result. /// public class GrassCoverErosionOutwardsDesignWaterLevelCalculationsGroupContext - : ObservableWrappedObjectContextBase> + : DesignWaterLevelCalculationsGroupContext { /// /// Creates a new instance of . @@ -45,30 +45,19 @@ public GrassCoverErosionOutwardsDesignWaterLevelCalculationsGroupContext(ObservableList wrappedData, GrassCoverErosionOutwardsFailureMechanism failureMechanism, IAssessmentSection assessmentSection) - : base(wrappedData) + : base(wrappedData, assessmentSection) { if (failureMechanism == null) { throw new ArgumentNullException(nameof(failureMechanism)); } - if (assessmentSection == null) - { - throw new ArgumentNullException(nameof(assessmentSection)); - } - FailureMechanism = failureMechanism; - AssessmentSection = assessmentSection; } /// /// Gets the failure mechanism the context belongs to. /// public GrassCoverErosionOutwardsFailureMechanism FailureMechanism { get; } - - /// - /// Gets the assessment section the context belongs to. - /// - public IAssessmentSection AssessmentSection { get; } } } \ No newline at end of file Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/PresentationObjects/GrassCoverErosionOutwardsWaveHeightCalculationsGroupContext.cs =================================================================== diff -u -r64f4e09afafa0f3cf367f00be5cae318ff973be6 -r674f11dfe18c7b7353adea889fdff691353ad272 --- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/PresentationObjects/GrassCoverErosionOutwardsWaveHeightCalculationsGroupContext.cs (.../GrassCoverErosionOutwardsWaveHeightCalculationsGroupContext.cs) (revision 64f4e09afafa0f3cf367f00be5cae318ff973be6) +++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/PresentationObjects/GrassCoverErosionOutwardsWaveHeightCalculationsGroupContext.cs (.../GrassCoverErosionOutwardsWaveHeightCalculationsGroupContext.cs) (revision 674f11dfe18c7b7353adea889fdff691353ad272) @@ -21,9 +21,9 @@ using System; using Core.Common.Base; -using Core.Common.Controls.PresentationObjects; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.Hydraulics; +using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.GrassCoverErosionOutwards.Data; namespace Ringtoets.GrassCoverErosionOutwards.Forms.PresentationObjects @@ -33,7 +33,7 @@ /// with a wave height calculation result. /// public class GrassCoverErosionOutwardsWaveHeightCalculationsGroupContext - : ObservableWrappedObjectContextBase> + : WaveHeightCalculationsGroupContext { /// /// Creates a new instance of . @@ -45,30 +45,19 @@ public GrassCoverErosionOutwardsWaveHeightCalculationsGroupContext(ObservableList wrappedData, GrassCoverErosionOutwardsFailureMechanism failureMechanism, IAssessmentSection assessmentSection) - : base(wrappedData) + : base(wrappedData, assessmentSection) { if (failureMechanism == null) { throw new ArgumentNullException(nameof(failureMechanism)); } - if (assessmentSection == null) - { - throw new ArgumentNullException(nameof(assessmentSection)); - } - FailureMechanism = failureMechanism; - AssessmentSection = assessmentSection; } /// /// Gets the failure mechanism the context belongs to. /// public GrassCoverErosionOutwardsFailureMechanism FailureMechanism { get; } - - /// - /// Gets the assessment section the context belongs to. - /// - public IAssessmentSection AssessmentSection { get; } } } \ No newline at end of file Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PresentationObjects/GrassCoverErosionOutwardsDesignWaterLevelCalculationsGroupContextTest.cs =================================================================== diff -u -ra6b891e507d9ffaeb11f85651cb02ae394f37065 -r674f11dfe18c7b7353adea889fdff691353ad272 --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PresentationObjects/GrassCoverErosionOutwardsDesignWaterLevelCalculationsGroupContextTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelCalculationsGroupContextTest.cs) (revision a6b891e507d9ffaeb11f85651cb02ae394f37065) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PresentationObjects/GrassCoverErosionOutwardsDesignWaterLevelCalculationsGroupContextTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelCalculationsGroupContextTest.cs) (revision 674f11dfe18c7b7353adea889fdff691353ad272) @@ -21,11 +21,11 @@ using System; using Core.Common.Base; -using Core.Common.Controls.PresentationObjects; using NUnit.Framework; using Rhino.Mocks; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.Hydraulics; +using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.GrassCoverErosionOutwards.Data; using Ringtoets.GrassCoverErosionOutwards.Forms.PresentationObjects; @@ -49,7 +49,7 @@ var context = new GrassCoverErosionOutwardsDesignWaterLevelCalculationsGroupContext(locations, failureMechanism, assessmentSection); // Assert - Assert.IsInstanceOf>>(context); + Assert.IsInstanceOf(context); Assert.AreSame(locations, context.WrappedData); Assert.AreSame(failureMechanism, context.FailureMechanism); Assert.AreSame(assessmentSection, context.AssessmentSection); @@ -74,19 +74,5 @@ Assert.AreEqual("failureMechanism", exception.ParamName); mocks.VerifyAll(); } - - [Test] - public void Constructor_AssessmentSectionNull_ThrowsArgumentNullException() - { - // Call - TestDelegate call = () => new GrassCoverErosionOutwardsDesignWaterLevelCalculationsGroupContext( - new ObservableList(), - new GrassCoverErosionOutwardsFailureMechanism(), - null); - - // Assert - var exception = Assert.Throws(call); - Assert.AreEqual("assessmentSection", exception.ParamName); - } } } \ No newline at end of file Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PresentationObjects/GrassCoverErosionOutwardsWaveHeightCalculationsGroupContextTest.cs =================================================================== diff -u -r64f4e09afafa0f3cf367f00be5cae318ff973be6 -r674f11dfe18c7b7353adea889fdff691353ad272 --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PresentationObjects/GrassCoverErosionOutwardsWaveHeightCalculationsGroupContextTest.cs (.../GrassCoverErosionOutwardsWaveHeightCalculationsGroupContextTest.cs) (revision 64f4e09afafa0f3cf367f00be5cae318ff973be6) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PresentationObjects/GrassCoverErosionOutwardsWaveHeightCalculationsGroupContextTest.cs (.../GrassCoverErosionOutwardsWaveHeightCalculationsGroupContextTest.cs) (revision 674f11dfe18c7b7353adea889fdff691353ad272) @@ -21,11 +21,11 @@ using System; using Core.Common.Base; -using Core.Common.Controls.PresentationObjects; using NUnit.Framework; using Rhino.Mocks; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.Hydraulics; +using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.GrassCoverErosionOutwards.Data; using Ringtoets.GrassCoverErosionOutwards.Forms.PresentationObjects; @@ -49,7 +49,7 @@ var context = new GrassCoverErosionOutwardsWaveHeightCalculationsGroupContext(locations, failureMechanism, assessmentSection); // Assert - Assert.IsInstanceOf>>(context); + Assert.IsInstanceOf(context); Assert.AreSame(locations, context.WrappedData); Assert.AreSame(failureMechanism, context.FailureMechanism); Assert.AreSame(assessmentSection, context.AssessmentSection); @@ -74,19 +74,5 @@ Assert.AreEqual("failureMechanism", exception.ParamName); mocks.VerifyAll(); } - - [Test] - public void Constructor_AssessmentSectionNull_ThrowsArgumentNullException() - { - // Call - TestDelegate call = () => new GrassCoverErosionOutwardsWaveHeightCalculationsGroupContext( - new ObservableList(), - new GrassCoverErosionOutwardsFailureMechanism(), - null); - - // Assert - var exception = Assert.Throws(call); - Assert.AreEqual("assessmentSection", exception.ParamName); - } } } \ No newline at end of file