Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/PropertyClasses/ClosingStructuresFailureMechanismPropertiesTest.cs =================================================================== diff -u -r1bbf51443c907b5f202e80764fa05f2e7f842c04 -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/PropertyClasses/ClosingStructuresFailureMechanismPropertiesTest.cs (.../ClosingStructuresFailureMechanismPropertiesTest.cs) (revision 1bbf51443c907b5f202e80764fa05f2e7f842c04) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/PropertyClasses/ClosingStructuresFailureMechanismPropertiesTest.cs (.../ClosingStructuresFailureMechanismPropertiesTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -268,7 +268,7 @@ [TestCase(-1)] [TestCase(41)] [TestCase(141)] - public void N2A_InvalidValue_ThrowsArgumentOutOfRangeExceptionNoNotifcations(int value) + public void N2A_InvalidValue_ThrowsArgumentOutOfRangeExceptionNoNotifications(int value) { // Setup var mockRepository = new MockRepository(); Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/PropertyClasses/ClosingStructuresInputContextPropertiesTest.cs =================================================================== diff -u -r2d104a54ab378eea92fd946b40cff2bd79ca39b0 -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/PropertyClasses/ClosingStructuresInputContextPropertiesTest.cs (.../ClosingStructuresInputContextPropertiesTest.cs) (revision 2d104a54ab378eea92fd946b40cff2bd79ca39b0) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/PropertyClasses/ClosingStructuresInputContextPropertiesTest.cs (.../ClosingStructuresInputContextPropertiesTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -577,103 +577,103 @@ public void FactorStormDurationOpenStructure_Always_InputChangedAndObservablesNotified() { RoundedDouble factor = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.FactorStormDurationOpenStructure = factor); } [Test] public void InflowModelType_Always_InputChangedAndObservablesNotified() { var inflowModelType = new Random(21).NextEnumValue(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.InflowModelType = inflowModelType); } [Test] public void ProbabilityOrFrequencyOpenStructureBeforeFlooding_Always_InputChangedAndObservablesNotified() { var random = new Random(21); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.ProbabilityOrFrequencyOpenStructureBeforeFlooding = random.NextDouble()); } [Test] public void FailureProbabilityOpenStructure_Always_InputChangedAndObservablesNotified() { var random = new Random(21); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.FailureProbabilityOpenStructure = random.NextDouble()); } [Test] public void FailureProbabilityReparation_Always_InputChangedAndObservablesNotified() { var random = new Random(21); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.FailureProbabilityReparation = random.NextDouble()); } [Test] public void IdenticalApertures_Always_InputChangedAndObservablesNotified() { int propertiesIdenticalApertures = new Random(21).Next(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.IdenticalApertures = propertiesIdenticalApertures); } [Test] public void InsideWaterLevel_MeanChanged_InputChangedAndObservablesNotified() { RoundedDouble newMean = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.InsideWaterLevel.Mean = newMean); } [Test] public void ModelFactorSuperCriticalFlow_MeanChanged_InputChangedAndObservablesNotified() { RoundedDouble newMean = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.ModelFactorSuperCriticalFlow.Mean = newMean); } [Test] public void WidthFlowApertures_MeanChanged_InputChangedAndObservablesNotified() { RoundedDouble newMean = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.WidthFlowApertures.Mean = newMean); } [Test] public void ThresholdHeightOpenWeir_MeanChanged_InputChangedAndObservablesNotified() { RoundedDouble newMean = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.ThresholdHeightOpenWeir.Mean = newMean); } [Test] public void AreaFlowApertures_MeanChanged_InputChangedAndObservablesNotified() { RoundedDouble newMean = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.AreaFlowApertures.Mean = newMean); } [Test] public void DrainCoefficient_MeanChanged_InputChangedAndObservablesNotified() { RoundedDouble newMean = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.DrainCoefficient.Mean = newMean); } [Test] public void LevelCrestStructureNotClosing_MeanChanged_InputChangedAndObservablesNotified() { RoundedDouble newMean = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.LevelCrestStructureNotClosing.Mean = newMean); } @@ -839,7 +839,7 @@ Assert.IsTrue(properties.DynamicVisibleValidationMethod(null)); } - private void SetPropertyAndVerifyNotifcationsAndOutput(Action setProperty) + private void SetPropertyAndVerifyNotificationsAndOutput(Action setProperty) { // Setup var observable = mockRepository.StrictMock(); Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/StructuresInputBasePropertiesTest.cs =================================================================== diff -u -re71b611930c2ed5cea2117df1fd1effd3d45f4f4 -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/StructuresInputBasePropertiesTest.cs (.../StructuresInputBasePropertiesTest.cs) (revision e71b611930c2ed5cea2117df1fd1effd3d45f4f4) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/StructuresInputBasePropertiesTest.cs (.../StructuresInputBasePropertiesTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -752,111 +752,111 @@ public void Structure_Always_InputChangedAndObservablesNotified() { var structure = new TestStructure(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.Structure = structure); } [Test] public void StructureNormalOrientation_Always_InputChangedAndObservablesNotified() { RoundedDouble orientation = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.StructureNormalOrientation = orientation); } [Test] public void FailureProbabilityStructureWithErosion_Always_InputChangedAndObservablesNotified() { var random = new Random(21); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.FailureProbabilityStructureWithErosion = random.NextDouble()); } [Test] public void SelectedHydraulicBoundaryLocation_Always_InputChangedAndObservablesNotified() { var location = new SelectableHydraulicBoundaryLocation(CreateHydraulicBoundaryLocation(), null); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.SelectedHydraulicBoundaryLocation = location); } [Test] public void ForeshoreProfile_Always_InputChangedAndObservablesNotified() { var profile = new TestForeshoreProfile(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.ForeshoreProfile = profile); } [Test] public void UseBreakWater_Always_InputChangedAndObservablesNotified() { bool useBreakWater = new Random(21).NextBoolean(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.UseBreakWater.UseBreakWater = useBreakWater); } [Test] public void UseForeshore_Always_InputChangedAndObservablesNotified() { bool useForeshore = new Random(21).NextBoolean(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.UseForeshore.UseForeshore = useForeshore); } [Test] public void ModelFactorSuperCriticalFlow_MeanChanged_InputChangedAndObservablesNotified() { RoundedDouble newMean = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.ModelFactorSuperCriticalFlow.Mean = newMean); } [Test] public void FlowWidthAtBottomProtection_MeanChanged_InputChangedAndObservablesNotified() { RoundedDouble newMean = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.FlowWidthAtBottomProtection.Mean = newMean); } [Test] public void WidthFlowApertures_MeanChanged_InputChangedAndObservablesNotified() { RoundedDouble newMean = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.WidthFlowApertures.Mean = newMean); } [Test] public void StorageStructureArea_MeanChanged_InputChangedAndObservablesNotified() { RoundedDouble newMean = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.StorageStructureArea.Mean = newMean); } [Test] public void AllowedLevelIncreaseStorage_MeanChanged_InputChangedAndObservablesNotified() { RoundedDouble newMean = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.AllowedLevelIncreaseStorage.Mean = newMean); } [Test] public void CriticalOvertoppingDischarge_MeanChanged_InputChangedAndObservablesNotified() { RoundedDouble newMean = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.CriticalOvertoppingDischarge.Mean = newMean); } [Test] public void StormDuration_MeanChanged_InputChangedAndObservablesNotified() { RoundedDouble newMean = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.StormDuration.Mean = newMean); } @@ -1066,7 +1066,7 @@ : base(wrappedData, calculation, failureMechanism, assessmentSection) {} } - private void SetPropertyAndVerifyNotifcationsAndOutput(Action setProperty) + private void SetPropertyAndVerifyNotificationsAndOutput(Action setProperty) { // Setup var observable = mockRepository.StrictMock(); Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/UseBreakWaterPropertiesTest.cs =================================================================== diff -u -rbcdabbbbd7fae323c339fdabc8bcb390962ccbcc -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/UseBreakWaterPropertiesTest.cs (.../UseBreakWaterPropertiesTest.cs) (revision bcdabbbbd7fae323c339fdabc8bcb390962ccbcc) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/UseBreakWaterPropertiesTest.cs (.../UseBreakWaterPropertiesTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -192,23 +192,23 @@ public void DikeHeight_Always_InputNotifiedAndPropertyChangedCalled() { RoundedDouble breakWaterHeight = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutputForCalculation(properties => properties.BreakWaterHeight = breakWaterHeight, + SetPropertyAndVerifyNotificationsAndOutputForCalculation(properties => properties.BreakWaterHeight = breakWaterHeight, new TestUseBreakWater()); } [Test] public void BreakWaterType_Always_InputNotifiedAndPropertyChangedCalled() { var type = new Random(21).NextEnumValue(); - SetPropertyAndVerifyNotifcationsAndOutputForCalculation(properties => properties.BreakWaterType = type, + SetPropertyAndVerifyNotificationsAndOutputForCalculation(properties => properties.BreakWaterType = type, new TestUseBreakWater()); } [Test] public void UseBreakWater_Always_InputNotifiedAndPropertyChangedCalled() { bool useBreakWater = new Random(21).NextBoolean(); - SetPropertyAndVerifyNotifcationsAndOutputForCalculation(properties => properties.UseBreakWater = useBreakWater, + SetPropertyAndVerifyNotificationsAndOutputForCalculation(properties => properties.UseBreakWater = useBreakWater, new TestUseBreakWater()); } @@ -223,7 +223,7 @@ public BreakWater BreakWater { get; set; } } - private void SetPropertyAndVerifyNotifcationsAndOutputForCalculation( + private void SetPropertyAndVerifyNotificationsAndOutputForCalculation( Action setProperty, TestUseBreakWater input) { Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/UseForeshorePropertiesTest.cs =================================================================== diff -u -rbcdabbbbd7fae323c339fdabc8bcb390962ccbcc -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/UseForeshorePropertiesTest.cs (.../UseForeshorePropertiesTest.cs) (revision bcdabbbbd7fae323c339fdabc8bcb390962ccbcc) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/UseForeshorePropertiesTest.cs (.../UseForeshorePropertiesTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -142,7 +142,7 @@ public void UseForeshore_Always_InputNotifiedAndPropertyChangedCalled() { bool useForeshore = new Random(21).NextBoolean(); - SetPropertyAndVerifyNotifcationsAndOutputForCalculation(properties => properties.UseForeshore = useForeshore, + SetPropertyAndVerifyNotificationsAndOutputForCalculation(properties => properties.UseForeshore = useForeshore, new TestUseForeshore()); } @@ -184,7 +184,7 @@ true); } - private void SetPropertyAndVerifyNotifcationsAndOutputForCalculation( + private void SetPropertyAndVerifyNotificationsAndOutputForCalculation( Action setProperty, TestUseForeshore input) { Index: Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Forms.Test/PropertyClasses/DuneErosionFailureMechanismPropertiesTest.cs =================================================================== diff -u -r1bbf51443c907b5f202e80764fa05f2e7f842c04 -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Forms.Test/PropertyClasses/DuneErosionFailureMechanismPropertiesTest.cs (.../DuneErosionFailureMechanismPropertiesTest.cs) (revision 1bbf51443c907b5f202e80764fa05f2e7f842c04) +++ Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Forms.Test/PropertyClasses/DuneErosionFailureMechanismPropertiesTest.cs (.../DuneErosionFailureMechanismPropertiesTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -227,10 +227,10 @@ } [Test] - [TestCase(0, TestName = "LenghtEffect_InvalidValue_ThrowsArgumentOutOfRangeExceptionNoNotifcations(0)")] - [TestCase(-1, TestName = "LenghtEffect_InvalidValue_ThrowsArgumentOutOfRangeExceptionNoNotifcations(-1)")] - [TestCase(-20, TestName = "LenghtEffect_InvalidValue_ThrowsArgumentOutOfRangeExceptionNoNotifcations(-20)")] - public void LengthEffect_SetInvalidValue_ThrowsThrowsArgumentOutOfRangeExceptionNoNotifcations(double newLengthEffect) + [TestCase(0, TestName = "LenghtEffect_InvalidValue_ThrowsArgumentOutOfRangeExceptionNoNotifications(0)")] + [TestCase(-1, TestName = "LenghtEffect_InvalidValue_ThrowsArgumentOutOfRangeExceptionNoNotifications(-1)")] + [TestCase(-20, TestName = "LenghtEffect_InvalidValue_ThrowsArgumentOutOfRangeExceptionNoNotifications(-20)")] + public void LengthEffect_SetInvalidValue_ThrowsThrowsArgumentOutOfRangeExceptionNoNotifications(double newLengthEffect) { // Setup var mockRepository = new MockRepository(); Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsFailureMechanismContextPropertiesTest.cs =================================================================== diff -u -r1bbf51443c907b5f202e80764fa05f2e7f842c04 -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsFailureMechanismContextPropertiesTest.cs (.../GrassCoverErosionInwardsFailureMechanismContextPropertiesTest.cs) (revision 1bbf51443c907b5f202e80764fa05f2e7f842c04) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsFailureMechanismContextPropertiesTest.cs (.../GrassCoverErosionInwardsFailureMechanismContextPropertiesTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -264,10 +264,10 @@ } [Test] - [TestCase(0, TestName = "LenghtEffect_InvalidValue_ThrowsArgumentOutOfRangeExceptionNoNotifcations(0)")] - [TestCase(-1, TestName = "LenghtEffect_InvalidValue_ThrowsArgumentOutOfRangeExceptionNoNotifcations(-1)")] - [TestCase(-20, TestName = "LenghtEffect_InvalidValue_ThrowsArgumentOutOfRangeExceptionNoNotifcations(-20)")] - public void LengthEffect_SetInvalidValue_ThrowsThrowsArgumentOutOfRangeExceptionNoNotifcations(int newLengthEffect) + [TestCase(0, TestName = "LenghtEffect_InvalidValue_ThrowsArgumentOutOfRangeExceptionNoNotifications(0)")] + [TestCase(-1, TestName = "LenghtEffect_InvalidValue_ThrowsArgumentOutOfRangeExceptionNoNotifications(-1)")] + [TestCase(-20, TestName = "LenghtEffect_InvalidValue_ThrowsArgumentOutOfRangeExceptionNoNotifications(-20)")] + public void LengthEffect_SetInvalidValue_ThrowsThrowsArgumentOutOfRangeExceptionNoNotifications(int newLengthEffect) { // Setup var assessmentSection = mockRepository.Stub(); Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsInputContextPropertiesTest.cs =================================================================== diff -u -r1a65774d3fc35f4900cf80afce506be96384f63a -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsInputContextPropertiesTest.cs (.../GrassCoverErosionInwardsInputContextPropertiesTest.cs) (revision 1a65774d3fc35f4900cf80afce506be96384f63a) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsInputContextPropertiesTest.cs (.../GrassCoverErosionInwardsInputContextPropertiesTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -229,64 +229,64 @@ RoundedDouble orientation = new Random(21).NextRoundedDouble(); // Call & Assert - SetPropertyAndVerifyNotifcationsAndOutput(properties => properties.Orientation = orientation); + SetPropertyAndVerifyNotificationsAndOutput(properties => properties.Orientation = orientation); } [Test] public void DikeHeight_Always_InputChangedAndObservablesNotified() { RoundedDouble dikeHeight = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput(properties => properties.DikeHeight = dikeHeight); + SetPropertyAndVerifyNotificationsAndOutput(properties => properties.DikeHeight = dikeHeight); } [Test] public void DikeHeightCalculationType_Always_InputChangedAndObservablesNotified() { var dikeHeightCalculationType = new Random(21).NextEnumValue(); - SetPropertyAndVerifyNotifcationsAndOutput(properties => properties.DikeHeightCalculationType = dikeHeightCalculationType); + SetPropertyAndVerifyNotificationsAndOutput(properties => properties.DikeHeightCalculationType = dikeHeightCalculationType); } [Test] public void OvertoppingRateCalculationType_Always_InputChangedAndObservablesNotified() { var overtoppingRateCalculationType = new Random(21).NextEnumValue(); - SetPropertyAndVerifyNotifcationsAndOutput(properties => properties.OvertoppingRateCalculationType = overtoppingRateCalculationType); + SetPropertyAndVerifyNotificationsAndOutput(properties => properties.OvertoppingRateCalculationType = overtoppingRateCalculationType); } [Test] public void DikeProfile_Always_InputChangedAndObservablesNotified() { var dikeProfile = new TestDikeProfile(); - SetPropertyAndVerifyNotifcationsAndOutput(properties => properties.DikeProfile = dikeProfile); + SetPropertyAndVerifyNotificationsAndOutput(properties => properties.DikeProfile = dikeProfile); } [Test] public void SelectedHydraulicBoundaryLocation_Always_InputChangedAndObservablesNotified() { var selectableLocation = new SelectableHydraulicBoundaryLocation(new TestHydraulicBoundaryLocation(), new Point2D(0, 0)); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.SelectedHydraulicBoundaryLocation = selectableLocation); } [Test] public void BreakWater_UseBreakWaterChangedAlways_InputChangedAndObservablesNotified() { bool useBreakWater = new Random(21).NextBoolean(); - SetPropertyAndVerifyNotifcationsAndOutput(properties => properties.BreakWater.UseBreakWater = useBreakWater); + SetPropertyAndVerifyNotificationsAndOutput(properties => properties.BreakWater.UseBreakWater = useBreakWater); } [Test] public void UseForeshore_Always_InputChangedAndObservablesNotified() { bool useForeshore = new Random(21).NextBoolean(); - SetPropertyAndVerifyNotifcationsAndOutput(properties => properties.Foreshore.UseForeshore = useForeshore); + SetPropertyAndVerifyNotificationsAndOutput(properties => properties.Foreshore.UseForeshore = useForeshore); } [Test] public void CriticalFlowRate_MeanChanged_InputChangedAndObservablesNotified() { RoundedDouble criticalFlowMean = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput(properties => properties.CriticalFlowRate.Mean = criticalFlowMean); + SetPropertyAndVerifyNotificationsAndOutput(properties => properties.CriticalFlowRate.Mean = criticalFlowMean); } [Test] @@ -875,7 +875,7 @@ Assert.AreEqual(!hasDikeProfile, result); } - private void SetPropertyAndVerifyNotifcationsAndOutput(Action setProperty) + private void SetPropertyAndVerifyNotificationsAndOutput(Action setProperty) { // Setup var observable = mockRepository.StrictMock(); Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsFailureMechanismPropertiesTest.cs =================================================================== diff -u -r1bbf51443c907b5f202e80764fa05f2e7f842c04 -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsFailureMechanismPropertiesTest.cs (.../GrassCoverErosionOutwardsFailureMechanismPropertiesTest.cs) (revision 1bbf51443c907b5f202e80764fa05f2e7f842c04) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsFailureMechanismPropertiesTest.cs (.../GrassCoverErosionOutwardsFailureMechanismPropertiesTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -225,7 +225,7 @@ [TestCase(0)] [TestCase(-1)] [TestCase(-20)] - public void LengthEffect_SetInvalidValue_ThrowsArgumentOutOfRangeExceptionNoNotifcations(int newLengthEffect) + public void LengthEffect_SetInvalidValue_ThrowsArgumentOutOfRangeExceptionNoNotifications(int newLengthEffect) { // Setup var mockRepository = new MockRepository(); Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresFailureMechanismPropertiesTest.cs =================================================================== diff -u -r1bbf51443c907b5f202e80764fa05f2e7f842c04 -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresFailureMechanismPropertiesTest.cs (.../HeightStructuresFailureMechanismPropertiesTest.cs) (revision 1bbf51443c907b5f202e80764fa05f2e7f842c04) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresFailureMechanismPropertiesTest.cs (.../HeightStructuresFailureMechanismPropertiesTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -239,7 +239,7 @@ [TestCase(0)] [TestCase(-1)] [TestCase(-20)] - public void LengthEffect_InvalidValue_ThrowsArgumentOutOfRangeExceptionNoNotifcations(int value) + public void LengthEffect_InvalidValue_ThrowsArgumentOutOfRangeExceptionNoNotifications(int value) { // Setup var mockRepository = new MockRepository(); Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresInputContextPropertiesTest.cs =================================================================== diff -u -r2d104a54ab378eea92fd946b40cff2bd79ca39b0 -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresInputContextPropertiesTest.cs (.../HeightStructuresInputContextPropertiesTest.cs) (revision 2d104a54ab378eea92fd946b40cff2bd79ca39b0) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresInputContextPropertiesTest.cs (.../HeightStructuresInputContextPropertiesTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -323,11 +323,11 @@ public void LevelCrestStructure_MeanChanged_InputChangedAndObservablesNotified() { RoundedDouble newMean = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.LevelCrestStructure.Mean = newMean); } - private void SetPropertyAndVerifyNotifcationsAndOutput(Action setProperty) + private void SetPropertyAndVerifyNotificationsAndOutput(Action setProperty) { // Setup var observable = mockRepository.StrictMock(); Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/FailureMechanismContributionPropertiesIntegrationTest.cs =================================================================== diff -u -r5cb5707e72014afb2b2bc5a015bf3bd507242318 -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/FailureMechanismContributionPropertiesIntegrationTest.cs (.../FailureMechanismContributionPropertiesIntegrationTest.cs) (revision 5cb5707e72014afb2b2bc5a015bf3bd507242318) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/FailureMechanismContributionPropertiesIntegrationTest.cs (.../FailureMechanismContributionPropertiesIntegrationTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -55,7 +55,7 @@ private readonly double newLowerLimitNorm = 0.01; private readonly double newSignalingNorm = 0.000001; - private void SetPropertyAndVerifyNotifcationsAndOutputForAllDataSet(Action setPropertyAction) + private void SetPropertyAndVerifyNotificationsAndOutputForAllDataSet(Action setPropertyAction) { // Setup const int numberOfCalculations = 3; @@ -174,7 +174,7 @@ mockRepository.VerifyAll(); } - private void ChangeValueNoPermissionGivenAndVerifyNoNotifcationsAndOutputForAllDataSet(Action setPropertyAction) + private void ChangeValueNoPermissionGivenAndVerifyNoNotificationsAndOutputForAllDataSet(Action setPropertyAction) { // Setup TestHydraulicBoundaryLocation hydraulicBoundaryLocation = TestHydraulicBoundaryLocation.CreateFullyCalculated(); @@ -287,7 +287,7 @@ mockRepository.VerifyAll(); } - private void SetPropertyAndVerifyNotifcationsAndOutputForHydraulicBoundarySetAndCalculationsNoOutput(Action setPropertyAction) + private void SetPropertyAndVerifyNotificationsAndOutputForHydraulicBoundarySetAndCalculationsNoOutput(Action setPropertyAction) { // Setup var hydraulicBoundaryDatabase = new HydraulicBoundaryDatabase @@ -356,7 +356,7 @@ mockRepository.VerifyAll(); } - private void SetPropertyAndVerifyNotifcationsAndOutputForHydraulicBoundaryLocationNoOutputAndCalculationWithOutput(Action setPropertyAction) + private void SetPropertyAndVerifyNotificationsAndOutputForHydraulicBoundaryLocationNoOutputAndCalculationWithOutput(Action setPropertyAction) { // Setup const int numberOfCalculations = 3; @@ -453,7 +453,7 @@ mockRepository.VerifyAll(); } - private void SetPropertyAndVerifyNotifcationsAndOutputForNoHydraulicBoundaryLocationNoOutputAndCalculationWithOutput(Action setPropertyAction) + private void SetPropertyAndVerifyNotificationsAndOutputForNoHydraulicBoundaryLocationNoOutputAndCalculationWithOutput(Action setPropertyAction) { // Setup const int numberOfCalculations = 3; @@ -541,7 +541,7 @@ mockRepository.VerifyAll(); } - private void SetPropertyAndVerifyNotifcationsAndOutputForHydraulicBoundaryLocationNoOutputAndNoCalculationsWithOutput(Action setPropertyAction) + private void SetPropertyAndVerifyNotificationsAndOutputForHydraulicBoundaryLocationNoOutputAndNoCalculationsWithOutput(Action setPropertyAction) { // Setup var hydraulicBoundaryDatabase = new HydraulicBoundaryDatabase(); @@ -599,7 +599,7 @@ mockRepository.VerifyAll(); // No update observer expected. } - private void SetPropertyAndVerifyNotifcationsAndOutputForNoHydraulicBoundaryDatabaseAndNoCalculationsWithOutput(Action setPropertyAction) + private void SetPropertyAndVerifyNotificationsAndOutputForNoHydraulicBoundaryDatabaseAndNoCalculationsWithOutput(Action setPropertyAction) { // Setup var mockRepository = new MockRepository(); @@ -644,19 +644,19 @@ [Test] public void LowerLimitNorm_ValueChanged_ClearsDependentDataAndNotifiesObserversAndLogsMessages() { - SetPropertyAndVerifyNotifcationsAndOutputForAllDataSet(properties => properties.LowerLimitNorm = newLowerLimitNorm); + SetPropertyAndVerifyNotificationsAndOutputForAllDataSet(properties => properties.LowerLimitNorm = newLowerLimitNorm); } [Test] public void SignalingNorm_ValueChanged_ClearsDependentDataAndNotifiesObserversAndLogsMessages() { - SetPropertyAndVerifyNotifcationsAndOutputForAllDataSet(properties => properties.SignalingNorm = newSignalingNorm); + SetPropertyAndVerifyNotificationsAndOutputForAllDataSet(properties => properties.SignalingNorm = newSignalingNorm); } [Test] public void NormativeNorm_ValueChanged_ClearsDependentDataAndNotifiesObserversAndLogsMessages() { - SetPropertyAndVerifyNotifcationsAndOutputForAllDataSet(properties => properties.NormativeNorm = newNormativeNorm); + SetPropertyAndVerifyNotificationsAndOutputForAllDataSet(properties => properties.NormativeNorm = newNormativeNorm); } #endregion @@ -666,19 +666,19 @@ [Test] public void LowerLimitNorm_PermissionNotGiven_DoesnotClearDependentDataNorNotifiesObserversAndLogsMessages() { - ChangeValueNoPermissionGivenAndVerifyNoNotifcationsAndOutputForAllDataSet(properties => properties.LowerLimitNorm = newLowerLimitNorm); + ChangeValueNoPermissionGivenAndVerifyNoNotificationsAndOutputForAllDataSet(properties => properties.LowerLimitNorm = newLowerLimitNorm); } [Test] public void SignalingNorm_PermissionNotGiven_DoesnotClearDependentDataNorNotifiesObserversAndLogsMessages() { - ChangeValueNoPermissionGivenAndVerifyNoNotifcationsAndOutputForAllDataSet(properties => properties.SignalingNorm = newSignalingNorm); + ChangeValueNoPermissionGivenAndVerifyNoNotificationsAndOutputForAllDataSet(properties => properties.SignalingNorm = newSignalingNorm); } [Test] public void NormativeNorm_PermissionNotGiven_DoesnotClearDependentDataNorNotifiesObserversAndLogsMessages() { - ChangeValueNoPermissionGivenAndVerifyNoNotifcationsAndOutputForAllDataSet(properties => properties.NormativeNorm = newNormativeNorm); + ChangeValueNoPermissionGivenAndVerifyNoNotificationsAndOutputForAllDataSet(properties => properties.NormativeNorm = newNormativeNorm); } #endregion @@ -688,19 +688,19 @@ [Test] public void LowerLimitNorm_HydraulicBoundarySetAndCalculationsNoOutput_HydraulicBoundaryDatabaseObserversNotifiedAndMessagesLogged() { - SetPropertyAndVerifyNotifcationsAndOutputForHydraulicBoundarySetAndCalculationsNoOutput(properties => properties.LowerLimitNorm = newLowerLimitNorm); + SetPropertyAndVerifyNotificationsAndOutputForHydraulicBoundarySetAndCalculationsNoOutput(properties => properties.LowerLimitNorm = newLowerLimitNorm); } [Test] public void SignalingNorm_HydraulicBoundarySetAndCalculationsNoOutput_HydraulicBoundaryDatabaseObserversNotifiedAndMessagesLogged() { - SetPropertyAndVerifyNotifcationsAndOutputForHydraulicBoundarySetAndCalculationsNoOutput(properties => properties.SignalingNorm = newSignalingNorm); + SetPropertyAndVerifyNotificationsAndOutputForHydraulicBoundarySetAndCalculationsNoOutput(properties => properties.SignalingNorm = newSignalingNorm); } [Test] public void NormativeNorm_HydraulicBoundarySetAndCalculationsNoOutput_HydraulicBoundaryDatabaseObserversNotifiedAndMessagesLogged() { - SetPropertyAndVerifyNotifcationsAndOutputForHydraulicBoundarySetAndCalculationsNoOutput(properties => properties.NormativeNorm = newNormativeNorm); + SetPropertyAndVerifyNotificationsAndOutputForHydraulicBoundarySetAndCalculationsNoOutput(properties => properties.NormativeNorm = newNormativeNorm); } #endregion @@ -710,19 +710,19 @@ [Test] public void LowerLimitNorm_HydraulicBoundaryLocationNoOutputAndCalculationWithOutputAndValueChanged_CalculationObserverNotifiedAndMessageLogged() { - SetPropertyAndVerifyNotifcationsAndOutputForHydraulicBoundaryLocationNoOutputAndCalculationWithOutput(properties => properties.LowerLimitNorm = newLowerLimitNorm); + SetPropertyAndVerifyNotificationsAndOutputForHydraulicBoundaryLocationNoOutputAndCalculationWithOutput(properties => properties.LowerLimitNorm = newLowerLimitNorm); } [Test] public void SignalingNorm_HydraulicBoundaryLocationNoOutputAndCalculationWithOutputAndValueChanged_CalculationObserverNotifiedAndMessageLogged() { - SetPropertyAndVerifyNotifcationsAndOutputForHydraulicBoundaryLocationNoOutputAndCalculationWithOutput(properties => properties.SignalingNorm = newSignalingNorm); + SetPropertyAndVerifyNotificationsAndOutputForHydraulicBoundaryLocationNoOutputAndCalculationWithOutput(properties => properties.SignalingNorm = newSignalingNorm); } [Test] public void NormativeNorm_HydraulicBoundaryLocationNoOutputAndCalculationWithOutputAndValueChanged_CalculationObserverNotifiedAndMessageLogged() { - SetPropertyAndVerifyNotifcationsAndOutputForHydraulicBoundaryLocationNoOutputAndCalculationWithOutput(properties => properties.NormativeNorm = newNormativeNorm); + SetPropertyAndVerifyNotificationsAndOutputForHydraulicBoundaryLocationNoOutputAndCalculationWithOutput(properties => properties.NormativeNorm = newNormativeNorm); } #endregion @@ -732,19 +732,19 @@ [Test] public void LowerLimitNorm_NoHydraulicBoundaryLocationNoOutputAndCalculationWithOutputAndValueChanged_CalculationObserverNotifiedAndMessageLogged() { - SetPropertyAndVerifyNotifcationsAndOutputForNoHydraulicBoundaryLocationNoOutputAndCalculationWithOutput(properties => properties.LowerLimitNorm = newLowerLimitNorm); + SetPropertyAndVerifyNotificationsAndOutputForNoHydraulicBoundaryLocationNoOutputAndCalculationWithOutput(properties => properties.LowerLimitNorm = newLowerLimitNorm); } [Test] public void SignalingNorm_NoHydraulicBoundaryLocationNoOutputAndCalculationWithOutputAndValueChanged_CalculationObserverNotifiedAndMessageLogged() { - SetPropertyAndVerifyNotifcationsAndOutputForNoHydraulicBoundaryLocationNoOutputAndCalculationWithOutput(properties => properties.SignalingNorm = newSignalingNorm); + SetPropertyAndVerifyNotificationsAndOutputForNoHydraulicBoundaryLocationNoOutputAndCalculationWithOutput(properties => properties.SignalingNorm = newSignalingNorm); } [Test] public void NormativeNorm_NoHydraulicBoundaryLocationNoOutputAndCalculationWithOutputAndValueChanged_CalculationObserverNotifiedAndMessageLogged() { - SetPropertyAndVerifyNotifcationsAndOutputForNoHydraulicBoundaryLocationNoOutputAndCalculationWithOutput(properties => properties.NormativeNorm = newNormativeNorm); + SetPropertyAndVerifyNotificationsAndOutputForNoHydraulicBoundaryLocationNoOutputAndCalculationWithOutput(properties => properties.NormativeNorm = newNormativeNorm); } #endregion @@ -754,19 +754,19 @@ [Test] public void LowerLimitNorm_HydraulicBoundaryLocationNoOutputAndNoCalculationsWithOutputAndValueChanged_NoObserversNotifiedAndMessagesLogged() { - SetPropertyAndVerifyNotifcationsAndOutputForHydraulicBoundaryLocationNoOutputAndNoCalculationsWithOutput(properties => properties.LowerLimitNorm = newLowerLimitNorm); + SetPropertyAndVerifyNotificationsAndOutputForHydraulicBoundaryLocationNoOutputAndNoCalculationsWithOutput(properties => properties.LowerLimitNorm = newLowerLimitNorm); } [Test] public void SignalingNorm_HydraulicBoundaryLocationNoOutputAndNoCalculationsWithOutputAndValueChanged_NoObserversNotifiedAndMessagesLogged() { - SetPropertyAndVerifyNotifcationsAndOutputForHydraulicBoundaryLocationNoOutputAndNoCalculationsWithOutput(properties => properties.SignalingNorm = newSignalingNorm); + SetPropertyAndVerifyNotificationsAndOutputForHydraulicBoundaryLocationNoOutputAndNoCalculationsWithOutput(properties => properties.SignalingNorm = newSignalingNorm); } [Test] public void NormativeNorm_HydraulicBoundaryLocationNoOutputAndNoCalculationsWithOutputAndValueChanged_NoObserversNotifiedAndMessagesLogged() { - SetPropertyAndVerifyNotifcationsAndOutputForHydraulicBoundaryLocationNoOutputAndNoCalculationsWithOutput(properties => properties.NormativeNorm = newNormativeNorm); + SetPropertyAndVerifyNotificationsAndOutputForHydraulicBoundaryLocationNoOutputAndNoCalculationsWithOutput(properties => properties.NormativeNorm = newNormativeNorm); } #endregion @@ -776,19 +776,19 @@ [Test] public void LowerLimitNorm_NoHydraulicBoundaryDatabaseAndNoCalculationsWithOutputAndValueChanged_NoObserversNotifiedAndMessagesLogged() { - SetPropertyAndVerifyNotifcationsAndOutputForNoHydraulicBoundaryDatabaseAndNoCalculationsWithOutput(properties => properties.LowerLimitNorm = newLowerLimitNorm); + SetPropertyAndVerifyNotificationsAndOutputForNoHydraulicBoundaryDatabaseAndNoCalculationsWithOutput(properties => properties.LowerLimitNorm = newLowerLimitNorm); } [Test] public void SignalingNorm_NoHydraulicBoundaryDatabaseAndNoCalculationsWithOutputAndValueChanged_NoObserversNotifiedAndMessagesLogged() { - SetPropertyAndVerifyNotifcationsAndOutputForNoHydraulicBoundaryDatabaseAndNoCalculationsWithOutput(properties => properties.SignalingNorm = newSignalingNorm); + SetPropertyAndVerifyNotificationsAndOutputForNoHydraulicBoundaryDatabaseAndNoCalculationsWithOutput(properties => properties.SignalingNorm = newSignalingNorm); } [Test] public void NormativeNorm_NoHydraulicBoundaryDatabaseAndNoCalculationsWithOutputAndValueChanged_NoObserversNotifiedAndMessagesLogged() { - SetPropertyAndVerifyNotifcationsAndOutputForNoHydraulicBoundaryDatabaseAndNoCalculationsWithOutput(properties => properties.NormativeNorm = newNormativeNorm); + SetPropertyAndVerifyNotificationsAndOutputForNoHydraulicBoundaryDatabaseAndNoCalculationsWithOutput(properties => properties.NormativeNorm = newNormativeNorm); } #endregion Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/FailureMechanismContributionPropertiesTest.cs =================================================================== diff -u -r2d104a54ab378eea92fd946b40cff2bd79ca39b0 -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/FailureMechanismContributionPropertiesTest.cs (.../FailureMechanismContributionPropertiesTest.cs) (revision 2d104a54ab378eea92fd946b40cff2bd79ca39b0) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/FailureMechanismContributionPropertiesTest.cs (.../FailureMechanismContributionPropertiesTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -253,19 +253,19 @@ [Test] public void LowerLimitNorm_Always_ContributionNotifiedAndPropertyChangedCalled() { - SetPropertyAndVerifyNotifcationsAndOutputForCalculation(properties => properties.LowerLimitNorm = 0.001); + SetPropertyAndVerifyNotificationsAndOutputForCalculation(properties => properties.LowerLimitNorm = 0.001); } [Test] public void SignalingNorm_Always_ContributionNotifiedAndPropertyChangedCalled() { - SetPropertyAndVerifyNotifcationsAndOutputForCalculation(properties => properties.SignalingNorm = 0.00001); + SetPropertyAndVerifyNotificationsAndOutputForCalculation(properties => properties.SignalingNorm = 0.00001); } [Test] public void NormativeNorm_Always_ContributionNotifiedAndPropertyChangedCalled() { - SetPropertyAndVerifyNotifcationsAndOutputForCalculation(properties => properties.NormativeNorm = NormType.Signaling); + SetPropertyAndVerifyNotificationsAndOutputForCalculation(properties => properties.NormativeNorm = NormType.Signaling); } [Test] @@ -393,7 +393,7 @@ mocks.VerifyAll(); } - private static void SetPropertyAndVerifyNotifcationsAndOutputForCalculation(Action setProperty) + private static void SetPropertyAndVerifyNotificationsAndOutputForCalculation(Action setProperty) { // Setup var assessmentSection = new AssessmentSection(AssessmentSectionComposition.Dike); Fisheye: Tag d485f27eb5a6d688406882dce60c3229e22f2ac2 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsLocationInput.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsLocationInputBase.cs =================================================================== diff -u --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsLocationInputBase.cs (revision 0) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsLocationInputBase.cs (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -0,0 +1,116 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using Core.Common.Base.Data; +using Ringtoets.MacroStabilityInwards.Primitives; + +namespace Ringtoets.MacroStabilityInwards.Data +{ + /// + /// Base class that holds all locations input for either daily or + /// extreme conditions for the macro stability inwards calculation. + /// + public abstract class MacroStabilityInwardsLocationInputBase : IMacroStabilityInwardsLocationInput + { + private RoundedDouble waterLevelPolder; + private RoundedDouble phreaticLineOffsetBelowDikeTopAtRiver; + private RoundedDouble phreaticLineOffsetBelowDikeTopAtPolder; + private RoundedDouble phreaticLineOffsetBelowShoulderBaseInside; + private RoundedDouble phreaticLineOffsetBelowDikeToeAtPolder; + + /// + /// Initializes a new instance of the class. + /// + protected MacroStabilityInwardsLocationInputBase() + { + waterLevelPolder = new RoundedDouble(2, double.NaN); + + UseDefaultOffsets = true; + + phreaticLineOffsetBelowDikeTopAtRiver = new RoundedDouble(2, double.NaN); + phreaticLineOffsetBelowDikeTopAtPolder = new RoundedDouble(2, double.NaN); + phreaticLineOffsetBelowShoulderBaseInside = new RoundedDouble(2, double.NaN); + phreaticLineOffsetBelowDikeToeAtPolder = new RoundedDouble(2, double.NaN); + } + + public RoundedDouble WaterLevelPolder + { + get + { + return waterLevelPolder; + } + set + { + waterLevelPolder = value.ToPrecision(waterLevelPolder.NumberOfDecimalPlaces); + } + } + + public bool UseDefaultOffsets { get; set; } + + public RoundedDouble PhreaticLineOffsetBelowDikeTopAtRiver + { + get + { + return phreaticLineOffsetBelowDikeTopAtRiver; + } + set + { + phreaticLineOffsetBelowDikeTopAtRiver = value.ToPrecision(phreaticLineOffsetBelowDikeTopAtRiver.NumberOfDecimalPlaces); + } + } + + public RoundedDouble PhreaticLineOffsetBelowDikeTopAtPolder + { + get + { + return phreaticLineOffsetBelowDikeTopAtPolder; + } + set + { + phreaticLineOffsetBelowDikeTopAtPolder = value.ToPrecision(phreaticLineOffsetBelowDikeTopAtPolder.NumberOfDecimalPlaces); + } + } + + public RoundedDouble PhreaticLineOffsetBelowShoulderBaseInside + { + get + { + return phreaticLineOffsetBelowShoulderBaseInside; + } + set + { + phreaticLineOffsetBelowShoulderBaseInside = value.ToPrecision(phreaticLineOffsetBelowShoulderBaseInside.NumberOfDecimalPlaces); + } + } + + public RoundedDouble PhreaticLineOffsetBelowDikeToeAtPolder + { + get + { + return phreaticLineOffsetBelowDikeToeAtPolder; + } + set + { + phreaticLineOffsetBelowDikeToeAtPolder = value.ToPrecision(phreaticLineOffsetBelowDikeToeAtPolder.NumberOfDecimalPlaces); + } + } + } +} \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsLocationInputDaily.cs =================================================================== diff -u -r90a9502badff5788374461a1b2179a5dd0e866a2 -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsLocationInputDaily.cs (.../MacroStabilityInwardsLocationInputDaily.cs) (revision 90a9502badff5788374461a1b2179a5dd0e866a2) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsLocationInputDaily.cs (.../MacroStabilityInwardsLocationInputDaily.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -25,10 +25,10 @@ namespace Ringtoets.MacroStabilityInwards.Data { /// - /// Class that holds all locations input daily conditions + /// Class that holds all location input for daily conditions /// for the macro stability inwards calculation. /// - public class MacroStabilityInwardsLocationInputDaily : MacroStabilityInwardsLocationInput, IMacroStabilityInwardsLocationInputDaily + public class MacroStabilityInwardsLocationInputDaily : MacroStabilityInwardsLocationInputBase, IMacroStabilityInwardsLocationInputDaily { /// /// Initializes a new instance of the class. Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsLocationInputExtreme.cs =================================================================== diff -u -r90a9502badff5788374461a1b2179a5dd0e866a2 -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsLocationInputExtreme.cs (.../MacroStabilityInwardsLocationInputExtreme.cs) (revision 90a9502badff5788374461a1b2179a5dd0e866a2) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsLocationInputExtreme.cs (.../MacroStabilityInwardsLocationInputExtreme.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -25,10 +25,10 @@ namespace Ringtoets.MacroStabilityInwards.Data { /// - /// Base class that holds all locations input for extreme conditions + /// Class that holds all location input for extreme conditions /// for the macro stability inwards calculation. /// - public class MacroStabilityInwardsLocationInputExtreme : MacroStabilityInwardsLocationInput, IMacroStabilityInwardsLocationInputExtreme + public class MacroStabilityInwardsLocationInputExtreme : MacroStabilityInwardsLocationInputBase, IMacroStabilityInwardsLocationInputExtreme { private RoundedDouble penetrationLength; Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/Ringtoets.MacroStabilityInwards.Data.csproj =================================================================== diff -u -r6e703bab0430cff5eb3f81b41b630afbd1d6b59a -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/Ringtoets.MacroStabilityInwards.Data.csproj (.../Ringtoets.MacroStabilityInwards.Data.csproj) (revision 6e703bab0430cff5eb3f81b41b630afbd1d6b59a) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/Ringtoets.MacroStabilityInwards.Data.csproj (.../Ringtoets.MacroStabilityInwards.Data.csproj) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -59,7 +59,7 @@ - + Fisheye: Tag d485f27eb5a6d688406882dce60c3229e22f2ac2 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsLocationDailyProperties.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag d485f27eb5a6d688406882dce60c3229e22f2ac2 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsLocationExtremeProperties.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsLocationInputBaseProperties.cs =================================================================== diff -u --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsLocationInputBaseProperties.cs (revision 0) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsLocationInputBaseProperties.cs (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -0,0 +1,100 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// 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.Gui.Attributes; +using Core.Common.Gui.PropertyBag; +using Core.Common.Utils.Attributes; +using Ringtoets.Common.Forms.ChangeHandlers; +using Ringtoets.Common.Forms.PropertyClasses; +using Ringtoets.MacroStabilityInwards.Data; +using Ringtoets.MacroStabilityInwards.Forms.Properties; + +namespace Ringtoets.MacroStabilityInwards.Forms.PropertyClasses +{ + /// + /// ViewModel of water stresses properties in for properties panel. + /// + /// The type of location input. + public abstract class MacroStabilityInwardsLocationInputBaseProperties : ObjectProperties where T : MacroStabilityInwardsLocationInputBase + { + private const int waterLevelPolderPropertyIndex = 1; + private const int offsetsPropertyIndex = 2; + + protected readonly IObservablePropertyChangeHandler PropertyChangeHandler; + + /// + /// Creates a new instance of . + /// + /// The data of the properties. + /// The handler responsible for handling effects of a property change. + /// Thrown when any parameter is null. + protected MacroStabilityInwardsLocationInputBaseProperties(T data, IObservablePropertyChangeHandler handler) + { + if (data == null) + { + throw new ArgumentNullException(nameof(data)); + } + if (handler == null) + { + throw new ArgumentNullException(nameof(handler)); + } + this.data = data; + PropertyChangeHandler = handler; + } + + [PropertyOrder(waterLevelPolderPropertyIndex)] + [ResourcesCategory(typeof(Resources), nameof(Resources.Waterstresses_DisplayName))] + [ResourcesDisplayName(typeof(Resources), nameof(Resources.WaterLevelPolder_DisplayName))] + [ResourcesDescription(typeof(Resources), nameof(Resources.WaterLevelPolder_Description))] + public RoundedDouble WaterLevelPolder + { + get + { + return data.WaterLevelPolder; + } + set + { + PropertyChangeHelper.ChangePropertyAndNotify(() => data.WaterLevelPolder = value, PropertyChangeHandler); + } + } + + [PropertyOrder(offsetsPropertyIndex)] + [ResourcesCategory(typeof(Resources), nameof(Resources.Waterstresses_DisplayName))] + [ResourcesDisplayName(typeof(Resources), nameof(Resources.Offsets_DisplayName))] + [ResourcesDescription(typeof(Resources), nameof(Resources.Offsets_Description))] + [TypeConverter(typeof(ExpandableObjectConverter))] + public MacroStabilityInwardsOffsetProperties Offsets + { + get + { + return new MacroStabilityInwardsOffsetProperties(data, PropertyChangeHandler); + } + } + + public override string ToString() + { + return string.Empty; + } + } +} \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsLocationInputDailyProperties.cs =================================================================== diff -u --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsLocationInputDailyProperties.cs (revision 0) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsLocationInputDailyProperties.cs (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -0,0 +1,60 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using Core.Common.Base.Data; +using Core.Common.Gui.Attributes; +using Core.Common.Utils.Attributes; +using Ringtoets.Common.Forms.PropertyClasses; +using Ringtoets.MacroStabilityInwards.Data; +using Ringtoets.MacroStabilityInwards.Forms.Properties; + +namespace Ringtoets.MacroStabilityInwards.Forms.PropertyClasses +{ + /// + /// ViewModel of water stresses properties in for properties panel. + /// + public class MacroStabilityInwardsLocationInputDailyProperties : MacroStabilityInwardsLocationInputBaseProperties + { + private const int penetrationLengthPropertyIndex = 3; + + /// + /// Creates a new instance of . + /// + /// The data of the properties. + /// The handler responsible for handling effects of a property change. + /// Thrown when any parameter is null. + public MacroStabilityInwardsLocationInputDailyProperties(MacroStabilityInwardsLocationInputDaily data, IObservablePropertyChangeHandler handler) + : base(data, handler) {} + + [PropertyOrder(penetrationLengthPropertyIndex)] + [ResourcesCategory(typeof(Resources), nameof(Resources.Waterstresses_DisplayName))] + [ResourcesDisplayName(typeof(Resources), nameof(Resources.PenetrationLength_DisplayName))] + [ResourcesDescription(typeof(Resources), nameof(Resources.PenetrationLength_Description))] + public RoundedDouble PenetrationLength + { + get + { + return data.PenetrationLength; + } + } + } +} \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsLocationInputExtremeProperties.cs =================================================================== diff -u --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsLocationInputExtremeProperties.cs (revision 0) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsLocationInputExtremeProperties.cs (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -0,0 +1,65 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using Core.Common.Base.Data; +using Core.Common.Gui.Attributes; +using Core.Common.Utils.Attributes; +using Ringtoets.Common.Forms.ChangeHandlers; +using Ringtoets.Common.Forms.PropertyClasses; +using Ringtoets.MacroStabilityInwards.Data; +using Ringtoets.MacroStabilityInwards.Forms.Properties; + +namespace Ringtoets.MacroStabilityInwards.Forms.PropertyClasses +{ + /// + /// ViewModel of water stresses properties in for properties panel. + /// + public class MacroStabilityInwardsLocationInputExtremeProperties : MacroStabilityInwardsLocationInputBaseProperties + { + private const int penetrationLengthPropertyIndex = 3; + + /// + /// Creates a new instance of . + /// + /// The data of the properties. + /// The handler responsible for handling effects of a property change. + /// Thrown when any parameter is null. + public MacroStabilityInwardsLocationInputExtremeProperties(MacroStabilityInwardsLocationInputExtreme data, IObservablePropertyChangeHandler handler) + : base(data, handler) {} + + [PropertyOrder(penetrationLengthPropertyIndex)] + [ResourcesCategory(typeof(Resources), nameof(Resources.Waterstresses_DisplayName))] + [ResourcesDisplayName(typeof(Resources), nameof(Resources.PenetrationLength_DisplayName))] + [ResourcesDescription(typeof(Resources), nameof(Resources.PenetrationLength_Description))] + public RoundedDouble PenetrationLength + { + get + { + return data.PenetrationLength; + } + set + { + PropertyChangeHelper.ChangePropertyAndNotify(() => data.PenetrationLength = value, PropertyChangeHandler); + } + } + } +} \ No newline at end of file Fisheye: Tag d485f27eb5a6d688406882dce60c3229e22f2ac2 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsLocationProperties.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsOffsetProperties.cs =================================================================== diff -u -ra4daa6d1ccb443d5ab7901f3ac8578dca7064476 -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsOffsetProperties.cs (.../MacroStabilityInwardsOffsetProperties.cs) (revision a4daa6d1ccb443d5ab7901f3ac8578dca7064476) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsOffsetProperties.cs (.../MacroStabilityInwardsOffsetProperties.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -35,7 +35,7 @@ /// /// ViewModel of offset properties in for properties panel. /// - public class MacroStabilityInwardsOffsetProperties : ObjectProperties + public class MacroStabilityInwardsOffsetProperties : ObjectProperties { private const int useDefaultOffsetsPropertyIndex = 1; private const int phreaticLineOffsetBelowDikeTopAtRiverPropertyIndex = 2; @@ -51,7 +51,7 @@ /// The data of the properties. /// The handler responsible for handling effects of a property change. /// Thrown when any parameter is null. - public MacroStabilityInwardsOffsetProperties(MacroStabilityInwardsLocationInput data, IObservablePropertyChangeHandler handler) + public MacroStabilityInwardsOffsetProperties(MacroStabilityInwardsLocationInputBase data, IObservablePropertyChangeHandler handler) { if (data == null) { Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsWaterStressesProperties.cs =================================================================== diff -u -r90a9502badff5788374461a1b2179a5dd0e866a2 -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsWaterStressesProperties.cs (.../MacroStabilityInwardsWaterStressesProperties.cs) (revision 90a9502badff5788374461a1b2179a5dd0e866a2) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsWaterStressesProperties.cs (.../MacroStabilityInwardsWaterStressesProperties.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -252,23 +252,23 @@ [ResourcesCategory(typeof(Resources), nameof(Resources.Waterstresses_DisplayName))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.LocationExtreme_DisplayName))] [TypeConverter(typeof(ExpandableObjectConverter))] - public MacroStabilityInwardsLocationExtremeProperties LocationExtreme + public MacroStabilityInwardsLocationInputExtremeProperties LocationExtreme { get { - return new MacroStabilityInwardsLocationExtremeProperties((MacroStabilityInwardsLocationInputExtreme) data.LocationInputExtreme, propertyChangeHandler); + return new MacroStabilityInwardsLocationInputExtremeProperties((MacroStabilityInwardsLocationInputExtreme) data.LocationInputExtreme, propertyChangeHandler); } } [PropertyOrder(locationDailyPropertyIndex)] [ResourcesCategory(typeof(Resources), nameof(Resources.Waterstresses_DisplayName))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.LocationDaily_DisplayName))] [TypeConverter(typeof(ExpandableObjectConverter))] - public MacroStabilityInwardsLocationDailyProperties LocationDaily + public MacroStabilityInwardsLocationInputDailyProperties LocationDaily { get { - return new MacroStabilityInwardsLocationDailyProperties((MacroStabilityInwardsLocationInputDaily) data.LocationInputDaily, propertyChangeHandler); + return new MacroStabilityInwardsLocationInputDailyProperties((MacroStabilityInwardsLocationInputDaily) data.LocationInputDaily, propertyChangeHandler); } } Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Ringtoets.MacroStabilityInwards.Forms.csproj =================================================================== diff -u -r9fa257acbd8aeded7918b346a8e120fdc80f95b0 -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Ringtoets.MacroStabilityInwards.Forms.csproj (.../Ringtoets.MacroStabilityInwards.Forms.csproj) (revision 9fa257acbd8aeded7918b346a8e120fdc80f95b0) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Ringtoets.MacroStabilityInwards.Forms.csproj (.../Ringtoets.MacroStabilityInwards.Forms.csproj) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -46,8 +46,8 @@ Properties\GlobalAssembly.cs - - + + @@ -80,7 +80,7 @@ - + Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Calculators/UpliftVan/Input/UpliftVanCalculatorInput.cs =================================================================== diff -u -r484ac98127f04b1d315c98fdada7bd9f5a004872 -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Calculators/UpliftVan/Input/UpliftVanCalculatorInput.cs (.../UpliftVanCalculatorInput.cs) (revision 484ac98127f04b1d315c98fdada7bd9f5a004872) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Calculators/UpliftVan/Input/UpliftVanCalculatorInput.cs (.../UpliftVanCalculatorInput.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -99,7 +99,8 @@ LeakageLengthInwardsPhreaticLine4 = properties.LeakageLengthInwardsPhreaticLine4; PiezometricHeadPhreaticLine2Outwards = properties.PiezometricHeadPhreaticLine2Outwards; PiezometricHeadPhreaticLine2Inwards = properties.PiezometricHeadPhreaticLine2Inwards; - PenetrationLength = properties.PenetrationLength; + PenetrationLengthExtreme = properties.PenetrationLengthExtreme; + PenetrationLengthDaily = properties.PenetrationLengthDaily; AdjustPhreaticLine3And4ForUplift = properties.AdjustPhreaticLine3And4ForUplift; DikeSoilScenario = properties.DikeSoilScenario; MoveGrid = properties.MoveGrid; @@ -135,7 +136,8 @@ LeakageLengthInwardsPhreaticLine4 = double.NaN; PiezometricHeadPhreaticLine2Outwards = double.NaN; PiezometricHeadPhreaticLine2Inwards = double.NaN; - PenetrationLength = double.NaN; + PenetrationLengthExtreme = double.NaN; + PenetrationLengthDaily = double.NaN; DikeSoilScenario = MacroStabilityInwardsDikeSoilScenario.ClayDikeOnClay; MaximumSliceWidth = double.NaN; SlipPlaneMinimumDepth = double.NaN; @@ -272,12 +274,18 @@ public double PiezometricHeadPhreaticLine2Inwards { internal get; set; } /// - /// Gets or sets the penetration length. + /// Gets or sets the penetration length under extreme circumstances. /// [m] /// - public double PenetrationLength { internal get; set; } + public double PenetrationLengthExtreme { internal get; set; } /// + /// Gets or sets the penetration length under daily circumstances. + /// [m] + /// + public double PenetrationLengthDaily { internal get; set; } + + /// /// Gets or sets the value whether the grid should be moved. /// public bool MoveGrid { internal get; set; } @@ -443,12 +451,18 @@ public double PiezometricHeadPhreaticLine2Inwards { get; } /// - /// Gets the penetration length. + /// Gets the penetration length under extreme circumstances. /// [m] /// - public double PenetrationLength { get; } + public double PenetrationLengthExtreme { get; } /// + /// Gets the penetration length under daily circumstances. + /// [m] + /// + public double PenetrationLengthDaily { get; } + + /// /// Gets the value whether the grid should be moved. /// public bool MoveGrid { get; } Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Creators/Input/UpliftVanStabilityLocationCreator.cs =================================================================== diff -u -rad8a62190c15215b19699c50f51b2dfdf7d23149 -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Creators/Input/UpliftVanStabilityLocationCreator.cs (.../UpliftVanStabilityLocationCreator.cs) (revision ad8a62190c15215b19699c50f51b2dfdf7d23149) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Creators/Input/UpliftVanStabilityLocationCreator.cs (.../UpliftVanStabilityLocationCreator.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -77,7 +77,7 @@ LeakageLengthInwardsPl4 = input.LeakageLengthInwardsPhreaticLine4, HeadInPlLine2Outwards = input.PiezometricHeadPhreaticLine2Outwards, HeadInPlLine2Inwards = input.PiezometricHeadPhreaticLine2Inwards, - PenetrationLength = input.PenetrationLength + PenetrationLength = input.PenetrationLengthExtreme }; } @@ -126,7 +126,7 @@ LeakageLengthInwardsPl4 = input.LeakageLengthInwardsPhreaticLine4, HeadInPlLine2Outwards = input.PiezometricHeadPhreaticLine2Outwards, HeadInPlLine2Inwards = input.PiezometricHeadPhreaticLine2Inwards, - PenetrationLength = 0.0 + PenetrationLength = input.PenetrationLengthDaily }; } } Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/MacroStabilityInwardsCalculationService.cs =================================================================== diff -u -rcfa7dc2bce5e37f5677d9c8772b68599f9e26a0c -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/MacroStabilityInwardsCalculationService.cs (.../MacroStabilityInwardsCalculationService.cs) (revision cfa7dc2bce5e37f5677d9c8772b68599f9e26a0c) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/MacroStabilityInwardsCalculationService.cs (.../MacroStabilityInwardsCalculationService.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -227,7 +227,8 @@ LeakageLengthInwardsPhreaticLine4 = inputParameters.LeakageLengthInwardsPhreaticLine4, PiezometricHeadPhreaticLine2Outwards = inputParameters.PiezometricHeadPhreaticLine2Outwards, PiezometricHeadPhreaticLine2Inwards = inputParameters.PiezometricHeadPhreaticLine2Inwards, - PenetrationLength = inputParameters.LocationInputExtreme.PenetrationLength, + PenetrationLengthExtreme = inputParameters.LocationInputExtreme.PenetrationLength, + PenetrationLengthDaily = inputParameters.LocationInputDaily.PenetrationLength, AdjustPhreaticLine3And4ForUplift = inputParameters.AdjustPhreaticLine3And4ForUplift, MoveGrid = inputParameters.MoveGrid, MaximumSliceWidth = inputParameters.MaximumSliceWidth, Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.CalculatedInput.Test/Converters/PhreaticLineOffsetsConverterTest.cs =================================================================== diff -u -rcfa7dc2bce5e37f5677d9c8772b68599f9e26a0c -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.CalculatedInput.Test/Converters/PhreaticLineOffsetsConverterTest.cs (.../PhreaticLineOffsetsConverterTest.cs) (revision cfa7dc2bce5e37f5677d9c8772b68599f9e26a0c) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.CalculatedInput.Test/Converters/PhreaticLineOffsetsConverterTest.cs (.../PhreaticLineOffsetsConverterTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -60,19 +60,19 @@ PhreaticLineOffsets offsets = PhreaticLineOffsetsConverter.Convert(input); // Assert - Assert.IsTrue((bool) offsets.UseDefaults); - Assert.IsNaN((double) offsets.BelowDikeTopAtRiver); - Assert.IsNaN((double) offsets.BelowDikeTopAtPolder); - Assert.IsNaN((double) offsets.BelowDikeToeAtPolder); - Assert.IsNaN((double) offsets.BelowShoulderBaseInside); + Assert.IsTrue(offsets.UseDefaults); + Assert.IsNaN(offsets.BelowDikeTopAtRiver); + Assert.IsNaN(offsets.BelowDikeTopAtPolder); + Assert.IsNaN(offsets.BelowDikeToeAtPolder); + Assert.IsNaN(offsets.BelowShoulderBaseInside); } [Test] public void Convert_UseDefaultOffsetsFalse_ReturnUpliftVanPhreaticLineOffsets() { // Setup var random = new Random(11); - var input = new MacroStabilityInwardsLocationInputExtreme + var input = new TestMacroStabilityInwardsLocationInput { UseDefaultOffsets = false, PhreaticLineOffsetBelowDikeTopAtRiver = random.NextRoundedDouble(), @@ -85,11 +85,13 @@ PhreaticLineOffsets offsets = PhreaticLineOffsetsConverter.Convert(input); // Assert - Assert.IsFalse((bool) offsets.UseDefaults); + Assert.IsFalse(offsets.UseDefaults); Assert.AreEqual(input.PhreaticLineOffsetBelowDikeTopAtRiver, offsets.BelowDikeTopAtRiver); Assert.AreEqual(input.PhreaticLineOffsetBelowDikeTopAtPolder, offsets.BelowDikeTopAtPolder); Assert.AreEqual(input.PhreaticLineOffsetBelowDikeToeAtPolder, offsets.BelowDikeToeAtPolder); Assert.AreEqual(input.PhreaticLineOffsetBelowShoulderBaseInside, offsets.BelowShoulderBaseInside); } + + private class TestMacroStabilityInwardsLocationInput : MacroStabilityInwardsLocationInputBase {} } } \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsGridTest.cs =================================================================== diff -u -r59adecfc7f82ab8277440ecae147453f5cbddbbf -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsGridTest.cs (.../MacroStabilityInwardsGridTest.cs) (revision 59adecfc7f82ab8277440ecae147453f5cbddbbf) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsGridTest.cs (.../MacroStabilityInwardsGridTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -22,6 +22,7 @@ using System; using Core.Common.Base.Data; using NUnit.Framework; +using Ringtoets.Common.Data.TestUtil; namespace Ringtoets.MacroStabilityInwards.Data.Test { @@ -55,11 +56,11 @@ public void Constructor_SetProperties_ExpectedValues() { // Setup - var random = new Random(); - double xLeft = random.Next(); - double xRight = random.Next(); - double zTop = random.Next(); - double zBottom = random.Next(); + var random = new Random(21); + double xLeft = random.NextDouble(); + double xRight = random.NextDouble(); + double zTop = random.NextDouble(); + double zBottom = random.NextDouble(); // call var grid = new MacroStabilityInwardsGrid @@ -71,10 +72,21 @@ }; // Assert - Assert.AreEqual(new RoundedDouble(2, xLeft), grid.XLeft); - Assert.AreEqual(new RoundedDouble(2, xRight), grid.XRight); - Assert.AreEqual(new RoundedDouble(2, zTop), grid.ZTop); - Assert.AreEqual(new RoundedDouble(2, zBottom), grid.ZBottom); + Assert.AreEqual(2, grid.XLeft.NumberOfDecimalPlaces); + Assert.AreEqual(xLeft, grid.XLeft, + grid.XLeft.GetAccuracy()); + + Assert.AreEqual(2, grid.XRight.NumberOfDecimalPlaces); + Assert.AreEqual(xRight, grid.XRight, + grid.XRight.GetAccuracy()); + + Assert.AreEqual(2, grid.ZTop.NumberOfDecimalPlaces); + Assert.AreEqual(zTop, grid.ZTop, + grid.ZTop.GetAccuracy()); + + Assert.AreEqual(2, grid.ZBottom.NumberOfDecimalPlaces); + Assert.AreEqual(zBottom, grid.ZBottom, + grid.ZBottom.GetAccuracy()); } } } \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsInputTest.cs =================================================================== diff -u -r90a9502badff5788374461a1b2179a5dd0e866a2 -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsInputTest.cs (.../MacroStabilityInwardsInputTest.cs) (revision 90a9502badff5788374461a1b2179a5dd0e866a2) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsInputTest.cs (.../MacroStabilityInwardsInputTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -74,46 +74,9 @@ Assert.IsNaN(inputParameters.WaterLevelRiverAverage); Assert.AreEqual(2, inputParameters.WaterLevelRiverAverage.NumberOfDecimalPlaces); - Assert.IsNaN(inputParameters.LocationInputExtreme.WaterLevelPolder); - Assert.AreEqual(2, inputParameters.LocationInputExtreme.WaterLevelPolder.NumberOfDecimalPlaces); + Assert.IsNotNull(inputParameters.LocationInputExtreme); + Assert.IsNotNull(inputParameters.LocationInputDaily); - Assert.IsNaN(inputParameters.LocationInputExtreme.PenetrationLength); - Assert.AreEqual(2, inputParameters.LocationInputExtreme.PenetrationLength.NumberOfDecimalPlaces); - - Assert.IsTrue(inputParameters.LocationInputExtreme.UseDefaultOffsets); - - Assert.IsNaN(inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowDikeTopAtRiver); - Assert.AreEqual(2, inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowDikeTopAtRiver.NumberOfDecimalPlaces); - - Assert.IsNaN(inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowDikeTopAtPolder); - Assert.AreEqual(2, inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowDikeTopAtPolder.NumberOfDecimalPlaces); - - Assert.IsNaN(inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowShoulderBaseInside); - Assert.AreEqual(2, inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowShoulderBaseInside.NumberOfDecimalPlaces); - - Assert.IsNaN(inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowDikeToeAtPolder); - Assert.AreEqual(2, inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowDikeToeAtPolder.NumberOfDecimalPlaces); - - Assert.IsNaN(inputParameters.LocationInputDaily.WaterLevelPolder); - Assert.AreEqual(2, inputParameters.LocationInputDaily.WaterLevelPolder.NumberOfDecimalPlaces); - - Assert.AreEqual(0.0, inputParameters.LocationInputDaily.PenetrationLength); - Assert.AreEqual(2, inputParameters.LocationInputDaily.PenetrationLength.NumberOfDecimalPlaces); - - Assert.IsTrue(inputParameters.LocationInputDaily.UseDefaultOffsets); - - Assert.IsNaN(inputParameters.LocationInputDaily.PhreaticLineOffsetBelowDikeTopAtRiver); - Assert.AreEqual(2, inputParameters.LocationInputDaily.PhreaticLineOffsetBelowDikeTopAtRiver.NumberOfDecimalPlaces); - - Assert.IsNaN(inputParameters.LocationInputDaily.PhreaticLineOffsetBelowDikeTopAtPolder); - Assert.AreEqual(2, inputParameters.LocationInputDaily.PhreaticLineOffsetBelowDikeTopAtPolder.NumberOfDecimalPlaces); - - Assert.IsNaN(inputParameters.LocationInputDaily.PhreaticLineOffsetBelowShoulderBaseInside); - Assert.AreEqual(2, inputParameters.LocationInputDaily.PhreaticLineOffsetBelowShoulderBaseInside.NumberOfDecimalPlaces); - - Assert.IsNaN(inputParameters.LocationInputDaily.PhreaticLineOffsetBelowDikeToeAtPolder); - Assert.AreEqual(2, inputParameters.LocationInputDaily.PhreaticLineOffsetBelowDikeToeAtPolder.NumberOfDecimalPlaces); - Assert.IsFalse(inputParameters.DrainageConstructionPresent); Assert.IsNaN(inputParameters.XCoordinateDrainageConstruction); @@ -173,7 +136,7 @@ public void Constructor_SetProperties_ExpectedValues() { // Setup - var random = new Random(); + var random = new Random(21); double slipPlaneMinimumDepth = random.NextDouble(); double slipPlaneMinimumLength = random.NextDouble(); double maximumSliceWidth = random.NextDouble(); @@ -215,22 +178,48 @@ }; // Assert - Assert.AreEqual(new RoundedDouble(2, slipPlaneMinimumDepth), input.SlipPlaneMinimumDepth); - Assert.AreEqual(new RoundedDouble(2, slipPlaneMinimumLength), input.SlipPlaneMinimumLength); - Assert.AreEqual(new RoundedDouble(2, maximumSliceWidth), input.MaximumSliceWidth); - Assert.AreEqual(new RoundedDouble(2, waterLevelRiverAverage), input.WaterLevelRiverAverage); - Assert.AreEqual(new RoundedDouble(2, xCoordinateDrainageConstruction), input.XCoordinateDrainageConstruction); - Assert.AreEqual(new RoundedDouble(2, zCoordinateDrainageConstruction), input.ZCoordinateDrainageConstruction); - Assert.AreEqual(new RoundedDouble(2, minimumLevelPhreaticLineAtDikeTopRiver), input.MinimumLevelPhreaticLineAtDikeTopRiver); - Assert.AreEqual(new RoundedDouble(2, minimumLevelPhreaticLineAtDikeTopPolder), input.MinimumLevelPhreaticLineAtDikeTopPolder); - Assert.AreEqual(new RoundedDouble(2, leakageLengthOutwardsPhreaticLine3), input.LeakageLengthOutwardsPhreaticLine3); - Assert.AreEqual(new RoundedDouble(2, leakageLengthInwardsPhreaticLine3), input.LeakageLengthInwardsPhreaticLine3); - Assert.AreEqual(new RoundedDouble(2, leakageLengthOutwardsPhreaticLine4), input.LeakageLengthOutwardsPhreaticLine4); - Assert.AreEqual(new RoundedDouble(2, leakageLengthInwardsPhreaticLine4), input.LeakageLengthInwardsPhreaticLine4); - Assert.AreEqual(new RoundedDouble(2, piezometricHeadPhreaticLine2Outwards), input.PiezometricHeadPhreaticLine2Outwards); - Assert.AreEqual(new RoundedDouble(2, piezometricHeadPhreaticLine2Inwards), input.PiezometricHeadPhreaticLine2Inwards); - Assert.AreEqual(new RoundedDouble(2, tangentLineZTop), input.TangentLineZTop); - Assert.AreEqual(new RoundedDouble(2, tangentLineZBottom), input.TangentLineZBottom); + Assert.AreEqual(2, input.SlipPlaneMinimumDepth.NumberOfDecimalPlaces); + Assert.AreEqual(slipPlaneMinimumDepth, input.SlipPlaneMinimumDepth, input.SlipPlaneMinimumDepth.GetAccuracy()); + + Assert.AreEqual(2, input.SlipPlaneMinimumLength.NumberOfDecimalPlaces); + Assert.AreEqual(slipPlaneMinimumLength, input.SlipPlaneMinimumLength, input.SlipPlaneMinimumLength.GetAccuracy()); + + Assert.AreEqual(2, input.MaximumSliceWidth.NumberOfDecimalPlaces); + Assert.AreEqual(maximumSliceWidth, input.MaximumSliceWidth, input.MaximumSliceWidth.GetAccuracy()); + + Assert.AreEqual(2, input.WaterLevelRiverAverage.NumberOfDecimalPlaces); + Assert.AreEqual(waterLevelRiverAverage, input.WaterLevelRiverAverage, input.WaterLevelRiverAverage.GetAccuracy()); + + Assert.AreEqual(2, input.XCoordinateDrainageConstruction.NumberOfDecimalPlaces); + Assert.AreEqual(xCoordinateDrainageConstruction, input.XCoordinateDrainageConstruction, input.XCoordinateDrainageConstruction.GetAccuracy()); + + Assert.AreEqual(2, input.ZCoordinateDrainageConstruction.NumberOfDecimalPlaces); + Assert.AreEqual(zCoordinateDrainageConstruction, input.ZCoordinateDrainageConstruction, input.ZCoordinateDrainageConstruction.GetAccuracy()); + + Assert.AreEqual(2, input.MinimumLevelPhreaticLineAtDikeTopRiver.NumberOfDecimalPlaces); + Assert.AreEqual(minimumLevelPhreaticLineAtDikeTopRiver, input.MinimumLevelPhreaticLineAtDikeTopRiver, input.MinimumLevelPhreaticLineAtDikeTopRiver.GetAccuracy()); + + Assert.AreEqual(2, input.MinimumLevelPhreaticLineAtDikeTopPolder.NumberOfDecimalPlaces); + Assert.AreEqual(minimumLevelPhreaticLineAtDikeTopPolder, input.MinimumLevelPhreaticLineAtDikeTopPolder, input.MinimumLevelPhreaticLineAtDikeTopPolder.GetAccuracy()); + + Assert.AreEqual(2, input.LeakageLengthOutwardsPhreaticLine3.NumberOfDecimalPlaces); + Assert.AreEqual(leakageLengthOutwardsPhreaticLine3, input.LeakageLengthOutwardsPhreaticLine3, input.LeakageLengthOutwardsPhreaticLine3.GetAccuracy()); + + Assert.AreEqual(2, input.LeakageLengthInwardsPhreaticLine3.NumberOfDecimalPlaces); + Assert.AreEqual(leakageLengthInwardsPhreaticLine3, input.LeakageLengthInwardsPhreaticLine3, input.LeakageLengthInwardsPhreaticLine3.GetAccuracy()); + + Assert.AreEqual(2, input.LeakageLengthOutwardsPhreaticLine4.NumberOfDecimalPlaces); + Assert.AreEqual(leakageLengthOutwardsPhreaticLine4, input.LeakageLengthOutwardsPhreaticLine4, input.LeakageLengthOutwardsPhreaticLine4.GetAccuracy()); + + Assert.AreEqual(2, input.LeakageLengthInwardsPhreaticLine4.NumberOfDecimalPlaces); + Assert.AreEqual(leakageLengthInwardsPhreaticLine4, input.LeakageLengthInwardsPhreaticLine4, input.LeakageLengthInwardsPhreaticLine4.GetAccuracy()); + + Assert.AreEqual(2, input.TangentLineZTop.NumberOfDecimalPlaces); + Assert.AreEqual(tangentLineZTop, input.TangentLineZTop, input.TangentLineZTop.GetAccuracy()); + + Assert.AreEqual(2, input.TangentLineZBottom.NumberOfDecimalPlaces); + Assert.AreEqual(tangentLineZBottom, input.TangentLineZBottom, input.TangentLineZBottom.GetAccuracy()); + Assert.AreEqual(tangentLineNumber, input.TangentLineNumber); } Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsLocationInputBaseTest.cs =================================================================== diff -u --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsLocationInputBaseTest.cs (revision 0) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsLocationInputBaseTest.cs (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -0,0 +1,94 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using Core.Common.Base.Data; +using NUnit.Framework; +using Ringtoets.Common.Data.TestUtil; +using Ringtoets.MacroStabilityInwards.Primitives; + +namespace Ringtoets.MacroStabilityInwards.Data.Test +{ + public class MacroStabilityInwardsLocationInputBaseTest + { + [Test] + public void Constructor_ExpectedValues() + { + // Call + var locationInput = new TestMacroStabilityInwardsLocationInput(); + + // Assert + Assert.IsInstanceOf(locationInput); + Assert.IsTrue(locationInput.UseDefaultOffsets); + + Assert.IsNaN(locationInput.PhreaticLineOffsetBelowDikeTopAtRiver); + Assert.AreEqual(2, locationInput.PhreaticLineOffsetBelowDikeTopAtRiver.NumberOfDecimalPlaces); + + Assert.IsNaN(locationInput.PhreaticLineOffsetBelowDikeTopAtPolder); + Assert.AreEqual(2, locationInput.PhreaticLineOffsetBelowDikeTopAtPolder.NumberOfDecimalPlaces); + + Assert.IsNaN(locationInput.PhreaticLineOffsetBelowShoulderBaseInside); + Assert.AreEqual(2, locationInput.PhreaticLineOffsetBelowShoulderBaseInside.NumberOfDecimalPlaces); + + Assert.IsNaN(locationInput.PhreaticLineOffsetBelowDikeToeAtPolder); + Assert.AreEqual(2, locationInput.PhreaticLineOffsetBelowDikeToeAtPolder.NumberOfDecimalPlaces); + } + + [Test] + public void Constructor_SetProperties_ExpectedValues() + { + // Setup + var random = new Random(21); + double phreaticLineOffsetBelowDikeTopAtRiver = random.NextDouble(); + double phreaticLineOffsetBelowDikeTopAtPolder = random.NextDouble(); + double phreaticLineOffsetBelowShoulderBaseInside = random.NextDouble(); + double phreaticLineOffsetBelowDikeToeAtPolder = random.NextDouble(); + + // Call + var locationInput = new TestMacroStabilityInwardsLocationInput + { + PhreaticLineOffsetBelowDikeTopAtPolder = (RoundedDouble) phreaticLineOffsetBelowDikeTopAtPolder, + PhreaticLineOffsetBelowDikeToeAtPolder = (RoundedDouble) phreaticLineOffsetBelowDikeToeAtPolder, + PhreaticLineOffsetBelowDikeTopAtRiver = (RoundedDouble) phreaticLineOffsetBelowDikeTopAtRiver, + PhreaticLineOffsetBelowShoulderBaseInside = (RoundedDouble) phreaticLineOffsetBelowShoulderBaseInside + }; + + // Assert + Assert.AreEqual(2, locationInput.PhreaticLineOffsetBelowDikeTopAtPolder.NumberOfDecimalPlaces); + Assert.AreEqual(phreaticLineOffsetBelowDikeTopAtPolder, locationInput.PhreaticLineOffsetBelowDikeTopAtPolder, + locationInput.PhreaticLineOffsetBelowDikeTopAtPolder.GetAccuracy()); + + Assert.AreEqual(2, locationInput.PhreaticLineOffsetBelowDikeToeAtPolder.NumberOfDecimalPlaces); + Assert.AreEqual(phreaticLineOffsetBelowDikeToeAtPolder, locationInput.PhreaticLineOffsetBelowDikeToeAtPolder, + locationInput.PhreaticLineOffsetBelowDikeToeAtPolder.GetAccuracy()); + + Assert.AreEqual(2, locationInput.PhreaticLineOffsetBelowDikeTopAtRiver.NumberOfDecimalPlaces); + Assert.AreEqual(phreaticLineOffsetBelowDikeTopAtRiver, locationInput.PhreaticLineOffsetBelowDikeTopAtRiver, + locationInput.PhreaticLineOffsetBelowDikeTopAtRiver.GetAccuracy()); + + Assert.AreEqual(2, locationInput.PhreaticLineOffsetBelowShoulderBaseInside.NumberOfDecimalPlaces); + Assert.AreEqual(phreaticLineOffsetBelowShoulderBaseInside, locationInput.PhreaticLineOffsetBelowShoulderBaseInside, + locationInput.PhreaticLineOffsetBelowShoulderBaseInside.GetAccuracy()); + } + + private class TestMacroStabilityInwardsLocationInput : MacroStabilityInwardsLocationInputBase {} + } +} \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsLocationInputDailyTest.cs =================================================================== diff -u -r90a9502badff5788374461a1b2179a5dd0e866a2 -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsLocationInputDailyTest.cs (.../MacroStabilityInwardsLocationInputDailyTest.cs) (revision 90a9502badff5788374461a1b2179a5dd0e866a2) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsLocationInputDailyTest.cs (.../MacroStabilityInwardsLocationInputDailyTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -33,23 +33,9 @@ var locationInput = new MacroStabilityInwardsLocationInputDaily(); // Assert - Assert.IsInstanceOf(locationInput); + Assert.IsInstanceOf(locationInput); Assert.IsInstanceOf(locationInput); - Assert.IsTrue(locationInput.UseDefaultOffsets); - - Assert.IsNaN(locationInput.PhreaticLineOffsetBelowDikeTopAtRiver); - Assert.AreEqual(2, locationInput.PhreaticLineOffsetBelowDikeTopAtRiver.NumberOfDecimalPlaces); - - Assert.IsNaN(locationInput.PhreaticLineOffsetBelowDikeTopAtPolder); - Assert.AreEqual(2, locationInput.PhreaticLineOffsetBelowDikeTopAtPolder.NumberOfDecimalPlaces); - - Assert.IsNaN(locationInput.PhreaticLineOffsetBelowShoulderBaseInside); - Assert.AreEqual(2, locationInput.PhreaticLineOffsetBelowShoulderBaseInside.NumberOfDecimalPlaces); - - Assert.IsNaN(locationInput.PhreaticLineOffsetBelowDikeToeAtPolder); - Assert.AreEqual(2, locationInput.PhreaticLineOffsetBelowDikeToeAtPolder.NumberOfDecimalPlaces); - Assert.AreEqual(0.0, locationInput.PenetrationLength); Assert.AreEqual(2, locationInput.PhreaticLineOffsetBelowDikeToeAtPolder.NumberOfDecimalPlaces); } Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsLocationInputExtremeTest.cs =================================================================== diff -u -r90a9502badff5788374461a1b2179a5dd0e866a2 -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsLocationInputExtremeTest.cs (.../MacroStabilityInwardsLocationInputExtremeTest.cs) (revision 90a9502badff5788374461a1b2179a5dd0e866a2) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsLocationInputExtremeTest.cs (.../MacroStabilityInwardsLocationInputExtremeTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -22,6 +22,7 @@ using System; using Core.Common.Base.Data; using NUnit.Framework; +using Ringtoets.Common.Data.TestUtil; using Ringtoets.MacroStabilityInwards.Primitives; namespace Ringtoets.MacroStabilityInwards.Data.Test @@ -35,23 +36,9 @@ var locationInput = new MacroStabilityInwardsLocationInputExtreme(); // Assert - Assert.IsInstanceOf(locationInput); + Assert.IsInstanceOf(locationInput); Assert.IsInstanceOf(locationInput); - Assert.IsTrue(locationInput.UseDefaultOffsets); - - Assert.IsNaN(locationInput.PhreaticLineOffsetBelowDikeTopAtRiver); - Assert.AreEqual(2, locationInput.PhreaticLineOffsetBelowDikeTopAtRiver.NumberOfDecimalPlaces); - - Assert.IsNaN(locationInput.PhreaticLineOffsetBelowDikeTopAtPolder); - Assert.AreEqual(2, locationInput.PhreaticLineOffsetBelowDikeTopAtPolder.NumberOfDecimalPlaces); - - Assert.IsNaN(locationInput.PhreaticLineOffsetBelowShoulderBaseInside); - Assert.AreEqual(2, locationInput.PhreaticLineOffsetBelowShoulderBaseInside.NumberOfDecimalPlaces); - - Assert.IsNaN(locationInput.PhreaticLineOffsetBelowDikeToeAtPolder); - Assert.AreEqual(2, locationInput.PhreaticLineOffsetBelowDikeToeAtPolder.NumberOfDecimalPlaces); - Assert.IsNaN(locationInput.PenetrationLength); Assert.AreEqual(2, locationInput.PenetrationLength.NumberOfDecimalPlaces); } @@ -60,8 +47,8 @@ public void Constructor_SetPenetrationLength_ExpectedValue() { // Setup - var random = new Random(); - double penetrationLength = random.Next(); + var random = new Random(21); + double penetrationLength = random.NextDouble(); // Call var locationInput = new MacroStabilityInwardsLocationInputExtreme @@ -70,7 +57,8 @@ }; // Assert - Assert.AreEqual(new RoundedDouble(2, penetrationLength), locationInput.PenetrationLength); + Assert.AreEqual(2, locationInput.PenetrationLength.NumberOfDecimalPlaces); + Assert.AreEqual(penetrationLength, locationInput.PenetrationLength, locationInput.PenetrationLength.GetAccuracy()); } } } \ No newline at end of file Fisheye: Tag d485f27eb5a6d688406882dce60c3229e22f2ac2 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsLocationInputTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/Ringtoets.MacroStabilityInwards.Data.Test.csproj =================================================================== diff -u -r6e703bab0430cff5eb3f81b41b630afbd1d6b59a -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/Ringtoets.MacroStabilityInwards.Data.Test.csproj (.../Ringtoets.MacroStabilityInwards.Data.Test.csproj) (revision 6e703bab0430cff5eb3f81b41b630afbd1d6b59a) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/Ringtoets.MacroStabilityInwards.Data.Test.csproj (.../Ringtoets.MacroStabilityInwards.Data.Test.csproj) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -65,7 +65,7 @@ - + Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsStochasticSoilProfileTest.cs =================================================================== diff -u -r24b83255132a74a750cc322321b460c14e407917 -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsStochasticSoilProfileTest.cs (.../MacroStabilityInwardsStochasticSoilProfileTest.cs) (revision 24b83255132a74a750cc322321b460c14e407917) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsStochasticSoilProfileTest.cs (.../MacroStabilityInwardsStochasticSoilProfileTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -50,7 +50,7 @@ var soilProfile = mocks.Stub(); mocks.ReplayAll(); - double probability = new Random().Next(0, 1); + double probability = new Random(21).Next(0, 1); // Call var stochasticSoilProfile = new MacroStabilityInwardsStochasticSoilProfile(probability, soilProfile); Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test/MacroStabilityInwardsCalculationScenarioFactoryTest.cs =================================================================== diff -u -rcf7e0b124334ae558a5d8dee4fc515577d5f6f25 -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test/MacroStabilityInwardsCalculationScenarioFactoryTest.cs (.../MacroStabilityInwardsCalculationScenarioFactoryTest.cs) (revision cf7e0b124334ae558a5d8dee4fc515577d5f6f25) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test/MacroStabilityInwardsCalculationScenarioFactoryTest.cs (.../MacroStabilityInwardsCalculationScenarioFactoryTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -219,53 +219,88 @@ // Assert MacroStabilityInwardsInput inputParameters = scenario.InputParameters; - Assert.AreEqual(MacroStabilityInwardsDikeSoilScenario.SandDikeOnClay, inputParameters.DikeSoilScenario); - Assert.AreEqual(1, inputParameters.PiezometricHeadPhreaticLine2Outwards.Value); - Assert.AreEqual(1, inputParameters.PiezometricHeadPhreaticLine2Inwards.Value); + Assert.AreEqual(MacroStabilityInwardsDikeSoilScenario.SandDikeOnClay, + inputParameters.DikeSoilScenario); + Assert.AreEqual(1, inputParameters.PiezometricHeadPhreaticLine2Outwards, + inputParameters.PiezometricHeadPhreaticLine2Outwards.GetAccuracy()); + Assert.AreEqual(1, inputParameters.PiezometricHeadPhreaticLine2Inwards, + inputParameters.PiezometricHeadPhreaticLine2Inwards.GetAccuracy()); Assert.IsTrue(inputParameters.AdjustPhreaticLine3And4ForUplift); - Assert.AreEqual(1, inputParameters.LeakageLengthOutwardsPhreaticLine3.Value); - Assert.AreEqual(1, inputParameters.LeakageLengthInwardsPhreaticLine3.Value); - Assert.AreEqual(1, inputParameters.LeakageLengthInwardsPhreaticLine4.Value); - Assert.AreEqual(1, inputParameters.LeakageLengthOutwardsPhreaticLine4.Value); - Assert.AreEqual(1, inputParameters.SlipPlaneMinimumDepth.Value); - Assert.AreEqual(1, inputParameters.SlipPlaneMinimumLength.Value); - Assert.AreEqual(1, inputParameters.MinimumLevelPhreaticLineAtDikeTopPolder.Value); - Assert.AreEqual(1, inputParameters.MinimumLevelPhreaticLineAtDikeTopRiver.Value); + Assert.AreEqual(1, inputParameters.LeakageLengthOutwardsPhreaticLine3, + inputParameters.LeakageLengthOutwardsPhreaticLine3.GetAccuracy()); + Assert.AreEqual(1, inputParameters.LeakageLengthInwardsPhreaticLine3, + inputParameters.LeakageLengthInwardsPhreaticLine3.GetAccuracy()); + Assert.AreEqual(1, inputParameters.LeakageLengthInwardsPhreaticLine4, + inputParameters.LeakageLengthInwardsPhreaticLine4.GetAccuracy()); + Assert.AreEqual(1, inputParameters.LeakageLengthOutwardsPhreaticLine4, + inputParameters.LeakageLengthOutwardsPhreaticLine4.GetAccuracy()); + Assert.AreEqual(1, inputParameters.SlipPlaneMinimumDepth, + inputParameters.SlipPlaneMinimumDepth.GetAccuracy()); + Assert.AreEqual(1, inputParameters.SlipPlaneMinimumLength, + inputParameters.SlipPlaneMinimumLength.GetAccuracy()); + Assert.AreEqual(1, inputParameters.MinimumLevelPhreaticLineAtDikeTopPolder, + inputParameters.MinimumLevelPhreaticLineAtDikeTopPolder.GetAccuracy()); + Assert.AreEqual(1, inputParameters.MinimumLevelPhreaticLineAtDikeTopRiver, + inputParameters.MinimumLevelPhreaticLineAtDikeTopRiver.GetAccuracy()); - Assert.AreEqual(0.5, inputParameters.LocationInputExtreme.WaterLevelPolder); + Assert.AreEqual(0.5, inputParameters.LocationInputExtreme.WaterLevelPolder, + inputParameters.LocationInputExtreme.WaterLevelPolder.GetAccuracy()); Assert.IsFalse(inputParameters.LocationInputExtreme.UseDefaultOffsets); - Assert.AreEqual(1, inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowDikeTopAtRiver.Value); - Assert.AreEqual(1, inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowDikeToeAtPolder.Value); - Assert.AreEqual(1, inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowDikeTopAtPolder.Value); - Assert.AreEqual(1, inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowShoulderBaseInside.Value); - Assert.AreEqual(1, inputParameters.LocationInputExtreme.PenetrationLength.Value); + Assert.AreEqual(1, inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowDikeTopAtRiver, + inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowDikeTopAtRiver.GetAccuracy()); + Assert.AreEqual(1, inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowDikeToeAtPolder, + inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowDikeToeAtPolder.GetAccuracy()); + Assert.AreEqual(1, inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowDikeTopAtPolder, + inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowDikeTopAtPolder.GetAccuracy()); + Assert.AreEqual(1, inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowShoulderBaseInside, + inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowShoulderBaseInside.GetAccuracy()); + Assert.AreEqual(1, inputParameters.LocationInputExtreme.PenetrationLength, + inputParameters.LocationInputExtreme.PenetrationLength.GetAccuracy()); Assert.AreEqual(0.5, inputParameters.LocationInputDaily.WaterLevelPolder); Assert.IsFalse(inputParameters.LocationInputDaily.UseDefaultOffsets); - Assert.AreEqual(1, inputParameters.LocationInputDaily.PhreaticLineOffsetBelowDikeTopAtRiver.Value); - Assert.AreEqual(1, inputParameters.LocationInputDaily.PhreaticLineOffsetBelowDikeToeAtPolder.Value); - Assert.AreEqual(1, inputParameters.LocationInputDaily.PhreaticLineOffsetBelowDikeTopAtPolder.Value); - Assert.AreEqual(1, inputParameters.LocationInputDaily.PhreaticLineOffsetBelowShoulderBaseInside.Value); - Assert.AreEqual(0, inputParameters.LocationInputDaily.PenetrationLength.Value); + Assert.AreEqual(1, inputParameters.LocationInputDaily.PhreaticLineOffsetBelowDikeTopAtRiver, + inputParameters.LocationInputDaily.PhreaticLineOffsetBelowDikeTopAtRiver.GetAccuracy()); + Assert.AreEqual(1, inputParameters.LocationInputDaily.PhreaticLineOffsetBelowDikeToeAtPolder, + inputParameters.LocationInputDaily.PhreaticLineOffsetBelowDikeToeAtPolder.GetAccuracy()); + Assert.AreEqual(1, inputParameters.LocationInputDaily.PhreaticLineOffsetBelowDikeTopAtPolder, + inputParameters.LocationInputDaily.PhreaticLineOffsetBelowDikeTopAtPolder.GetAccuracy()); + Assert.AreEqual(1, inputParameters.LocationInputDaily.PhreaticLineOffsetBelowShoulderBaseInside, + inputParameters.LocationInputDaily.PhreaticLineOffsetBelowShoulderBaseInside.GetAccuracy()); + Assert.AreEqual(0, inputParameters.LocationInputDaily.PenetrationLength, + inputParameters.LocationInputDaily.PenetrationLength.GetAccuracy()); Assert.IsTrue(inputParameters.DrainageConstructionPresent); - Assert.AreEqual(1, inputParameters.XCoordinateDrainageConstruction.Value); - Assert.AreEqual(1, inputParameters.ZCoordinateDrainageConstruction.Value); + Assert.AreEqual(1, inputParameters.XCoordinateDrainageConstruction, + inputParameters.XCoordinateDrainageConstruction.GetAccuracy()); + Assert.AreEqual(1, inputParameters.ZCoordinateDrainageConstruction, + inputParameters.ZCoordinateDrainageConstruction.GetAccuracy()); Assert.AreEqual(MacroStabilityInwardsGridDeterminationType.Manual, inputParameters.GridDeterminationType); Assert.AreEqual(MacroStabilityInwardsTangentLineDeterminationType.Specified, inputParameters.TangentLineDeterminationType); - Assert.AreEqual(1, inputParameters.TangentLineZTop.Value); - Assert.AreEqual(1, inputParameters.TangentLineZBottom.Value); + Assert.AreEqual(1, inputParameters.TangentLineZTop, + inputParameters.TangentLineZTop.GetAccuracy()); + Assert.AreEqual(1, inputParameters.TangentLineZBottom, + inputParameters.TangentLineZBottom.GetAccuracy()); Assert.AreEqual(10, inputParameters.TangentLineNumber); - Assert.AreEqual(1, inputParameters.LeftGrid.XLeft.Value); - Assert.AreEqual(1, inputParameters.LeftGrid.XRight.Value); - Assert.AreEqual(1, inputParameters.LeftGrid.ZTop.Value); - Assert.AreEqual(1, inputParameters.LeftGrid.ZBottom.Value); + Assert.AreEqual(1, inputParameters.LeftGrid.XLeft, + inputParameters.LeftGrid.XLeft.GetAccuracy()); + Assert.AreEqual(1, inputParameters.LeftGrid.XRight, + inputParameters.LeftGrid.XRight.GetAccuracy()); + Assert.AreEqual(1, inputParameters.LeftGrid.ZTop, + inputParameters.LeftGrid.ZTop.GetAccuracy()); + Assert.AreEqual(1, inputParameters.LeftGrid.ZBottom, + inputParameters.LeftGrid.ZBottom.GetAccuracy()); Assert.AreEqual(1, inputParameters.LeftGrid.NumberOfVerticalPoints); Assert.AreEqual(1, inputParameters.LeftGrid.NumberOfHorizontalPoints); - Assert.AreEqual(1, inputParameters.RightGrid.XLeft.Value); - Assert.AreEqual(1, inputParameters.RightGrid.XRight.Value); - Assert.AreEqual(1, inputParameters.RightGrid.ZTop.Value); - Assert.AreEqual(1, inputParameters.RightGrid.ZBottom.Value); + + Assert.AreEqual(1, inputParameters.RightGrid.XLeft, + inputParameters.RightGrid.XLeft.GetAccuracy()); + Assert.AreEqual(1, inputParameters.RightGrid.XRight, + inputParameters.RightGrid.XRight.GetAccuracy()); + Assert.AreEqual(1, inputParameters.RightGrid.ZTop, + inputParameters.RightGrid.ZTop.GetAccuracy()); + Assert.AreEqual(1, inputParameters.RightGrid.ZBottom, + inputParameters.RightGrid.ZBottom.GetAccuracy()); Assert.AreEqual(1, inputParameters.RightGrid.NumberOfVerticalPoints); Assert.AreEqual(1, inputParameters.RightGrid.NumberOfHorizontalPoints); Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/MacroStabilityInwardsCalculationScenarioFactory.cs =================================================================== diff -u -rda648858a19daab1bd647be549652a1c33e7a45b -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/MacroStabilityInwardsCalculationScenarioFactory.cs (.../MacroStabilityInwardsCalculationScenarioFactory.cs) (revision da648858a19daab1bd647be549652a1c33e7a45b) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/MacroStabilityInwardsCalculationScenarioFactory.cs (.../MacroStabilityInwardsCalculationScenarioFactory.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -236,57 +236,57 @@ DikeSoilScenario = MacroStabilityInwardsDikeSoilScenario.SandDikeOnClay, LocationInputExtreme = { - WaterLevelPolder = new RoundedDouble(5, 0.5), + WaterLevelPolder = (RoundedDouble) 0.5, UseDefaultOffsets = false, - PenetrationLength = new RoundedDouble(5, 1.0), - PhreaticLineOffsetBelowDikeToeAtPolder = new RoundedDouble(5, 1.0), - PhreaticLineOffsetBelowDikeTopAtPolder = new RoundedDouble(5, 1.0), - PhreaticLineOffsetBelowDikeTopAtRiver = new RoundedDouble(5, 1.0), - PhreaticLineOffsetBelowShoulderBaseInside = new RoundedDouble(5, 1.0) + PenetrationLength = (RoundedDouble) 1.0, + PhreaticLineOffsetBelowDikeToeAtPolder = (RoundedDouble) 1.0, + PhreaticLineOffsetBelowDikeTopAtPolder = (RoundedDouble) 1.0, + PhreaticLineOffsetBelowDikeTopAtRiver = (RoundedDouble) 1.0, + PhreaticLineOffsetBelowShoulderBaseInside = (RoundedDouble) 1.0 }, LocationInputDaily = { WaterLevelPolder = new RoundedDouble(5, 0.5), UseDefaultOffsets = false, - PhreaticLineOffsetBelowDikeToeAtPolder = new RoundedDouble(5, 1.0), - PhreaticLineOffsetBelowDikeTopAtPolder = new RoundedDouble(5, 1.0), - PhreaticLineOffsetBelowDikeTopAtRiver = new RoundedDouble(5, 1.0), - PhreaticLineOffsetBelowShoulderBaseInside = new RoundedDouble(5, 1.0) + PhreaticLineOffsetBelowDikeToeAtPolder = (RoundedDouble) 1.0, + PhreaticLineOffsetBelowDikeTopAtPolder = (RoundedDouble) 1.0, + PhreaticLineOffsetBelowDikeTopAtRiver = (RoundedDouble) 1.0, + PhreaticLineOffsetBelowShoulderBaseInside = (RoundedDouble) 1.0 }, - PiezometricHeadPhreaticLine2Outwards = new RoundedDouble(5, 1.0), - PiezometricHeadPhreaticLine2Inwards = new RoundedDouble(5, 1.0), + PiezometricHeadPhreaticLine2Outwards = (RoundedDouble) 1.0, + PiezometricHeadPhreaticLine2Inwards = (RoundedDouble) 1.0, AdjustPhreaticLine3And4ForUplift = true, - LeakageLengthInwardsPhreaticLine3 = new RoundedDouble(5, 1.0), - LeakageLengthOutwardsPhreaticLine3 = new RoundedDouble(5, 1.0), - LeakageLengthOutwardsPhreaticLine4 = new RoundedDouble(5, 1.0), - LeakageLengthInwardsPhreaticLine4 = new RoundedDouble(5, 1.0), - SlipPlaneMinimumLength = new RoundedDouble(5, 1.0), - SlipPlaneMinimumDepth = new RoundedDouble(5, 1.0), - MinimumLevelPhreaticLineAtDikeTopPolder = new RoundedDouble(5, 1.0), - MinimumLevelPhreaticLineAtDikeTopRiver = new RoundedDouble(5, 1.0), + LeakageLengthInwardsPhreaticLine3 = (RoundedDouble) 1.0, + LeakageLengthOutwardsPhreaticLine3 = (RoundedDouble) 1.0, + LeakageLengthOutwardsPhreaticLine4 = (RoundedDouble) 1.0, + LeakageLengthInwardsPhreaticLine4 = (RoundedDouble) 1.0, + SlipPlaneMinimumLength = (RoundedDouble) 1.0, + SlipPlaneMinimumDepth = (RoundedDouble) 1.0, + MinimumLevelPhreaticLineAtDikeTopPolder = (RoundedDouble) 1.0, + MinimumLevelPhreaticLineAtDikeTopRiver = (RoundedDouble) 1.0, DrainageConstructionPresent = true, - XCoordinateDrainageConstruction = new RoundedDouble(5, 1.0), - ZCoordinateDrainageConstruction = new RoundedDouble(5, 1.0), + XCoordinateDrainageConstruction = (RoundedDouble) 1.0, + ZCoordinateDrainageConstruction = (RoundedDouble) 1.0, GridDeterminationType = MacroStabilityInwardsGridDeterminationType.Manual, TangentLineDeterminationType = MacroStabilityInwardsTangentLineDeterminationType.Specified, - TangentLineZTop = new RoundedDouble(5, 1.0), - TangentLineZBottom = new RoundedDouble(5, 1.0), + TangentLineZTop = (RoundedDouble) 1.0, + TangentLineZBottom = (RoundedDouble) 1.0, TangentLineNumber = 10, LeftGrid = { - XLeft = new RoundedDouble(5, 1.0), - XRight = new RoundedDouble(5, 1.0), - ZTop = new RoundedDouble(5, 1.0), - ZBottom = new RoundedDouble(5, 1.0), + XLeft = (RoundedDouble) 1.0, + XRight = (RoundedDouble) 1.0, + ZTop = (RoundedDouble) 1.0, + ZBottom = (RoundedDouble) 1.0, NumberOfVerticalPoints = 1, NumberOfHorizontalPoints = 1 }, RightGrid = { - XLeft = new RoundedDouble(5, 1.0), - XRight = new RoundedDouble(5, 1.0), - ZTop = new RoundedDouble(5, 1.0), - ZBottom = new RoundedDouble(5, 1.0), + XLeft = (RoundedDouble) 1.0, + XRight = (RoundedDouble) 1.0, + ZTop = (RoundedDouble) 1.0, + ZBottom = (RoundedDouble) 1.0, NumberOfVerticalPoints = 1, NumberOfHorizontalPoints = 1 } Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsDrainagePropertiesTest.cs =================================================================== diff -u -r88ae0776d429bb80080b8e209be5a658070ce38c -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsDrainagePropertiesTest.cs (.../MacroStabilityInwardsDrainagePropertiesTest.cs) (revision 88ae0776d429bb80080b8e209be5a658070ce38c) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsDrainagePropertiesTest.cs (.../MacroStabilityInwardsDrainagePropertiesTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -169,10 +169,10 @@ var handler = new ObservablePropertyChangeHandler(calculationItem, input); var properties = new MacroStabilityInwardsDrainageProperties(input, handler); - var random = new Random(); + var random = new Random(21); bool constructionPresent = random.NextBoolean(); - double xCoordinateDrainageConstruction = random.Next(); - double zCoordinateDrainageConstruction = random.Next(); + double xCoordinateDrainageConstruction = random.NextDouble(); + double zCoordinateDrainageConstruction = random.NextDouble(); // When properties.DrainageConstructionPresent = constructionPresent; @@ -194,7 +194,7 @@ var calculation = new MacroStabilityInwardsCalculationScenario(); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.DrainageConstructionPresent = true, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.DrainageConstructionPresent = true, calculation); } [Test] @@ -204,7 +204,7 @@ var calculation = new MacroStabilityInwardsCalculationScenario(); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.XCoordinateDrainageConstruction = (RoundedDouble) 1, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.XCoordinateDrainageConstruction = (RoundedDouble) 1, calculation); } [Test] @@ -214,7 +214,7 @@ var calculation = new MacroStabilityInwardsCalculationScenario(); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.ZCoordinateDrainageConstruction = (RoundedDouble) 1, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.ZCoordinateDrainageConstruction = (RoundedDouble) 1, calculation); } [Test] @@ -299,8 +299,8 @@ Assert.AreEqual(string.Empty, toString); } - private static void SetPropertyAndVerifyNotifcationsForCalculation(Action setProperty, - MacroStabilityInwardsCalculation calculation) + private static void SetPropertyAndVerifyNotificationsForCalculation(Action setProperty, + MacroStabilityInwardsCalculation calculation) { // Setup var mocks = new MockRepository(); Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsFailureMechanismContextPropertiesTest.cs =================================================================== diff -u -r3178e116f5e59e03078d465efeb303c5e232c7bf -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsFailureMechanismContextPropertiesTest.cs (.../MacroStabilityInwardsFailureMechanismContextPropertiesTest.cs) (revision 3178e116f5e59e03078d465efeb303c5e232c7bf) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsFailureMechanismContextPropertiesTest.cs (.../MacroStabilityInwardsFailureMechanismContextPropertiesTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -227,7 +227,7 @@ [TestCase(-0.1)] [TestCase(1.1)] [TestCase(8)] - public void A_SetInvalidValue_ThrowsArgumentOutOfRangeExceptionNoNotifcations(double value) + public void A_SetInvalidValue_ThrowsArgumentOutOfRangeExceptionNoNotifications(double value) { // Setup var failureMechanism = new MacroStabilityInwardsFailureMechanism(); Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsGridPropertiesTest.cs =================================================================== diff -u -r59adecfc7f82ab8277440ecae147453f5cbddbbf -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsGridPropertiesTest.cs (.../MacroStabilityInwardsGridPropertiesTest.cs) (revision 59adecfc7f82ab8277440ecae147453f5cbddbbf) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsGridPropertiesTest.cs (.../MacroStabilityInwardsGridPropertiesTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -27,6 +27,7 @@ using Core.Common.TestUtil; using NUnit.Framework; using Rhino.Mocks; +using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.Forms.ChangeHandlers; using Ringtoets.Common.Forms.PropertyClasses; using Ringtoets.Common.Forms.TestUtil; @@ -199,11 +200,11 @@ var handler = new ObservablePropertyChangeHandler(calculationItem, input); var properties = new MacroStabilityInwardsGridProperties(grid, handler, false); - var random = new Random(); - double xLeft = random.Next(); - double xRight = random.Next(); - double zTop = random.Next(); - double zBottom = random.Next(); + var random = new Random(21); + double xLeft = random.NextDouble(); + double xRight = random.NextDouble(); + double zTop = random.NextDouble(); + double zBottom = random.NextDouble(); int numberOfHorizontalPoints = random.Next(); int numberOfVerticalPoints = random.Next(); @@ -216,10 +217,10 @@ properties.NumberOfVerticalPoints = numberOfVerticalPoints; // Then - Assert.AreEqual(xLeft, grid.XLeft); - Assert.AreEqual(xRight, grid.XRight); - Assert.AreEqual(zTop, grid.ZTop); - Assert.AreEqual(zBottom, grid.ZBottom); + Assert.AreEqual(xLeft, grid.XLeft, grid.XLeft.GetAccuracy()); + Assert.AreEqual(xRight, grid.XRight, grid.XRight.GetAccuracy()); + Assert.AreEqual(zTop, grid.ZTop, grid.ZTop.GetAccuracy()); + Assert.AreEqual(zBottom, grid.ZBottom, grid.ZBottom.GetAccuracy()); Assert.AreEqual(numberOfHorizontalPoints, grid.NumberOfHorizontalPoints); Assert.AreEqual(numberOfVerticalPoints, grid.NumberOfVerticalPoints); } @@ -231,7 +232,7 @@ var calculation = new MacroStabilityInwardsCalculationScenario(); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.XLeft = (RoundedDouble) 1, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.XLeft = (RoundedDouble) 1, calculation); } [Test] @@ -241,7 +242,7 @@ var calculation = new MacroStabilityInwardsCalculationScenario(); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.XRight = (RoundedDouble) 1, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.XRight = (RoundedDouble) 1, calculation); } [Test] @@ -251,7 +252,7 @@ var calculation = new MacroStabilityInwardsCalculationScenario(); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.ZTop = (RoundedDouble) 1, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.ZTop = (RoundedDouble) 1, calculation); } [Test] @@ -261,7 +262,7 @@ var calculation = new MacroStabilityInwardsCalculationScenario(); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.ZBottom = (RoundedDouble) 1, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.ZBottom = (RoundedDouble) 1, calculation); } [Test] @@ -271,7 +272,7 @@ var calculation = new MacroStabilityInwardsCalculationScenario(); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.NumberOfHorizontalPoints = 1, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.NumberOfHorizontalPoints = 1, calculation); } [Test] @@ -281,7 +282,7 @@ var calculation = new MacroStabilityInwardsCalculationScenario(); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.NumberOfVerticalPoints = 1, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.NumberOfVerticalPoints = 1, calculation); } [Test] @@ -320,8 +321,8 @@ Assert.AreEqual(isReadOnly, result); } - private static void SetPropertyAndVerifyNotifcationsForCalculation(Action setProperty, - MacroStabilityInwardsCalculation calculation) + private static void SetPropertyAndVerifyNotificationsForCalculation(Action setProperty, + MacroStabilityInwardsCalculation calculation) { // Setup var mocks = new MockRepository(); Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsGridSettingsPropertiesTest.cs =================================================================== diff -u -r157823b19017d2c35a53b84ff1bbdbafd744ed72 -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsGridSettingsPropertiesTest.cs (.../MacroStabilityInwardsGridSettingsPropertiesTest.cs) (revision 157823b19017d2c35a53b84ff1bbdbafd744ed72) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsGridSettingsPropertiesTest.cs (.../MacroStabilityInwardsGridSettingsPropertiesTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -231,7 +231,7 @@ var handler = new ObservablePropertyChangeHandler(calculationItem, input); var properties = new MacroStabilityInwardsGridSettingsProperties(input, handler); - var random = new Random(); + var random = new Random(21); bool moveGrid = random.NextBoolean(); var gridDeterminationType = random.NextEnumValue(); var tangentLineDeterminationType = random.NextEnumValue(); @@ -263,7 +263,7 @@ var calculation = new MacroStabilityInwardsCalculationScenario(); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.MoveGrid = true, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.MoveGrid = true, calculation); } [Test] @@ -273,7 +273,7 @@ var calculation = new MacroStabilityInwardsCalculationScenario(); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.GridDeterminationType = MacroStabilityInwardsGridDeterminationType.Manual, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.GridDeterminationType = MacroStabilityInwardsGridDeterminationType.Manual, calculation); } [Test] @@ -283,7 +283,7 @@ var calculation = new MacroStabilityInwardsCalculationScenario(); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.TangentLineDeterminationType = MacroStabilityInwardsTangentLineDeterminationType.Specified, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.TangentLineDeterminationType = MacroStabilityInwardsTangentLineDeterminationType.Specified, calculation); } [Test] @@ -293,7 +293,7 @@ var calculation = new MacroStabilityInwardsCalculationScenario(); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.TangentLineZTop = (RoundedDouble) 1, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.TangentLineZTop = (RoundedDouble) 1, calculation); } [Test] @@ -303,7 +303,7 @@ var calculation = new MacroStabilityInwardsCalculationScenario(); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.TangentLineZBottom = (RoundedDouble) 1, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.TangentLineZBottom = (RoundedDouble) 1, calculation); } [Test] @@ -313,7 +313,7 @@ var calculation = new MacroStabilityInwardsCalculationScenario(); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.TangentLineNumber = 10, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.TangentLineNumber = 10, calculation); } [Test] @@ -393,8 +393,8 @@ Assert.AreEqual(isTangentlineDeterminationTypeLayerSeparated || isGridDeterminationTypeAutomatic, result); } - private static void SetPropertyAndVerifyNotifcationsForCalculation(Action setProperty, - MacroStabilityInwardsCalculation calculation) + private static void SetPropertyAndVerifyNotificationsForCalculation(Action setProperty, + MacroStabilityInwardsCalculation calculation) { // Setup var mocks = new MockRepository(); Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsInputContextPropertiesTest.cs =================================================================== diff -u -rb13759ad077f9e2b4104de000b5bdeafa9abe358 -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsInputContextPropertiesTest.cs (.../MacroStabilityInwardsInputContextPropertiesTest.cs) (revision b13759ad077f9e2b4104de000b5bdeafa9abe358) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsInputContextPropertiesTest.cs (.../MacroStabilityInwardsInputContextPropertiesTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -445,15 +445,15 @@ var handler = new ObservablePropertyChangeHandler(calculationItem, calculationItem.InputParameters); var properties = new MacroStabilityInwardsInputContextProperties(context, handler); - var random = new Random(); + var random = new Random(21); const double assessmentLevel = 0.36; MacroStabilityInwardsSurfaceLine surfaceLine = ValidSurfaceLine(0.0, 4.0); MacroStabilityInwardsStochasticSoilModel soilModel = ValidStochasticSoilModel(0.0, 4.0); MacroStabilityInwardsStochasticSoilProfile soilProfile = soilModel.StochasticSoilProfiles.First(); const MacroStabilityInwardsDikeSoilScenario dikeSoilScenario = MacroStabilityInwardsDikeSoilScenario.SandDikeOnSand; - double slipPlaneMinimumDepth = random.Next(); - double slipPlaneMinimumLength = random.Next(); - double maximumSliceWidth = random.Next(); + double slipPlaneMinimumDepth = random.NextDouble(); + double slipPlaneMinimumLength = random.NextDouble(); + double maximumSliceWidth = random.NextDouble(); // When properties.UseAssessmentLevelManualInput = true; @@ -472,9 +472,9 @@ Assert.AreSame(soilModel, inputParameters.StochasticSoilModel); Assert.AreSame(soilProfile, inputParameters.StochasticSoilProfile); Assert.AreEqual(dikeSoilScenario, inputParameters.DikeSoilScenario); - Assert.AreEqual(slipPlaneMinimumDepth, inputParameters.SlipPlaneMinimumDepth); - Assert.AreEqual(slipPlaneMinimumLength, inputParameters.SlipPlaneMinimumLength); - Assert.AreEqual(maximumSliceWidth, inputParameters.MaximumSliceWidth); + Assert.AreEqual(slipPlaneMinimumDepth, inputParameters.SlipPlaneMinimumDepth, inputParameters.SlipPlaneMinimumDepth.GetAccuracy()); + Assert.AreEqual(slipPlaneMinimumLength, inputParameters.SlipPlaneMinimumLength, inputParameters.SlipPlaneMinimumLength.GetAccuracy()); + Assert.AreEqual(maximumSliceWidth, inputParameters.MaximumSliceWidth, inputParameters.MaximumSliceWidth.GetAccuracy()); mocks.VerifyAll(); } @@ -486,7 +486,7 @@ var calculation = new MacroStabilityInwardsCalculationScenario(); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(p => p.SurfaceLine = newSurfaceLine, calculation); + SetPropertyAndVerifyNotificationsForCalculation(p => p.SurfaceLine = newSurfaceLine, calculation); } [Test] @@ -497,7 +497,7 @@ var calculation = new MacroStabilityInwardsCalculationScenario(); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.StochasticSoilModel = newSoilModel, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.StochasticSoilModel = newSoilModel, calculation); } [Test] @@ -508,7 +508,7 @@ var calculation = new MacroStabilityInwardsCalculationScenario(); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.StochasticSoilProfile = newSoilProfile, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.StochasticSoilProfile = newSoilProfile, calculation); } [Test] @@ -525,7 +525,7 @@ }; // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.AssessmentLevel = newAssessmentLevel, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.AssessmentLevel = newAssessmentLevel, calculation); } [Test] @@ -535,20 +535,20 @@ var calculation = new MacroStabilityInwardsCalculationScenario(); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.UseAssessmentLevelManualInput = true, - calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.UseAssessmentLevelManualInput = true, + calculation); } [Test] public void DikeSoilScenario_SetNewValue_SetsValuesAndUpdatesObservers() { // Setup - var newDikeSoilScenario = new Random().NextEnumValue(); + var newDikeSoilScenario = new Random(21).NextEnumValue(); var calculation = new MacroStabilityInwardsCalculationScenario(); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.DikeSoilScenario = newDikeSoilScenario, - calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.DikeSoilScenario = newDikeSoilScenario, + calculation); } [Test] @@ -558,8 +558,8 @@ var calculation = new MacroStabilityInwardsCalculationScenario(); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.SlipPlaneMinimumDepth = (RoundedDouble) 1, - calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.SlipPlaneMinimumDepth = (RoundedDouble) 1, + calculation); } [Test] @@ -569,8 +569,8 @@ var calculation = new MacroStabilityInwardsCalculationScenario(); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.SlipPlaneMinimumLength = (RoundedDouble) 1, - calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.SlipPlaneMinimumLength = (RoundedDouble) 1, + calculation); } [Test] @@ -580,8 +580,8 @@ var calculation = new MacroStabilityInwardsCalculationScenario(); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.MaximumSliceWidth = (RoundedDouble) 1, - calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.MaximumSliceWidth = (RoundedDouble) 1, + calculation); } [Test] @@ -1574,7 +1574,7 @@ Assert.IsFalse(result); } - private static void SetPropertyAndVerifyNotifcationsForCalculation( + private static void SetPropertyAndVerifyNotificationsForCalculation( Action setProperty, MacroStabilityInwardsCalculationScenario calculation) { Fisheye: Tag d485f27eb5a6d688406882dce60c3229e22f2ac2 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsLocationDailyPropertiesTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag d485f27eb5a6d688406882dce60c3229e22f2ac2 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsLocationExtremePropertiesTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsLocationInputBasePropertiesTest.cs =================================================================== diff -u --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsLocationInputBasePropertiesTest.cs (revision 0) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsLocationInputBasePropertiesTest.cs (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -0,0 +1,236 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using System.ComponentModel; +using Core.Common.Base; +using Core.Common.Base.Data; +using Core.Common.Gui.PropertyBag; +using Core.Common.TestUtil; +using NUnit.Framework; +using Rhino.Mocks; +using Ringtoets.Common.Data.TestUtil; +using Ringtoets.Common.Forms.ChangeHandlers; +using Ringtoets.Common.Forms.PropertyClasses; +using Ringtoets.Common.Forms.TestUtil; +using Ringtoets.MacroStabilityInwards.Data; +using Ringtoets.MacroStabilityInwards.Forms.PropertyClasses; + +namespace Ringtoets.MacroStabilityInwards.Forms.Test.PropertyClasses +{ + [TestFixture] + public class MacroStabilityInwardsLocationInputBasePropertiesTest + { + private const int expectedwaterLevelPolderPropertyIndex = 0; + private const int expecteOffsetPropertyIndex = 1; + + [Test] + public void Constructor_ExpectedValues() + { + // Setup + var mocks = new MockRepository(); + var changeHandler = mocks.Stub(); + mocks.ReplayAll(); + + var input = new TestMacroStabilityInwardsLocationInput(); + + // Call + var properties = new TestMacroStabilityInwardsLocationProperties(input, changeHandler); + + // Assert + Assert.IsInstanceOf>(properties); + Assert.AreSame(input, properties.Data); + + TestHelper.AssertTypeConverter( + nameof(TestMacroStabilityInwardsLocationProperties.Offsets)); + + mocks.VerifyAll(); + } + + [Test] + public void Constructor_DataNull_ThrowsArgumentNullException() + { + // Setup + var mocks = new MockRepository(); + var changeHandler = mocks.Stub(); + mocks.ReplayAll(); + + // Call + TestDelegate call = () => new TestMacroStabilityInwardsLocationProperties(null, changeHandler); + + // Assert + var exception = Assert.Throws(call); + Assert.AreEqual("data", exception.ParamName); + mocks.VerifyAll(); + } + + [Test] + public void Constructor_HandlerNull_ThrowsArgumentNullException() + { + // Call + TestDelegate call = () => new TestMacroStabilityInwardsLocationProperties(new TestMacroStabilityInwardsLocationInput(), + null); + + // Assert + var exception = Assert.Throws(call); + Assert.AreEqual("handler", exception.ParamName); + } + + [Test] + public void Constructor_ValidData_PropertiesHaveExpectedAttributesValues() + { + // Setup + var mocks = new MockRepository(); + var changeHandler = mocks.Stub(); + mocks.ReplayAll(); + + var input = new TestMacroStabilityInwardsLocationInput(); + + // Call + var properties = new TestMacroStabilityInwardsLocationProperties(input, changeHandler); + + // Assert + PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); + + Assert.AreEqual(2, dynamicProperties.Count); + + const string waterStressesCategory = "Waterspanningen"; + + PropertyDescriptor waterLevelPolderProperty = dynamicProperties[expectedwaterLevelPolderPropertyIndex]; + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties( + waterLevelPolderProperty, + waterStressesCategory, + "Polderpeil [m+NAP]", + "Het niveau van het oppervlaktewater binnen een beheersgebied."); + + PropertyDescriptor offsetProperty = dynamicProperties[expecteOffsetPropertyIndex]; + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties( + offsetProperty, + waterStressesCategory, + "Offsets PL 1", + "Eigenschappen van offsets PL 1.", + true); + + mocks.VerifyAll(); + } + + [Test] + public void GetProperties_WithData_ReturnExpectedValues() + { + // Setup + var mocks = new MockRepository(); + var changeHandler = mocks.Stub(); + mocks.ReplayAll(); + + var input = new TestMacroStabilityInwardsLocationInput(); + + // Call + var properties = new TestMacroStabilityInwardsLocationProperties(input, changeHandler); + + // Assert + Assert.AreEqual(input.WaterLevelPolder, properties.WaterLevelPolder); + Assert.AreSame(input, properties.Offsets.Data); + + mocks.VerifyAll(); + } + + [Test] + public void GivenPropertiesWithData_WhenChangingProperties_ThenPropertiesSetOnInput() + { + // Given + var calculationItem = new MacroStabilityInwardsCalculationScenario(); + var input = (MacroStabilityInwardsLocationInputBase) calculationItem.InputParameters.LocationInputExtreme; + + var handler = new ObservablePropertyChangeHandler(calculationItem, calculationItem.InputParameters); + var properties = new TestMacroStabilityInwardsLocationProperties(input, handler); + + var random = new Random(21); + double waterLevelPolder = random.NextDouble(); + + // When + properties.WaterLevelPolder = (RoundedDouble) waterLevelPolder; + + // Then + Assert.AreEqual(waterLevelPolder, input.WaterLevelPolder, + input.WaterLevelPolder.GetAccuracy()); + } + + [Test] + public void WaterLevelPolder_SetValidValue_SetsValueAndUpdatesObservers() + { + // Setup + var calculation = new MacroStabilityInwardsCalculationScenario(); + + // Call & Assert + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.WaterLevelPolder = (RoundedDouble) 1); + } + + [Test] + public void ToString_Always_ReturnEmptyString() + { + // Setup + var mocks = new MockRepository(); + var changeHandler = mocks.Stub(); + mocks.ReplayAll(); + + var input = new TestMacroStabilityInwardsLocationInput(); + var properties = new TestMacroStabilityInwardsLocationProperties(input, changeHandler); + + // Call + string toString = properties.ToString(); + + // Assert + Assert.AreEqual(string.Empty, toString); + } + + private static void SetPropertyAndVerifyNotificationsForCalculation(Action setProperty) + { + // Setup + var mocks = new MockRepository(); + var observable = mocks.StrictMock(); + observable.Expect(o => o.NotifyObservers()); + mocks.ReplayAll(); + + var handler = new SetPropertyValueAfterConfirmationParameterTester(new[] + { + observable + }); + + var properties = new TestMacroStabilityInwardsLocationProperties(new TestMacroStabilityInwardsLocationInput(), handler); + + // Call + setProperty(properties); + + // Assert + Assert.IsTrue(handler.Called); + mocks.VerifyAll(); + } + + private class TestMacroStabilityInwardsLocationProperties : MacroStabilityInwardsLocationInputBaseProperties + { + public TestMacroStabilityInwardsLocationProperties(MacroStabilityInwardsLocationInputBase data, + IObservablePropertyChangeHandler handler) + : base(data, handler) {} + } + + private class TestMacroStabilityInwardsLocationInput : MacroStabilityInwardsLocationInputBase {} + } +} \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsLocationInputDailyPropertiesTest.cs =================================================================== diff -u --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsLocationInputDailyPropertiesTest.cs (revision 0) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsLocationInputDailyPropertiesTest.cs (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -0,0 +1,188 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using System.ComponentModel; +using Core.Common.Base; +using Core.Common.Base.Data; +using Core.Common.TestUtil; +using NUnit.Framework; +using Rhino.Mocks; +using Ringtoets.Common.Data.TestUtil; +using Ringtoets.Common.Forms.ChangeHandlers; +using Ringtoets.Common.Forms.PropertyClasses; +using Ringtoets.Common.Forms.TestUtil; +using Ringtoets.MacroStabilityInwards.Data; +using Ringtoets.MacroStabilityInwards.Forms.PropertyClasses; + +namespace Ringtoets.MacroStabilityInwards.Forms.Test.PropertyClasses +{ + [TestFixture] + public class MacroStabilityInwardsLocationInputDailyPropertiesTest + { + private const int expectedwaterLevelPolderPropertyIndex = 0; + private const int expectedOffsetPropertyIndex = 1; + private const int expectedPenetrationLengthPropertyIndex = 2; + + [Test] + public void Constructor_ExpectedValues() + { + // Setup + var mocks = new MockRepository(); + var changeHandler = mocks.Stub(); + mocks.ReplayAll(); + + var input = new MacroStabilityInwardsLocationInputDaily(); + + // Call + var properties = new MacroStabilityInwardsLocationInputDailyProperties(input, changeHandler); + + // Assert + Assert.IsInstanceOf>(properties); + Assert.AreSame(input, properties.Data); + + mocks.VerifyAll(); + } + + [Test] + public void Constructor_ValidData_PropertiesHaveExpectedAttributesValues() + { + // Setup + var mocks = new MockRepository(); + var changeHandler = mocks.Stub(); + mocks.ReplayAll(); + + var input = new MacroStabilityInwardsLocationInputDaily(); + + // Call + var properties = new MacroStabilityInwardsLocationInputDailyProperties(input, changeHandler); + + // Assert + PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); + + Assert.AreEqual(3, dynamicProperties.Count); + + const string waterStressesCategory = "Waterspanningen"; + + PropertyDescriptor waterLevelPolderProperty = dynamicProperties[expectedwaterLevelPolderPropertyIndex]; + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties( + waterLevelPolderProperty, + waterStressesCategory, + "Polderpeil [m+NAP]", + "Het niveau van het oppervlaktewater binnen een beheersgebied."); + + PropertyDescriptor offsetProperty = dynamicProperties[expectedOffsetPropertyIndex]; + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties( + offsetProperty, + waterStressesCategory, + "Offsets PL 1", + "Eigenschappen van offsets PL 1.", + true); + + PropertyDescriptor penetrationLengthProperty = dynamicProperties[expectedPenetrationLengthPropertyIndex]; + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties( + penetrationLengthProperty, + waterStressesCategory, + "Indringingslengte [m]", + "De verticale afstand waarover de waterspanning in de deklaag verandert bij waterspanningsvariaties in de watervoerende zandlaag.", + true); + + mocks.VerifyAll(); + } + + [Test] + public void GetProperties_WithData_ReturnExpectedValues() + { + // Setup + var mocks = new MockRepository(); + var changeHandler = mocks.Stub(); + mocks.ReplayAll(); + + var input = new MacroStabilityInwardsLocationInputDaily(); + + // Call + var properties = new MacroStabilityInwardsLocationInputDailyProperties(input, changeHandler); + + // Assert + Assert.AreEqual(input.PenetrationLength, properties.PenetrationLength); + + mocks.VerifyAll(); + } + + [Test] + public void GivenPropertiesWithData_WhenChangingProperties_ThenPropertiesSetOnInput() + { + // Given + var calculationItem = new MacroStabilityInwardsCalculationScenario(); + var input = (MacroStabilityInwardsLocationInputDaily) calculationItem.InputParameters.LocationInputDaily; + + var handler = new ObservablePropertyChangeHandler(calculationItem, calculationItem.InputParameters); + var properties = new MacroStabilityInwardsLocationInputDailyProperties(input, handler); + + var random = new Random(21); + double waterLevelPolder = random.NextDouble(); + + // When + properties.WaterLevelPolder = (RoundedDouble) waterLevelPolder; + + // Then + Assert.AreEqual(waterLevelPolder, input.WaterLevelPolder, + input.WaterLevelPolder.GetAccuracy()); + } + + [Test] + public void WaterLevelPolder_SetValidValue_SetsValueAndUpdatesObservers() + { + // Setup + var random = new Random(21); + var calculation = new MacroStabilityInwardsCalculationScenario(); + + // Call & Assert + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.WaterLevelPolder = random.NextRoundedDouble(), calculation); + } + + private static void SetPropertyAndVerifyNotificationsForCalculation(Action setProperty, + MacroStabilityInwardsCalculation calculation) + { + // Setup + var mocks = new MockRepository(); + var observable = mocks.StrictMock(); + observable.Expect(o => o.NotifyObservers()); + mocks.ReplayAll(); + + MacroStabilityInwardsInput input = calculation.InputParameters; + + var handler = new SetPropertyValueAfterConfirmationParameterTester(new[] + { + observable + }); + + var properties = new MacroStabilityInwardsLocationInputDailyProperties((MacroStabilityInwardsLocationInputDaily) input.LocationInputDaily, handler); + + // Call + setProperty(properties); + + // Assert + Assert.IsTrue(handler.Called); + mocks.VerifyAll(); + } + } +} \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsLocationInputExtremePropertiesTest.cs =================================================================== diff -u --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsLocationInputExtremePropertiesTest.cs (revision 0) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsLocationInputExtremePropertiesTest.cs (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -0,0 +1,190 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using System.ComponentModel; +using Core.Common.Base; +using Core.Common.Base.Data; +using Core.Common.Gui.PropertyBag; +using Core.Common.TestUtil; +using NUnit.Framework; +using Rhino.Mocks; +using Ringtoets.Common.Data.TestUtil; +using Ringtoets.Common.Forms.ChangeHandlers; +using Ringtoets.Common.Forms.PropertyClasses; +using Ringtoets.Common.Forms.TestUtil; +using Ringtoets.MacroStabilityInwards.Data; +using Ringtoets.MacroStabilityInwards.Forms.PropertyClasses; + +namespace Ringtoets.MacroStabilityInwards.Forms.Test.PropertyClasses +{ + [TestFixture] + public class MacroStabilityInwardsLocationInputExtremePropertiesTest + { + private const int expectedwaterLevelPolderPropertyIndex = 0; + private const int expecteOffsetPropertyIndex = 1; + private const int expectedPenetrationLengthPropertyIndex = 2; + + [Test] + public void Constructor_ExpectedValues() + { + // Setup + var mocks = new MockRepository(); + var changeHandler = mocks.Stub(); + mocks.ReplayAll(); + + var input = new MacroStabilityInwardsLocationInputExtreme(); + + // Call + var properties = new MacroStabilityInwardsLocationInputExtremeProperties(input, changeHandler); + + // Assert + Assert.IsInstanceOf>(properties); + Assert.AreSame(input, properties.Data); + + mocks.VerifyAll(); + } + + [Test] + public void Constructor_ValidData_PropertiesHaveExpectedAttributesValues() + { + // Setup + var mocks = new MockRepository(); + var changeHandler = mocks.Stub(); + mocks.ReplayAll(); + + var input = new MacroStabilityInwardsLocationInputExtreme(); + + // Call + var properties = new MacroStabilityInwardsLocationInputExtremeProperties(input, changeHandler); + + // Assert + PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); + + Assert.AreEqual(3, dynamicProperties.Count); + + const string waterStressesCategory = "Waterspanningen"; + + PropertyDescriptor waterLevelPolderProperty = dynamicProperties[expectedwaterLevelPolderPropertyIndex]; + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties( + waterLevelPolderProperty, + waterStressesCategory, + "Polderpeil [m+NAP]", + "Het niveau van het oppervlaktewater binnen een beheersgebied."); + + PropertyDescriptor offsetProperty = dynamicProperties[expecteOffsetPropertyIndex]; + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties( + offsetProperty, + waterStressesCategory, + "Offsets PL 1", + "Eigenschappen van offsets PL 1.", + true); + + PropertyDescriptor penetrationLengthProperty = dynamicProperties[expectedPenetrationLengthPropertyIndex]; + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties( + penetrationLengthProperty, + waterStressesCategory, + "Indringingslengte [m]", + "De verticale afstand waarover de waterspanning in de deklaag verandert bij waterspanningsvariaties in de watervoerende zandlaag."); + + mocks.VerifyAll(); + } + + [Test] + public void GetProperties_WithData_ReturnExpectedValues() + { + // Setup + var mocks = new MockRepository(); + var changeHandler = mocks.Stub(); + mocks.ReplayAll(); + + var input = new MacroStabilityInwardsLocationInputExtreme(); + + // Call + var properties = new MacroStabilityInwardsLocationInputExtremeProperties(input, changeHandler); + + // Assert + Assert.AreEqual(input.PenetrationLength, properties.PenetrationLength); + + mocks.VerifyAll(); + } + + [Test] + public void GivenPropertiesWithData_WhenChangingProperties_ThenPropertiesSetOnInput() + { + // Given + var calculationItem = new MacroStabilityInwardsCalculationScenario(); + var input = (MacroStabilityInwardsLocationInputExtreme) calculationItem.InputParameters.LocationInputExtreme; + + var handler = new ObservablePropertyChangeHandler(calculationItem, calculationItem.InputParameters); + var properties = new MacroStabilityInwardsLocationInputExtremeProperties(input, handler); + + var random = new Random(21); + double waterLevelPolder = random.NextDouble(); + double penetrationLength = random.NextDouble(); + + // When + properties.WaterLevelPolder = (RoundedDouble) waterLevelPolder; + properties.PenetrationLength = (RoundedDouble) penetrationLength; + + // Then + Assert.AreEqual(penetrationLength, input.PenetrationLength, + input.PenetrationLength.GetAccuracy()); + } + + [Test] + public void PenetrationLength_SetValidValue_SetsValueAndUpdatesObservers() + { + // Setup + var random = new Random(21); + var calculation = new MacroStabilityInwardsCalculationScenario(); + + // Call & Assert + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.PenetrationLength = random.NextRoundedDouble(), calculation); + } + + private static void SetPropertyAndVerifyNotificationsForCalculation(Action setProperty, + MacroStabilityInwardsCalculation calculation) + { + // Setup + var mocks = new MockRepository(); + var observable = mocks.StrictMock(); + observable.Expect(o => o.NotifyObservers()); + mocks.ReplayAll(); + + MacroStabilityInwardsInput input = calculation.InputParameters; + + var handler = new SetPropertyValueAfterConfirmationParameterTester(new[] + { + observable + }); + + var properties = new MacroStabilityInwardsLocationInputExtremeProperties((MacroStabilityInwardsLocationInputExtreme) input.LocationInputExtreme, handler); + + // Call + setProperty(properties); + + // Assert + Assert.IsTrue(handler.Called); + mocks.VerifyAll(); + } + } +} \ No newline at end of file Fisheye: Tag d485f27eb5a6d688406882dce60c3229e22f2ac2 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsLocationPropertiesTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsOffsetPropertiesTest.cs =================================================================== diff -u -r90a9502badff5788374461a1b2179a5dd0e866a2 -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsOffsetPropertiesTest.cs (.../MacroStabilityInwardsOffsetPropertiesTest.cs) (revision 90a9502badff5788374461a1b2179a5dd0e866a2) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsOffsetPropertiesTest.cs (.../MacroStabilityInwardsOffsetPropertiesTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -53,13 +53,13 @@ var changeHandler = mocks.Stub(); mocks.ReplayAll(); - var input = new MacroStabilityInwardsLocationInputExtreme(); + var input = new TestMacroStabilityInwardsLocationInput(); // Call var properties = new MacroStabilityInwardsOffsetProperties(input, changeHandler); // Assert - Assert.IsInstanceOf>(properties); + Assert.IsInstanceOf>(properties); Assert.AreSame(input, properties.Data); mocks.VerifyAll(); } @@ -85,7 +85,7 @@ public void Constructor_HandlerNull_ThrowsArgumentNullException() { // Call - TestDelegate call = () => new MacroStabilityInwardsOffsetProperties(new MacroStabilityInwardsLocationInputExtreme(), + TestDelegate call = () => new MacroStabilityInwardsOffsetProperties(new TestMacroStabilityInwardsLocationInput(), null); // Assert @@ -103,7 +103,7 @@ var changeHandler = mocks.Stub(); mocks.ReplayAll(); - var input = new MacroStabilityInwardsLocationInputExtreme + var input = new TestMacroStabilityInwardsLocationInput { UseDefaultOffsets = useDefaultOffsets }; @@ -168,7 +168,7 @@ var changeHandler = mocks.Stub(); mocks.ReplayAll(); - var input = new MacroStabilityInwardsLocationInputExtreme(); + var input = new TestMacroStabilityInwardsLocationInput(); // Call var properties = new MacroStabilityInwardsOffsetProperties(input, changeHandler); @@ -187,17 +187,17 @@ { // Given var calculationItem = new MacroStabilityInwardsCalculationScenario(); - var input = (MacroStabilityInwardsLocationInput) calculationItem.InputParameters.LocationInputExtreme; + var input = new TestMacroStabilityInwardsLocationInput(); var handler = new ObservablePropertyChangeHandler(calculationItem, calculationItem.InputParameters); var properties = new MacroStabilityInwardsOffsetProperties(input, handler); - var random = new Random(); + var random = new Random(21); bool useDefaultOffsets = random.NextBoolean(); - double phreaticLineOffsetBelowDikeTopAtRiver = random.Next(); - double phreaticLineOffsetBelowDikeTopAtPolder = random.Next(); - double phreaticLineOffsetBelowShoulderBaseInside = random.Next(); - double phreaticLineOffsetBelowDikeToeAtPolder = random.Next(); + double phreaticLineOffsetBelowDikeTopAtRiver = random.NextDouble(); + double phreaticLineOffsetBelowDikeTopAtPolder = random.NextDouble(); + double phreaticLineOffsetBelowShoulderBaseInside = random.NextDouble(); + double phreaticLineOffsetBelowDikeToeAtPolder = random.NextDouble(); // When properties.UseDefaultOffsets = useDefaultOffsets; @@ -221,64 +221,49 @@ [Test] public void UseDefaultOffsets_SetValidValue_SetsValueAndUpdatesObservers() { - // Setup - var calculation = new MacroStabilityInwardsCalculationScenario(); - // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.UseDefaultOffsets = true, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.UseDefaultOffsets = true); } [Test] public void PhreaticLineOffsetBelowDikeTopAtRiver_SetValidValue_SetsValueAndUpdatesObservers() { - // Setup - var calculation = new MacroStabilityInwardsCalculationScenario(); - // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.PhreaticLineOffsetBelowDikeTopAtRiver = (RoundedDouble) 1, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.PhreaticLineOffsetBelowDikeTopAtRiver = (RoundedDouble) 1); } [Test] public void PhreaticLineOffsetBelowDikeTopAtPolder_SetValidValue_SetsValueAndUpdatesObservers() { - // Setup - var calculation = new MacroStabilityInwardsCalculationScenario(); - // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.PhreaticLineOffsetBelowDikeTopAtPolder = (RoundedDouble) 1, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.PhreaticLineOffsetBelowDikeTopAtPolder = (RoundedDouble) 1); } [Test] public void PhreaticLineOffsetBelowShoulderBaseInside_SetValidValue_SetsValueAndUpdatesObservers() { - // Setup - var calculation = new MacroStabilityInwardsCalculationScenario(); - // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.PhreaticLineOffsetBelowShoulderBaseInside = (RoundedDouble) 1, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.PhreaticLineOffsetBelowShoulderBaseInside = (RoundedDouble) 1); } [Test] public void PhreaticLineOffsetBelowDikeToeAtPolder_SetValidValue_SetsValueAndUpdatesObservers() { - // Setup - var calculation = new MacroStabilityInwardsCalculationScenario(); - // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.PhreaticLineOffsetBelowDikeToeAtPolder = (RoundedDouble) 1, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.PhreaticLineOffsetBelowDikeToeAtPolder = (RoundedDouble) 1); } [Test] [TestCase(true)] [TestCase(false)] - public void DynamicReadOnlyValidationMethod_Always_DependsDrainageConstructionPresent(bool useDefaultOffsets) + public void DynamicReadOnlyValidationMethod_Always_DependsUseDefaultOffsets(bool useDefaultOffsets) { // Setup var mocks = new MockRepository(); var handler = mocks.Stub(); mocks.ReplayAll(); - var input = new MacroStabilityInwardsLocationInputExtreme + var input = new TestMacroStabilityInwardsLocationInput { UseDefaultOffsets = useDefaultOffsets }; @@ -300,7 +285,7 @@ var changeHandler = mocks.Stub(); mocks.ReplayAll(); - var input = new MacroStabilityInwardsLocationInputExtreme(); + var input = new TestMacroStabilityInwardsLocationInput(); var properties = new MacroStabilityInwardsOffsetProperties(input, changeHandler); // Call @@ -310,16 +295,15 @@ Assert.AreEqual(string.Empty, toString); } - private static void SetPropertyAndVerifyNotifcationsForCalculation(Action setProperty, - MacroStabilityInwardsCalculation calculation) + private static void SetPropertyAndVerifyNotificationsForCalculation(Action setProperty) { // Setup var mocks = new MockRepository(); var observable = mocks.StrictMock(); observable.Expect(o => o.NotifyObservers()); mocks.ReplayAll(); - var input = (MacroStabilityInwardsLocationInput) calculation.InputParameters.LocationInputExtreme; + var input = new TestMacroStabilityInwardsLocationInput(); var handler = new SetPropertyValueAfterConfirmationParameterTester(new[] { @@ -335,5 +319,7 @@ Assert.IsTrue(handler.Called); mocks.VerifyAll(); } + + private class TestMacroStabilityInwardsLocationInput : MacroStabilityInwardsLocationInputBase {} } } \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsSlipPlaneSettingsPropertiesTest.cs =================================================================== diff -u -r774ce2424ba4ccab70c6dad6198472977e2a8ace -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsSlipPlaneSettingsPropertiesTest.cs (.../MacroStabilityInwardsSlipPlaneSettingsPropertiesTest.cs) (revision 774ce2424ba4ccab70c6dad6198472977e2a8ace) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsSlipPlaneSettingsPropertiesTest.cs (.../MacroStabilityInwardsSlipPlaneSettingsPropertiesTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -157,7 +157,7 @@ var handler = new ObservablePropertyChangeHandler(calculationItem, input); var properties = new MacroStabilityInwardsSlipPlaneSettingsProperties(input, handler); - var random = new Random(); + var random = new Random(21); bool createZones = random.NextBoolean(); // When Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsWaterStressesPropertiesTest.cs =================================================================== diff -u -r66af8add6f7cc445cbb5347af02ee69235ec63be -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsWaterStressesPropertiesTest.cs (.../MacroStabilityInwardsWaterStressesPropertiesTest.cs) (revision 66af8add6f7cc445cbb5347af02ee69235ec63be) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsWaterStressesPropertiesTest.cs (.../MacroStabilityInwardsWaterStressesPropertiesTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -252,9 +252,9 @@ // Assert Assert.AreEqual(input.WaterLevelRiverAverage, properties.WaterLevelRiverAverage); - Assert.AreEqual(input.LocationInputExtreme, properties.LocationExtreme.Data); - Assert.AreEqual(input.LocationInputDaily, properties.LocationDaily.Data); - Assert.AreEqual(input, properties.WaterStressLines.Data); + Assert.AreSame(input.LocationInputExtreme, properties.LocationExtreme.Data); + Assert.AreSame(input.LocationInputDaily, properties.LocationDaily.Data); + Assert.AreSame(input, properties.WaterStressLines.Data); Assert.AreSame(input, properties.Drainage.Data); Assert.AreEqual(input.MinimumLevelPhreaticLineAtDikeTopRiver, properties.MinimumLevelPhreaticLineAtDikeTopRiver); Assert.AreEqual(input.MinimumLevelPhreaticLineAtDikeTopPolder, properties.MinimumLevelPhreaticLineAtDikeTopPolder); @@ -278,17 +278,17 @@ var handler = new ObservablePropertyChangeHandler(calculationItem, input); var properties = new MacroStabilityInwardsWaterStressesProperties(input, handler); - var random = new Random(); - double waterLevelRiverAverage = random.Next(); - double minimumLevelPhreaticLineAtDikeTopRiver = random.Next(); - double minimumLevelPhreaticLineAtDikeTopPolder = random.Next(); + var random = new Random(21); + double waterLevelRiverAverage = random.NextDouble(); + double minimumLevelPhreaticLineAtDikeTopRiver = random.NextDouble(); + double minimumLevelPhreaticLineAtDikeTopPolder = random.NextDouble(); bool adjustPhreaticLine3And4ForUplift = random.NextBoolean(); - double leakageLengthOutwardsPhreaticLine3 = random.Next(); - double leakageLengthInwardsPhreaticLine3 = random.Next(); - double leakageLengthOutwardsPhreaticLine4 = random.Next(); - double leakageLengthInwardsPhreaticLine4 = random.Next(); - double piezometricHeadPhreaticLine2Outwards = random.Next(); - double piezometricHeadPhreaticLine2Inwards = random.Next(); + double leakageLengthOutwardsPhreaticLine3 = random.NextDouble(); + double leakageLengthInwardsPhreaticLine3 = random.NextDouble(); + double leakageLengthOutwardsPhreaticLine4 = random.NextDouble(); + double leakageLengthInwardsPhreaticLine4 = random.NextDouble(); + double piezometricHeadPhreaticLine2Outwards = random.NextDouble(); + double piezometricHeadPhreaticLine2Inwards = random.NextDouble(); // When properties.WaterLevelRiverAverage = (RoundedDouble) waterLevelRiverAverage; @@ -331,7 +331,7 @@ var calculation = new MacroStabilityInwardsCalculationScenario(); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.WaterLevelRiverAverage = (RoundedDouble) 1, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.WaterLevelRiverAverage = (RoundedDouble) 1, calculation); } [Test] @@ -341,7 +341,7 @@ var calculation = new MacroStabilityInwardsCalculationScenario(); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.MinimumLevelPhreaticLineAtDikeTopRiver = (RoundedDouble) 1, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.MinimumLevelPhreaticLineAtDikeTopRiver = (RoundedDouble) 1, calculation); } [Test] @@ -351,7 +351,7 @@ var calculation = new MacroStabilityInwardsCalculationScenario(); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.MinimumLevelPhreaticLineAtDikeTopPolder = (RoundedDouble) 1, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.MinimumLevelPhreaticLineAtDikeTopPolder = (RoundedDouble) 1, calculation); } [Test] @@ -361,7 +361,7 @@ var calculation = new MacroStabilityInwardsCalculationScenario(); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.AdjustPhreaticLine3And4ForUplift = true, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.AdjustPhreaticLine3And4ForUplift = true, calculation); } [Test] @@ -371,7 +371,7 @@ var calculation = new MacroStabilityInwardsCalculationScenario(); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.LeakageLengthOutwardsPhreaticLine3 = (RoundedDouble) 1, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.LeakageLengthOutwardsPhreaticLine3 = (RoundedDouble) 1, calculation); } [Test] @@ -381,7 +381,7 @@ var calculation = new MacroStabilityInwardsCalculationScenario(); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.LeakageLengthInwardsPhreaticLine3 = (RoundedDouble) 1, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.LeakageLengthInwardsPhreaticLine3 = (RoundedDouble) 1, calculation); } [Test] @@ -391,7 +391,7 @@ var calculation = new MacroStabilityInwardsCalculationScenario(); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.LeakageLengthOutwardsPhreaticLine4 = (RoundedDouble) 1, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.LeakageLengthOutwardsPhreaticLine4 = (RoundedDouble) 1, calculation); } [Test] @@ -401,7 +401,7 @@ var calculation = new MacroStabilityInwardsCalculationScenario(); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.LeakageLengthInwardsPhreaticLine4 = (RoundedDouble) 1, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.LeakageLengthInwardsPhreaticLine4 = (RoundedDouble) 1, calculation); } [Test] @@ -411,7 +411,7 @@ var calculation = new MacroStabilityInwardsCalculationScenario(); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.PiezometricHeadPhreaticLine2Outwards = (RoundedDouble) 1, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.PiezometricHeadPhreaticLine2Outwards = (RoundedDouble) 1, calculation); } [Test] @@ -421,7 +421,7 @@ var calculation = new MacroStabilityInwardsCalculationScenario(); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.PiezometricHeadPhreaticLine2Inwards = (RoundedDouble) 1, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.PiezometricHeadPhreaticLine2Inwards = (RoundedDouble) 1, calculation); } [Test] @@ -442,7 +442,7 @@ Assert.AreEqual(string.Empty, toString); } - private static void SetPropertyAndVerifyNotifcationsForCalculation(Action setProperty, + private static void SetPropertyAndVerifyNotificationsForCalculation(Action setProperty, MacroStabilityInwardsCalculation calculation) { // Setup Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Ringtoets.MacroStabilityInwards.Forms.Test.csproj =================================================================== diff -u -r14c118039f313ea66787d8065daad0aa783b731a -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Ringtoets.MacroStabilityInwards.Forms.Test.csproj (.../Ringtoets.MacroStabilityInwards.Forms.Test.csproj) (revision 14c118039f313ea66787d8065daad0aa783b731a) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Ringtoets.MacroStabilityInwards.Forms.Test.csproj (.../Ringtoets.MacroStabilityInwards.Forms.Test.csproj) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -72,8 +72,8 @@ - - + + @@ -83,7 +83,7 @@ - + Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsCalculationRowTest.cs =================================================================== diff -u -ra20f5008f39cfa4fd6f94572fd07a011f76609f4 -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsCalculationRowTest.cs (.../MacroStabilityInwardsCalculationRowTest.cs) (revision a20f5008f39cfa4fd6f94572fd07a011f76609f4) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsCalculationRowTest.cs (.../MacroStabilityInwardsCalculationRowTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -150,7 +150,7 @@ var calculation = new MacroStabilityInwardsCalculationScenario(); // Call & Assert - SetPropertyAndVerifyNotifcationsAndOutputForCalculation(row => row.StochasticSoilModel = newValue, calculation); + SetPropertyAndVerifyNotificationsAndOutputForCalculation(row => row.StochasticSoilModel = newValue, calculation); } [Test] @@ -185,7 +185,7 @@ var calculation = new MacroStabilityInwardsCalculationScenario(); // Call & Assert - SetPropertyAndVerifyNotifcationsAndOutputForCalculation(row => row.StochasticSoilProfile = newValue, calculation); + SetPropertyAndVerifyNotificationsAndOutputForCalculation(row => row.StochasticSoilProfile = newValue, calculation); } [Test] @@ -220,7 +220,7 @@ var calculation = new MacroStabilityInwardsCalculationScenario(); // Call & Assert - SetPropertyAndVerifyNotifcationsAndOutputForCalculation(row => row.SelectableHydraulicBoundaryLocation = newValue, calculation); + SetPropertyAndVerifyNotificationsAndOutputForCalculation(row => row.SelectableHydraulicBoundaryLocation = newValue, calculation); } [Test] @@ -338,7 +338,7 @@ mocks.VerifyAll(); } - private static void SetPropertyAndVerifyNotifcationsAndOutputForCalculation( + private static void SetPropertyAndVerifyNotificationsAndOutputForCalculation( Action setProperty, MacroStabilityInwardsCalculationScenario calculation) { Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsScenarioRowTest.cs =================================================================== diff -u -r368104385c9f9077cd40a36c692ab78497ed77d7 -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsScenarioRowTest.cs (.../MacroStabilityInwardsScenarioRowTest.cs) (revision 368104385c9f9077cd40a36c692ab78497ed77d7) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsScenarioRowTest.cs (.../MacroStabilityInwardsScenarioRowTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -24,6 +24,7 @@ using Core.Common.Base.Data; using NUnit.Framework; using Rhino.Mocks; +using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.Forms.Helpers; using Ringtoets.MacroStabilityInwards.Data; using Ringtoets.MacroStabilityInwards.Data.TestUtil; @@ -116,7 +117,7 @@ public void Contribution_AlwaysOnChange_NotifyObserverAndCalculationPropertyChanged() { // Setup - int newValue = new Random().Next(0, 100); + int newValue = new Random(21).Next(0, 100); MacroStabilityInwardsCalculationScenario calculation = MacroStabilityInwardsCalculationScenarioFactory.CreateMacroStabilityInwardsCalculationScenarioWithValidInput(); var row = new MacroStabilityInwardsScenarioRow(calculation); @@ -132,7 +133,9 @@ // Assert Assert.AreEqual(1, counter); - Assert.AreEqual(new RoundedDouble(2, newValue), calculation.Contribution * 100); + + Assert.AreEqual(2, calculation.Contribution.NumberOfDecimalPlaces); + Assert.AreEqual(newValue, calculation.Contribution * 100, calculation.Contribution.GetAccuracy()); } } } Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Calculators/UpliftVan/Input/UpliftVanCalculatorInputTest.cs =================================================================== diff -u -r484ac98127f04b1d315c98fdada7bd9f5a004872 -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Calculators/UpliftVan/Input/UpliftVanCalculatorInputTest.cs (.../UpliftVanCalculatorInputTest.cs) (revision 484ac98127f04b1d315c98fdada7bd9f5a004872) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Calculators/UpliftVan/Input/UpliftVanCalculatorInputTest.cs (.../UpliftVanCalculatorInputTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -59,26 +59,27 @@ var waternetCreationMode = random.NextEnumValue(); var plLineCreationMethod = random.NextEnumValue(); var landwardDirection = random.NextEnumValue(); - double waterLevelRiverAverage = random.Next(); - double waterLevelPolderExtreme = random.Next(); - double waterLevelPolderDaily = random.Next(); - double minimumLevelPhreaticLineAtDikeTopRiver = random.Next(); - double minimumLevelPhreaticLineAtDikeTopPolder = random.Next(); - double leakageLengthOutwardsPhreaticLine3 = random.Next(); - double leakageLengthInwardsPhreaticLine3 = random.Next(); - double leakageLengthOutwardsPhreaticLine4 = random.Next(); - double leakageLengthInwardsPhreaticLine4 = random.Next(); - double piezometricHeadPhreaticLine2Outwards = random.Next(); - double piezometricHeadPhreaticLine2Inwards = random.Next(); - double penetrationLength = random.Next(); + double waterLevelRiverAverage = random.NextDouble(); + double waterLevelPolderExtreme = random.NextDouble(); + double waterLevelPolderDaily = random.NextDouble(); + double minimumLevelPhreaticLineAtDikeTopRiver = random.NextDouble(); + double minimumLevelPhreaticLineAtDikeTopPolder = random.NextDouble(); + double leakageLengthOutwardsPhreaticLine3 = random.NextDouble(); + double leakageLengthInwardsPhreaticLine3 = random.NextDouble(); + double leakageLengthOutwardsPhreaticLine4 = random.NextDouble(); + double leakageLengthInwardsPhreaticLine4 = random.NextDouble(); + double piezometricHeadPhreaticLine2Outwards = random.NextDouble(); + double piezometricHeadPhreaticLine2Inwards = random.NextDouble(); + double penetrationLengthExtreme = random.NextDouble(); + double penetrationLengthDaily = random.NextDouble(); bool adjustPhreaticLine3And4ForUplift = random.NextBoolean(); var dikeSoilScenario = random.NextEnumValue(); bool moveGrid = random.NextBoolean(); - double maximumSliceWidth = random.Next(); + double maximumSliceWidth = random.NextDouble(); bool createZones = random.NextBoolean(); bool automaticForbiddenZones = random.NextBoolean(); - double slipPlaneMinDepth = random.Next(); - double slipPlaneMinLength = random.Next(); + double slipPlaneMinDepth = random.NextDouble(); + double slipPlaneMinLength = random.NextDouble(); // Call var input = new UpliftVanCalculatorInput( @@ -105,7 +106,8 @@ LeakageLengthInwardsPhreaticLine4 = leakageLengthInwardsPhreaticLine4, PiezometricHeadPhreaticLine2Outwards = piezometricHeadPhreaticLine2Outwards, PiezometricHeadPhreaticLine2Inwards = piezometricHeadPhreaticLine2Inwards, - PenetrationLength = penetrationLength, + PenetrationLengthExtreme = penetrationLengthExtreme, + PenetrationLengthDaily = penetrationLengthDaily, AdjustPhreaticLine3And4ForUplift = adjustPhreaticLine3And4ForUplift, DikeSoilScenario = dikeSoilScenario, MoveGrid = moveGrid, @@ -139,7 +141,8 @@ Assert.AreEqual(leakageLengthInwardsPhreaticLine4, input.LeakageLengthInwardsPhreaticLine4); Assert.AreEqual(piezometricHeadPhreaticLine2Outwards, input.PiezometricHeadPhreaticLine2Outwards); Assert.AreEqual(piezometricHeadPhreaticLine2Inwards, input.PiezometricHeadPhreaticLine2Inwards); - Assert.AreEqual(penetrationLength, input.PenetrationLength); + Assert.AreEqual(penetrationLengthExtreme, input.PenetrationLengthExtreme); + Assert.AreEqual(penetrationLengthDaily, input.PenetrationLengthDaily); Assert.AreEqual(adjustPhreaticLine3And4ForUplift, input.AdjustPhreaticLine3And4ForUplift); Assert.AreEqual(dikeSoilScenario, input.DikeSoilScenario); @@ -186,7 +189,8 @@ Assert.IsNaN(input.LeakageLengthInwardsPhreaticLine4); Assert.IsNaN(input.PiezometricHeadPhreaticLine2Outwards); Assert.IsNaN(input.PiezometricHeadPhreaticLine2Inwards); - Assert.IsNaN(input.PenetrationLength); + Assert.IsNaN(input.PenetrationLengthDaily); + Assert.IsNaN(input.PenetrationLengthExtreme); Assert.IsNaN(input.MaximumSliceWidth); Assert.IsNaN(input.SlipPlaneMinimumDepth); Assert.IsNaN(input.SlipPlaneMinimumLength); Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Calculators/UpliftVan/UpliftVanCalculatorTest.cs =================================================================== diff -u -rf2838b78c54529e9b15208b44de854f7760e350f -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Calculators/UpliftVan/UpliftVanCalculatorTest.cs (.../UpliftVanCalculatorTest.cs) (revision f2838b78c54529e9b15208b44de854f7760e350f) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Calculators/UpliftVan/UpliftVanCalculatorTest.cs (.../UpliftVanCalculatorTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -28,6 +28,7 @@ using Deltares.WTIStability.Data.Geo; using NUnit.Framework; using Rhino.Mocks; +using Ringtoets.Common.Data; using Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.Input; using Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.UpliftVan; using Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.UpliftVan.Input; @@ -300,30 +301,31 @@ PhreaticLineOffsetsExtreme = new PhreaticLineOffsets(), PhreaticLineOffsetsDaily = new PhreaticLineOffsets(), SlipPlane = new UpliftVanSlipPlane(), - WaterLevelRiverAverage = random.Next(), - WaterLevelPolderExtreme = random.Next(), - WaterLevelPolderDaily = random.Next(), - MinimumLevelPhreaticLineAtDikeTopRiver = random.Next(), - MinimumLevelPhreaticLineAtDikeTopPolder = random.Next(), - LeakageLengthOutwardsPhreaticLine3 = random.Next(), - LeakageLengthInwardsPhreaticLine3 = random.Next(), - LeakageLengthOutwardsPhreaticLine4 = random.Next(), - LeakageLengthInwardsPhreaticLine4 = random.Next(), - PiezometricHeadPhreaticLine2Outwards = random.Next(), - PiezometricHeadPhreaticLine2Inwards = random.Next(), - PenetrationLength = random.Next(), + WaterLevelRiverAverage = random.NextDouble(), + WaterLevelPolderExtreme = random.NextDouble(), + WaterLevelPolderDaily = random.NextDouble(), + MinimumLevelPhreaticLineAtDikeTopRiver = random.NextDouble(), + MinimumLevelPhreaticLineAtDikeTopPolder = random.NextDouble(), + LeakageLengthOutwardsPhreaticLine3 = random.NextDouble(), + LeakageLengthInwardsPhreaticLine3 = random.NextDouble(), + LeakageLengthOutwardsPhreaticLine4 = random.NextDouble(), + LeakageLengthInwardsPhreaticLine4 = random.NextDouble(), + PiezometricHeadPhreaticLine2Outwards = random.NextDouble(), + PiezometricHeadPhreaticLine2Inwards = random.NextDouble(), + PenetrationLengthExtreme = random.NextDouble(), + PenetrationLengthDaily = random.NextDouble(), AdjustPhreaticLine3And4ForUplift = random.NextBoolean(), DikeSoilScenario = random.NextEnumValue(), MoveGrid = random.NextBoolean(), - MaximumSliceWidth = random.Next(), + MaximumSliceWidth = random.NextDouble(), CreateZones = random.NextBoolean(), AutomaticForbiddenZones = random.NextBoolean(), - SlipPlaneMinimumDepth = random.Next(), - SlipPlaneMinimumLength = random.Next() + SlipPlaneMinimumDepth = random.NextDouble(), + SlipPlaneMinimumLength = random.NextDouble() }); } - private static SoilProfile CreateValidSoilProfile(MacroStabilityInwardsSurfaceLine surfaceLine) + private static SoilProfile CreateValidSoilProfile(MechanismSurfaceLineBase surfaceLine) { return new SoilProfile(new[] { Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Creators/Input/UpliftVanStabilityLocationCreatorTest.cs =================================================================== diff -u -rad8a62190c15215b19699c50f51b2dfdf7d23149 -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Creators/Input/UpliftVanStabilityLocationCreatorTest.cs (.../UpliftVanStabilityLocationCreatorTest.cs) (revision ad8a62190c15215b19699c50f51b2dfdf7d23149) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Creators/Input/UpliftVanStabilityLocationCreatorTest.cs (.../UpliftVanStabilityLocationCreatorTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -215,19 +215,19 @@ { // Setup var random = new Random(21); - double assessmentLevel = random.Next(); - double waterLevelRiverAverage = random.Next(); - double waterLevelPolderExtreme = random.Next(); - double minimumLevelPhreaticLineAtDikeTopRiver = random.Next(); - double minimumLevelPhreaticLineAtDikeTopPolder = random.Next(); + double assessmentLevel = random.NextDouble(); + double waterLevelRiverAverage = random.NextDouble(); + double waterLevelPolderExtreme = random.NextDouble(); + double minimumLevelPhreaticLineAtDikeTopRiver = random.NextDouble(); + double minimumLevelPhreaticLineAtDikeTopPolder = random.NextDouble(); bool adjustPhreaticLine3And4ForUplift = random.NextBoolean(); - double leakageLengthOutwardsPhreaticLine3 = random.Next(); - double leakageLengthInwardsPhreaticLine3 = random.Next(); - double leakageLengthOutwardsPhreaticLine4 = random.Next(); - double leakageLengthInwardsPhreaticLine4 = random.Next(); - double piezometricHeadPhreaticLine2Outwards = random.Next(); - double piezometricHeadPhreaticLine2Inwards = random.Next(); - double penetrationLength = random.Next(); + double leakageLengthOutwardsPhreaticLine3 = random.NextDouble(); + double leakageLengthInwardsPhreaticLine3 = random.NextDouble(); + double leakageLengthOutwardsPhreaticLine4 = random.NextDouble(); + double leakageLengthInwardsPhreaticLine4 = random.NextDouble(); + double piezometricHeadPhreaticLine2Outwards = random.NextDouble(); + double piezometricHeadPhreaticLine2Inwards = random.NextDouble(); + double penetrationLengthExtreme = random.NextDouble(); DrainageConstruction drainageConstruction = drainageConstructionPresent ? new DrainageConstruction(random.Next(), random.Next()) @@ -259,7 +259,7 @@ LeakageLengthInwardsPhreaticLine4 = leakageLengthInwardsPhreaticLine4, PiezometricHeadPhreaticLine2Outwards = piezometricHeadPhreaticLine2Outwards, PiezometricHeadPhreaticLine2Inwards = piezometricHeadPhreaticLine2Inwards, - PenetrationLength = penetrationLength + PenetrationLengthExtreme = penetrationLengthExtreme }); // Call @@ -291,7 +291,7 @@ Assert.AreEqual(leakageLengthInwardsPhreaticLine4, location.LeakageLengthInwardsPl4); Assert.AreEqual(piezometricHeadPhreaticLine2Outwards, location.HeadInPlLine2Outwards); Assert.AreEqual(piezometricHeadPhreaticLine2Inwards, location.HeadInPlLine2Inwards); - Assert.AreEqual(penetrationLength, location.PenetrationLength); + Assert.AreEqual(penetrationLengthExtreme, location.PenetrationLength); AssertIrrelevantValues(location); } @@ -471,18 +471,19 @@ { // Setup var random = new Random(21); - double assessmentLevel = random.Next(); - double waterLevelRiverAverage = random.Next(); - double waterLevelPolderDaily = random.Next(); - double minimumLevelPhreaticLineAtDikeTopRiver = random.Next(); - double minimumLevelPhreaticLineAtDikeTopPolder = random.Next(); + double assessmentLevel = random.NextDouble(); + double waterLevelRiverAverage = random.NextDouble(); + double waterLevelPolderDaily = random.NextDouble(); + double minimumLevelPhreaticLineAtDikeTopRiver = random.NextDouble(); + double minimumLevelPhreaticLineAtDikeTopPolder = random.NextDouble(); bool adjustPhreaticLine3And4ForUplift = random.NextBoolean(); - double leakageLengthOutwardsPhreaticLine3 = random.Next(); - double leakageLengthInwardsPhreaticLine3 = random.Next(); - double leakageLengthOutwardsPhreaticLine4 = random.Next(); - double leakageLengthInwardsPhreaticLine4 = random.Next(); - double piezometricHeadPhreaticLine2Outwards = random.Next(); - double piezometricHeadPhreaticLine2Inwards = random.Next(); + double leakageLengthOutwardsPhreaticLine3 = random.NextDouble(); + double leakageLengthInwardsPhreaticLine3 = random.NextDouble(); + double leakageLengthOutwardsPhreaticLine4 = random.NextDouble(); + double leakageLengthInwardsPhreaticLine4 = random.NextDouble(); + double piezometricHeadPhreaticLine2Outwards = random.NextDouble(); + double piezometricHeadPhreaticLine2Inwards = random.NextDouble(); + double penetrationLengthDaily = random.NextDouble(); DrainageConstruction drainageConstruction = drainageConstructionPresent ? new DrainageConstruction(random.Next(), random.Next()) @@ -514,7 +515,7 @@ LeakageLengthInwardsPhreaticLine4 = leakageLengthInwardsPhreaticLine4, PiezometricHeadPhreaticLine2Outwards = piezometricHeadPhreaticLine2Outwards, PiezometricHeadPhreaticLine2Inwards = piezometricHeadPhreaticLine2Inwards, - PenetrationLength = random.Next() + PenetrationLengthDaily = penetrationLengthDaily }); // Call @@ -546,12 +547,12 @@ Assert.AreEqual(leakageLengthInwardsPhreaticLine4, location.LeakageLengthInwardsPl4); Assert.AreEqual(piezometricHeadPhreaticLine2Outwards, location.HeadInPlLine2Outwards); Assert.AreEqual(piezometricHeadPhreaticLine2Inwards, location.HeadInPlLine2Inwards); - Assert.AreEqual(0.0, location.PenetrationLength); + Assert.AreEqual(penetrationLengthDaily, location.PenetrationLength); AssertIrrelevantValues(location); } - private static void AssertIrrelevantValues(StabilityLocation location) + private static void AssertIrrelevantValues(Location location) { Assert.IsNaN(location.WaterLevelRiverLow); // Only for macro stability outwards Assert.AreEqual(0.0, location.X); // Unused property Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/MacroStabilityInwardsCalculationServiceTest.cs =================================================================== diff -u -rb976e43b1c5480a6bcb004c58c307d69ebe9f4a2 -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/MacroStabilityInwardsCalculationServiceTest.cs (.../MacroStabilityInwardsCalculationServiceTest.cs) (revision b976e43b1c5480a6bcb004c58c307d69ebe9f4a2) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/MacroStabilityInwardsCalculationServiceTest.cs (.../MacroStabilityInwardsCalculationServiceTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -37,7 +37,6 @@ using Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.UpliftVan.Input; using Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.UpliftVan.Output; using Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Calculators; -using Ringtoets.MacroStabilityInwards.Primitives; namespace Ringtoets.MacroStabilityInwards.Service.Test { @@ -614,7 +613,8 @@ Assert.AreEqual(originalInput.LeakageLengthInwardsPhreaticLine4, actualInput.LeakageLengthInwardsPhreaticLine4); Assert.AreEqual(originalInput.PiezometricHeadPhreaticLine2Outwards, actualInput.PiezometricHeadPhreaticLine2Outwards); Assert.AreEqual(originalInput.PiezometricHeadPhreaticLine2Inwards, actualInput.PiezometricHeadPhreaticLine2Inwards); - Assert.AreEqual(originalInput.LocationInputExtreme.PenetrationLength, actualInput.PenetrationLength); + Assert.AreEqual(originalInput.LocationInputExtreme.PenetrationLength, actualInput.PenetrationLengthExtreme); + Assert.AreEqual(originalInput.LocationInputDaily.PenetrationLength, actualInput.PenetrationLengthDaily); Assert.AreEqual(originalInput.AdjustPhreaticLine3And4ForUplift, actualInput.AdjustPhreaticLine3And4ForUplift); Assert.AreEqual(originalInput.MoveGrid, actualInput.MoveGrid); Assert.AreEqual(originalInput.MaximumSliceWidth, actualInput.MaximumSliceWidth); Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingFailureMechanismContextPropertiesTest.cs =================================================================== diff -u -r5d16bb16bb6c1de18fc053fa842c6814845bc6b9 -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingFailureMechanismContextPropertiesTest.cs (.../PipingFailureMechanismContextPropertiesTest.cs) (revision 5d16bb16bb6c1de18fc053fa842c6814845bc6b9) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingFailureMechanismContextPropertiesTest.cs (.../PipingFailureMechanismContextPropertiesTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -324,7 +324,7 @@ [TestCase(-0.1)] [TestCase(1.1)] [TestCase(8)] - public void A_SetInvalidValue_ThrowsArgumentOutOfRangeExceptionNoNotifcations(double value) + public void A_SetInvalidValue_ThrowsArgumentOutOfRangeExceptionNoNotifications(double value) { // Setup var failureMechanism = new PipingFailureMechanism(); Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingInputContextPropertiesTest.cs =================================================================== diff -u -r873135f4919536e5d4d6e50e0a838be8b8b00fd4 -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingInputContextPropertiesTest.cs (.../PipingInputContextPropertiesTest.cs) (revision 873135f4919536e5d4d6e50e0a838be8b8b00fd4) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingInputContextPropertiesTest.cs (.../PipingInputContextPropertiesTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -648,7 +648,7 @@ var calculation = new PipingCalculationScenario(new GeneralPipingInput()); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(p => p.SurfaceLine = newSurfaceLine, calculation); + SetPropertyAndVerifyNotificationsForCalculation(p => p.SurfaceLine = newSurfaceLine, calculation); } [Test] @@ -659,7 +659,7 @@ var calculation = new PipingCalculationScenario(new GeneralPipingInput()); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.StochasticSoilModel = newSoilModel, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.StochasticSoilModel = newSoilModel, calculation); } [Test] @@ -670,7 +670,7 @@ var calculation = new PipingCalculationScenario(new GeneralPipingInput()); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.StochasticSoilProfile = newSoilProfile, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.StochasticSoilProfile = newSoilProfile, calculation); } [Test] @@ -687,7 +687,7 @@ }; // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.AssessmentLevel = newAssessmentLevel, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.AssessmentLevel = newAssessmentLevel, calculation); } [Test] @@ -698,7 +698,7 @@ var calculation = new PipingCalculationScenario(new GeneralPipingInput()); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.DampingFactorExit.Mean = mean, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.DampingFactorExit.Mean = mean, calculation); } [Test] @@ -709,7 +709,7 @@ var calculation = new PipingCalculationScenario(new GeneralPipingInput()); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.DampingFactorExit.StandardDeviation = standardDeviation, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.DampingFactorExit.StandardDeviation = standardDeviation, calculation); } [Test] @@ -720,7 +720,7 @@ var calculation = new PipingCalculationScenario(new GeneralPipingInput()); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.PhreaticLevelExit.Mean = mean, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.PhreaticLevelExit.Mean = mean, calculation); } [Test] @@ -731,7 +731,7 @@ var calculation = new PipingCalculationScenario(new GeneralPipingInput()); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.PhreaticLevelExit.StandardDeviation = standardDeviation, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.PhreaticLevelExit.StandardDeviation = standardDeviation, calculation); } [Test] @@ -742,7 +742,7 @@ var calculation = new PipingCalculationScenario(new GeneralPipingInput()); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.EntryPointL = newEntryPointL, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.EntryPointL = newEntryPointL, calculation); } [Test] @@ -753,7 +753,7 @@ var calculation = new PipingCalculationScenario(new GeneralPipingInput()); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.ExitPointL = newExitPointL, calculation); + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.ExitPointL = newExitPointL, calculation); } [Test] @@ -763,7 +763,7 @@ var calculation = new PipingCalculationScenario(new GeneralPipingInput()); // Call & Assert - SetPropertyAndVerifyNotifcationsForCalculation(properties => properties.UseAssessmentLevelManualInput = true, + SetPropertyAndVerifyNotificationsForCalculation(properties => properties.UseAssessmentLevelManualInput = true, calculation); } @@ -2006,7 +2006,7 @@ Assert.IsFalse(result); } - private static void SetPropertyAndVerifyNotifcationsForCalculation( + private static void SetPropertyAndVerifyNotificationsForCalculation( Action setProperty, PipingCalculationScenario calculation) { Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingCalculationRowTest.cs =================================================================== diff -u -r3fe99efe7580ec1d9eb850908c001c990dc43fe5 -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingCalculationRowTest.cs (.../PipingCalculationRowTest.cs) (revision 3fe99efe7580ec1d9eb850908c001c990dc43fe5) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingCalculationRowTest.cs (.../PipingCalculationRowTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -155,7 +155,7 @@ var calculation = new PipingCalculationScenario(new GeneralPipingInput()); // Call & Assert - SetPropertyAndVerifyNotifcationsAndOutputForCalculation(row => row.StochasticSoilModel = newValue, calculation); + SetPropertyAndVerifyNotificationsAndOutputForCalculation(row => row.StochasticSoilModel = newValue, calculation); } [Test] @@ -189,7 +189,7 @@ var calculation = new PipingCalculationScenario(new GeneralPipingInput()); // Call & Assert - SetPropertyAndVerifyNotifcationsAndOutputForCalculation(row => row.StochasticSoilProfile = newValue, calculation); + SetPropertyAndVerifyNotificationsAndOutputForCalculation(row => row.StochasticSoilProfile = newValue, calculation); } [Test] @@ -224,7 +224,7 @@ var calculation = new PipingCalculationScenario(new GeneralPipingInput()); // Call & Assert - SetPropertyAndVerifyNotifcationsAndOutputForCalculation(row => row.SelectableHydraulicBoundaryLocation = newValue, calculation); + SetPropertyAndVerifyNotificationsAndOutputForCalculation(row => row.SelectableHydraulicBoundaryLocation = newValue, calculation); } [Test] @@ -256,7 +256,7 @@ var dampingFactorExitMean = (RoundedDouble) 2.3; // Call & Assert - SetPropertyAndVerifyNotifcationsAndOutputForCalculation(row => row.DampingFactorExitMean = dampingFactorExitMean, calculation); + SetPropertyAndVerifyNotificationsAndOutputForCalculation(row => row.DampingFactorExitMean = dampingFactorExitMean, calculation); } [Test] @@ -288,7 +288,7 @@ var phreaticLevelExitMean = (RoundedDouble) 5.1; // Call & Assert - SetPropertyAndVerifyNotifcationsAndOutputForCalculation(row => row.PhreaticLevelExitMean = phreaticLevelExitMean, calculation); + SetPropertyAndVerifyNotificationsAndOutputForCalculation(row => row.PhreaticLevelExitMean = phreaticLevelExitMean, calculation); } [Test] @@ -320,7 +320,7 @@ var entryPointL = (RoundedDouble) 0.1; // Call & Assert - SetPropertyAndVerifyNotifcationsAndOutputForCalculation(row => row.EntryPointL = entryPointL, calculation); + SetPropertyAndVerifyNotificationsAndOutputForCalculation(row => row.EntryPointL = entryPointL, calculation); } [Test] @@ -381,7 +381,7 @@ var exitPointL = (RoundedDouble) 0.3; // Call & Assert - SetPropertyAndVerifyNotifcationsAndOutputForCalculation(row => row.ExitPointL = exitPointL, calculation); + SetPropertyAndVerifyNotificationsAndOutputForCalculation(row => row.ExitPointL = exitPointL, calculation); } [Test] @@ -528,7 +528,7 @@ mocks.VerifyAll(); } - private static void SetPropertyAndVerifyNotifcationsAndOutputForCalculation( + private static void SetPropertyAndVerifyNotificationsAndOutputForCalculation( Action setProperty, PipingCalculationScenario calculation) { Index: Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/PropertyClasses/WaveConditionsInputContextPropertiesTest.cs =================================================================== diff -u -rbcdabbbbd7fae323c339fdabc8bcb390962ccbcc -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/PropertyClasses/WaveConditionsInputContextPropertiesTest.cs (.../WaveConditionsInputContextPropertiesTest.cs) (revision bcdabbbbd7fae323c339fdabc8bcb390962ccbcc) +++ Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/PropertyClasses/WaveConditionsInputContextPropertiesTest.cs (.../WaveConditionsInputContextPropertiesTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -327,79 +327,79 @@ { var propertiesSelectedHydraulicBoundaryLocation = new SelectableHydraulicBoundaryLocation( new TestHydraulicBoundaryLocation(), new Point2D(0, 0)); - SetPropertyAndVerifyNotifcationsAndOutputForCalculation( + SetPropertyAndVerifyNotificationsAndOutputForCalculation( properties => properties.SelectedHydraulicBoundaryLocation = propertiesSelectedHydraulicBoundaryLocation); } [Test] public void ForeshoreProfile_Always_InputChangedAndObservablesNotified() { var foreshoreProfile = new TestForeshoreProfile(); - SetPropertyAndVerifyNotifcationsAndOutputForCalculation( + SetPropertyAndVerifyNotificationsAndOutputForCalculation( properties => properties.ForeshoreProfile = foreshoreProfile); } [Test] public void LowerBoundaryRevetment_Always_InputChangedAndObservablesNotified() { RoundedDouble lowerBoundaryRevetment = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutputForCalculation( + SetPropertyAndVerifyNotificationsAndOutputForCalculation( properties => properties.LowerBoundaryRevetment = lowerBoundaryRevetment); } [Test] public void UpperBoundaryRevetment_Always_InputChangedAndObservablesNotified() { RoundedDouble upperBoundaryRevetment = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutputForCalculation( + SetPropertyAndVerifyNotificationsAndOutputForCalculation( properties => properties.UpperBoundaryRevetment = upperBoundaryRevetment); } [Test] public void LowerBoundaryWaterLevels_Always_InputChangedAndObservablesNotified() { RoundedDouble lowerBoundaryWaterLevels = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutputForCalculation( + SetPropertyAndVerifyNotificationsAndOutputForCalculation( properties => properties.LowerBoundaryWaterLevels = lowerBoundaryWaterLevels); } [Test] public void UpperBoundaryWaterLevels_Always_InputChangedAndObservablesNotified() { RoundedDouble upperBoundaryWaterLevels = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutputForCalculation( + SetPropertyAndVerifyNotificationsAndOutputForCalculation( properties => properties.UpperBoundaryWaterLevels = upperBoundaryWaterLevels); } [Test] public void StepSize_Always_InputChangedAndObservablesNotified() { var waveConditionsInputStepSize = new Random(21).NextEnumValue(); - SetPropertyAndVerifyNotifcationsAndOutputForCalculation( + SetPropertyAndVerifyNotificationsAndOutputForCalculation( properties => properties.StepSize = waveConditionsInputStepSize); } [Test] public void Orientation_Always_InputChangedAndObservablesNotified() { RoundedDouble upperBoundaryDesignWaterLevel = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutputForCalculation( + SetPropertyAndVerifyNotificationsAndOutputForCalculation( properties => properties.Orientation = upperBoundaryDesignWaterLevel); } [Test] public void UseBreakWater_Always_InputChangedAndObservablesNotified() { bool breakWaterUseBreakWater = new Random(21).NextBoolean(); - SetPropertyAndVerifyNotifcationsAndOutputForCalculation( + SetPropertyAndVerifyNotificationsAndOutputForCalculation( properties => properties.BreakWater.UseBreakWater = breakWaterUseBreakWater); } [Test] public void UseForeshore_Always_InputChangedAndObservablesNotified() { bool foreshoreGeometryUseForeshore = new Random(21).NextBoolean(); - SetPropertyAndVerifyNotifcationsAndOutputForCalculation( + SetPropertyAndVerifyNotificationsAndOutputForCalculation( properties => properties.ForeshoreGeometry.UseForeshore = foreshoreGeometryUseForeshore); } @@ -641,7 +641,7 @@ Assert.AreSame(locations, availableForeshoreProfiles); } - private void SetPropertyAndVerifyNotifcationsAndOutputForCalculation(Action setProperty) + private void SetPropertyAndVerifyNotificationsAndOutputForCalculation(Action setProperty) { // Setup var mocks = new MockRepository(); Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PropertyClasses/StabilityPointStructuresFailureMechanismPropertiesTest.cs =================================================================== diff -u -r1bbf51443c907b5f202e80764fa05f2e7f842c04 -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PropertyClasses/StabilityPointStructuresFailureMechanismPropertiesTest.cs (.../StabilityPointStructuresFailureMechanismPropertiesTest.cs) (revision 1bbf51443c907b5f202e80764fa05f2e7f842c04) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PropertyClasses/StabilityPointStructuresFailureMechanismPropertiesTest.cs (.../StabilityPointStructuresFailureMechanismPropertiesTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -257,7 +257,7 @@ [TestCase(0)] [TestCase(-1)] [TestCase(-20)] - public void LengthEffect_InvalidValue_ThrowsArgumentOutOfRangeExceptionNoNotifcations(int value) + public void LengthEffect_InvalidValue_ThrowsArgumentOutOfRangeExceptionNoNotifications(int value) { // Setup var mockRepository = new MockRepository(); Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PropertyClasses/StabilityPointStructuresInputContextPropertiesTest.cs =================================================================== diff -u -r2d104a54ab378eea92fd946b40cff2bd79ca39b0 -rd485f27eb5a6d688406882dce60c3229e22f2ac2 --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PropertyClasses/StabilityPointStructuresInputContextPropertiesTest.cs (.../StabilityPointStructuresInputContextPropertiesTest.cs) (revision 2d104a54ab378eea92fd946b40cff2bd79ca39b0) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PropertyClasses/StabilityPointStructuresInputContextPropertiesTest.cs (.../StabilityPointStructuresInputContextPropertiesTest.cs) (revision d485f27eb5a6d688406882dce60c3229e22f2ac2) @@ -1236,207 +1236,207 @@ public void VolumicWeightWater_WithOrWithoutOutput_HasOutputFalseInputNotifiedAndCalculationNotifiedWhenHadOutput() { RoundedDouble height = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.VolumicWeightWater = height); } [Test] public void FactorStormDurationOpenStructure_WithOrWithoutOutput_HasOutputFalseInputNotifiedAndCalculationNotifiedWhenHadOutput() { RoundedDouble factor = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.FactorStormDurationOpenStructure = factor); } [Test] public void InflowModelType_WithOrWithoutOutput_HasOutputFalseInputNotifiedAndCalculationNotifiedWhenHadOutput() { var type = new Random(21).NextEnumValue(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.InflowModelType = type); } [Test] public void FailureProbabilityOpenStructure_WithOrWithoutOutput_HasOutputFalseInputNotifiedAndCalculationNotifiedWhenHadOutput() { var type = new Random(21).NextEnumValue(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.LoadSchematizationType = type); } [Test] public void FailureProbabilityRepairClosure_WithOrWithoutOutput_HasOutputFalseInputNotifiedAndCalculationNotifiedWhenHadOutput() { var random = new Random(21); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.FailureProbabilityRepairClosure = random.NextDouble()); } [Test] public void LevellingCount_WithOrWithoutOutput_HasOutputFalseInputNotifiedAndCalculationNotifiedWhenHadOutput() { int count = new Random(21).Next(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.LevellingCount = count); } [Test] public void ProbabilityCollisionSecondaryStructure_WithOrWithoutOutput_HasOutputFalseInputNotifiedAndCalculationNotifiedWhenHadOutput() { var random = new Random(21); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.ProbabilityCollisionSecondaryStructure = random.NextDouble()); } [Test] public void EvaluationLevel_WithOrWithoutOutput_HasOutputFalseInputNotifiedAndCalculationNotifiedWhenHadOutput() { RoundedDouble evaluationLevel = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.EvaluationLevel = evaluationLevel); } [Test] public void VerticalDistance_WithOrWithoutOutput_HasOutputFalseInputNotifiedAndCalculationNotifiedWhenHadOutput() { RoundedDouble verticalDistance = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.VerticalDistance = verticalDistance); } [Test] public void ModelFactorSuperCriticalFlow_MeanChanged_InputChangedAndObservablesNotified() { RoundedDouble newMean = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.ModelFactorSuperCriticalFlow.Mean = newMean); } [Test] public void WidthFlowApertures_MeanChanged_InputChangedAndObservablesNotified() { RoundedDouble newMean = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.WidthFlowApertures.Mean = newMean); } [Test] public void InsideWaterLevelFailureConstruction_MeanChanged_InputChangedAndObservablesNotified() { RoundedDouble newMean = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.InsideWaterLevelFailureConstruction.Mean = newMean); } [Test] public void InsideWaterLevel_MeanChanged_InputChangedAndObservablesNotified() { RoundedDouble newMean = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.InsideWaterLevel.Mean = newMean); } [Test] public void DrainCoefficient_MeanChanged_InputChangedAndObservablesNotified() { RoundedDouble newMean = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.DrainCoefficient.Mean = newMean); } [Test] public void LevelCrestStructure_MeanChanged_InputChangedAndObservablesNotified() { RoundedDouble newMean = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.LevelCrestStructure.Mean = newMean); } [Test] public void ThresholdHeightOpenWeir_MeanChanged_InputChangedAndObservablesNotified() { RoundedDouble newMean = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.ThresholdHeightOpenWeir.Mean = newMean); } [Test] public void FlowVelocityStructureClosable_MeanChanged_InputChangedAndObservablesNotified() { RoundedDouble newMean = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.FlowVelocityStructureClosable.Mean = newMean); } [Test] public void AreaFlowApertures_MeanChanged_InputChangedAndObservablesNotified() { RoundedDouble newMean = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.AreaFlowApertures.Mean = newMean); } [Test] public void ConstructiveStrengthLinearLoadModel_MeanChanged_InputChangedAndObservablesNotified() { RoundedDouble newMean = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.ConstructiveStrengthLinearLoadModel.Mean = newMean); } [Test] public void ConstructiveStrengthQuadraticLoadModel_MeanChanged_InputChangedAndObservablesNotified() { RoundedDouble newMean = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.ConstructiveStrengthQuadraticLoadModel.Mean = newMean); } [Test] public void StabilityLinearLoadModel_MeanChanged_InputChangedAndObservablesNotified() { RoundedDouble newMean = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.StabilityLinearLoadModel.Mean = newMean); } [Test] public void StabilityQuadraticLoadModel_MeanChanged_InputChangedAndObservablesNotified() { RoundedDouble newMean = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.StabilityQuadraticLoadModel.Mean = newMean); } [Test] public void FailureCollisionEnergy_MeanChanged_InputChangedAndObservablesNotified() { RoundedDouble newMean = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.FailureCollisionEnergy.Mean = newMean); } [Test] public void ShipMass_MeanChanged_InputChangedAndObservablesNotified() { RoundedDouble newMean = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.ShipMass.Mean = newMean); } [Test] public void ShipVelocity_MeanChanged_InputChangedAndObservablesNotified() { RoundedDouble newMean = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.ShipVelocity.Mean = newMean); } [Test] public void BankWidth_MeanChanged_InputChangedAndObservablesNotified() { RoundedDouble newMean = new Random(21).NextRoundedDouble(); - SetPropertyAndVerifyNotifcationsAndOutput( + SetPropertyAndVerifyNotificationsAndOutput( properties => properties.BankWidth.Mean = newMean); } @@ -1628,7 +1628,7 @@ Assert.IsTrue(properties.DynamicVisibleValidationMethod(null)); } - private void SetPropertyAndVerifyNotifcationsAndOutput(Action setProperty) + private void SetPropertyAndVerifyNotificationsAndOutput(Action setProperty) { // Setup var observable = mockRepository.StrictMock();