Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsWaveConditionsInputContextPropertiesTest.cs =================================================================== diff -u -r24967d60d31f04145505353b45b80f77b9dc1610 -rad45524a6f877e082b77d9bafc1cee0e956367dd --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsWaveConditionsInputContextPropertiesTest.cs (.../GrassCoverErosionOutwardsWaveConditionsInputContextPropertiesTest.cs) (revision 24967d60d31f04145505353b45b80f77b9dc1610) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsWaveConditionsInputContextPropertiesTest.cs (.../GrassCoverErosionOutwardsWaveConditionsInputContextPropertiesTest.cs) (revision ad45524a6f877e082b77d9bafc1cee0e956367dd) @@ -19,8 +19,8 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. -using System; using System.ComponentModel; +using Core.Common.Base.Data; using Core.Common.TestUtil; using NUnit.Framework; using Rhino.Mocks; @@ -49,41 +49,6 @@ } [Test] - public void Constructor_WithoutContext_ThrowsArgumentNullException() - { - // Setup - mockRepository.ReplayAll(); - - // Call - TestDelegate test = () => new GrassCoverErosionOutwardsWaveConditionsInputContextProperties(null, handler); - - // Assert - string paramName = Assert.Throws(test).ParamName; - Assert.AreEqual("context", paramName); - } - - [Test] - public void Constructor_WithoutHandler_ThrowArgumentNullException() - { - // Setup - mockRepository.ReplayAll(); - - var context = new GrassCoverErosionOutwardsWaveConditionsInputContext( - new WaveConditionsInput(), - new TestWaveConditionsCalculation(), - new ObservableTestAssessmentSectionStub(), - new GrassCoverErosionOutwardsFailureMechanism()); - - // Call - TestDelegate test = () => new GrassCoverErosionOutwardsWaveConditionsInputContextProperties(context, null); - - // Assert - var exception = Assert.Throws(test); - Assert.AreEqual("handler", exception.ParamName); - mockRepository.VerifyAll(); - } - - [Test] public void Constructor_ExpectedValues() { // Setup @@ -94,7 +59,7 @@ new GrassCoverErosionOutwardsFailureMechanism()); // Call - var properties = new GrassCoverErosionOutwardsWaveConditionsInputContextProperties(context, handler); + var properties = new GrassCoverErosionOutwardsWaveConditionsInputContextProperties(context, GetTestNormativeAssessmentLevel, handler); // Assert Assert.IsInstanceOf>(properties); @@ -113,7 +78,7 @@ new GrassCoverErosionOutwardsFailureMechanism()); // Call - var properties = new GrassCoverErosionOutwardsWaveConditionsInputContextProperties(context, handler); + var properties = new GrassCoverErosionOutwardsWaveConditionsInputContextProperties(context, GetTestNormativeAssessmentLevel, handler); // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); @@ -135,5 +100,10 @@ Assert.AreEqual("Bovengrens op basis van waterstand bij doorsnede-eis [m+NAP]", upperBoundaryDesignWaterLevelProperty.DisplayName); Assert.AreEqual("Bovengrens bepaald aan de hand van de waarde van de waterstand bij doorsnede-eis op de geselecteerde hydraulische locatie.", upperBoundaryDesignWaterLevelProperty.Description); } + + private static RoundedDouble GetTestNormativeAssessmentLevel() + { + return (RoundedDouble) 1.1; + } } } \ No newline at end of file Index: Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Forms.Test/PropertyClasses/StabilityStoneCoverWaveConditionsInputContextPropertiesTest.cs =================================================================== diff -u -ra34386047edccd595192296d53343ebd694fb3a3 -rad45524a6f877e082b77d9bafc1cee0e956367dd --- Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Forms.Test/PropertyClasses/StabilityStoneCoverWaveConditionsInputContextPropertiesTest.cs (.../StabilityStoneCoverWaveConditionsInputContextPropertiesTest.cs) (revision a34386047edccd595192296d53343ebd694fb3a3) +++ Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Forms.Test/PropertyClasses/StabilityStoneCoverWaveConditionsInputContextPropertiesTest.cs (.../StabilityStoneCoverWaveConditionsInputContextPropertiesTest.cs) (revision ad45524a6f877e082b77d9bafc1cee0e956367dd) @@ -19,8 +19,8 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. -using System; using System.Linq; +using Core.Common.Base.Data; using NUnit.Framework; using Rhino.Mocks; using Ringtoets.Common.Data.AssessmentSection; @@ -38,22 +38,6 @@ public class StabilityStoneCoverWaveConditionsInputContextPropertiesTest { [Test] - public void Constructor_WithoutContext_ThrowsArgumentNullException() - { - var mockRepository = new MockRepository(); - var handler = mockRepository.Stub(); - mockRepository.ReplayAll(); - - // Call - TestDelegate test = () => new StabilityStoneCoverWaveConditionsInputContextProperties(null, handler); - - // Assert - string paramName = Assert.Throws(test).ParamName; - Assert.AreEqual("context", paramName); - mockRepository.VerifyAll(); - } - - [Test] public void Constructor_ExpectedValues() { // Setup @@ -69,7 +53,7 @@ Enumerable.Empty()); // Call - var properties = new StabilityStoneCoverWaveConditionsInputContextProperties(context, handler); + var properties = new StabilityStoneCoverWaveConditionsInputContextProperties(context, () => (RoundedDouble) 1.1, handler); // Assert Assert.IsInstanceOf>(properties); Index: Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Forms.Test/PropertyClasses/WaveImpactAsphaltCoverWaveConditionsInputContextPropertiesTest.cs =================================================================== diff -u -rc7ba4922c371ad3801025e09aee5c3c3b0d26c8d -rad45524a6f877e082b77d9bafc1cee0e956367dd --- Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Forms.Test/PropertyClasses/WaveImpactAsphaltCoverWaveConditionsInputContextPropertiesTest.cs (.../WaveImpactAsphaltCoverWaveConditionsInputContextPropertiesTest.cs) (revision c7ba4922c371ad3801025e09aee5c3c3b0d26c8d) +++ Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Forms.Test/PropertyClasses/WaveImpactAsphaltCoverWaveConditionsInputContextPropertiesTest.cs (.../WaveImpactAsphaltCoverWaveConditionsInputContextPropertiesTest.cs) (revision ad45524a6f877e082b77d9bafc1cee0e956367dd) @@ -19,8 +19,8 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. -using System; using System.Linq; +using Core.Common.Base.Data; using NUnit.Framework; using Rhino.Mocks; using Ringtoets.Common.Data.AssessmentSection; @@ -38,22 +38,6 @@ public class WaveImpactAsphaltCoverWaveConditionsInputContextPropertiesTest { [Test] - public void Constructor_WithoutContext_ThrowsArgumentNullException() - { - var mockRepository = new MockRepository(); - var handler = mockRepository.Stub(); - mockRepository.ReplayAll(); - - // Call - TestDelegate test = () => new WaveImpactAsphaltCoverWaveConditionsInputContextProperties(null, handler); - - // Assert - string paramName = Assert.Throws(test).ParamName; - Assert.AreEqual("context", paramName); - mockRepository.ReplayAll(); - } - - [Test] public void Constructor_ExpectedValues() { // Setup @@ -69,7 +53,7 @@ Enumerable.Empty()); // Call - var properties = new WaveImpactAsphaltCoverWaveConditionsInputContextProperties(context, handler); + var properties = new WaveImpactAsphaltCoverWaveConditionsInputContextProperties(context, () => (RoundedDouble) 1.1, handler); // Assert Assert.IsInstanceOf>(properties);