Index: Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/PropertyClasses/WaveConditionsInputContextProperties.cs =================================================================== diff -u -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e -rc238c8de03e71e09a71c68b6f28fb057ef8a1c4d --- Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/PropertyClasses/WaveConditionsInputContextProperties.cs (.../WaveConditionsInputContextProperties.cs) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e) +++ Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/PropertyClasses/WaveConditionsInputContextProperties.cs (.../WaveConditionsInputContextProperties.cs) (revision c238c8de03e71e09a71c68b6f28fb057ef8a1c4d) @@ -255,24 +255,6 @@ [ResourcesDescription(typeof(Resources), "WaveConditionsInput_RevetmentType_Description")] public abstract string RevetmentType { get; } - [PropertyOrder(hydraulicBoundaryLocationPropertyIndex)] - [Editor(typeof(HydraulicBoundaryLocationEditor), typeof(UITypeEditor))] - [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_HydraulicData")] - [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), "HydraulicBoundaryLocation_DisplayName")] - [ResourcesDescription(typeof(RingtoetsCommonFormsResources), "HydraulicBoundaryLocation_Description")] - public virtual HydraulicBoundaryLocation HydraulicBoundaryLocation - { - get - { - return data.WrappedData.HydraulicBoundaryLocation; - } - set - { - data.WrappedData.HydraulicBoundaryLocation = value; - data.WrappedData.NotifyObservers(); - } - } - [PropertyOrder(foreshoreProfilePropertyIndex)] [Editor(typeof(ForeshoreProfileEditor), typeof(UITypeEditor))] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_Schematization")] @@ -291,14 +273,32 @@ } } - public virtual IEnumerable GetAvailableHydraulicBoundaryLocations() + [PropertyOrder(hydraulicBoundaryLocationPropertyIndex)] + [Editor(typeof(HydraulicBoundaryLocationEditor), typeof(UITypeEditor))] + [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_HydraulicData")] + [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), "HydraulicBoundaryLocation_DisplayName")] + [ResourcesDescription(typeof(RingtoetsCommonFormsResources), "HydraulicBoundaryLocation_Description")] + public virtual HydraulicBoundaryLocation HydraulicBoundaryLocation { - return data.HydraulicBoundaryLocations; + get + { + return data.WrappedData.HydraulicBoundaryLocation; + } + set + { + data.WrappedData.HydraulicBoundaryLocation = value; + data.WrappedData.NotifyObservers(); + } } public virtual IEnumerable GetAvailableForeshoreProfiles() { return data.ForeshoreProfiles; } + + public virtual IEnumerable GetAvailableHydraulicBoundaryLocations() + { + return data.HydraulicBoundaryLocations; + } } } \ No newline at end of file Index: Ringtoets/Revetment/src/Ringtoets.Revetment.Service/WaveConditionsCalculationServiceBase.cs =================================================================== diff -u -re07044ef611f4a005447703ffba9f24b7c5acb90 -rc238c8de03e71e09a71c68b6f28fb057ef8a1c4d --- Ringtoets/Revetment/src/Ringtoets.Revetment.Service/WaveConditionsCalculationServiceBase.cs (.../WaveConditionsCalculationServiceBase.cs) (revision e07044ef611f4a005447703ffba9f24b7c5acb90) +++ Ringtoets/Revetment/src/Ringtoets.Revetment.Service/WaveConditionsCalculationServiceBase.cs (.../WaveConditionsCalculationServiceBase.cs) (revision c238c8de03e71e09a71c68b6f28fb057ef8a1c4d) @@ -30,7 +30,6 @@ using Ringtoets.Common.Service; using Ringtoets.HydraRing.Calculation.Calculator; using Ringtoets.HydraRing.Calculation.Calculator.Factory; -using Ringtoets.HydraRing.Calculation.Data; using Ringtoets.HydraRing.Calculation.Data.Input.WaveConditions; using Ringtoets.HydraRing.Calculation.Parsers; using Ringtoets.HydraRing.IO; Index: Ringtoets/Revetment/test/Ringtoets.Revetment.Service.Test/WaveConditionsCalculationServiceBaseTest.cs =================================================================== diff -u -re07044ef611f4a005447703ffba9f24b7c5acb90 -rc238c8de03e71e09a71c68b6f28fb057ef8a1c4d --- Ringtoets/Revetment/test/Ringtoets.Revetment.Service.Test/WaveConditionsCalculationServiceBaseTest.cs (.../WaveConditionsCalculationServiceBaseTest.cs) (revision e07044ef611f4a005447703ffba9f24b7c5acb90) +++ Ringtoets/Revetment/test/Ringtoets.Revetment.Service.Test/WaveConditionsCalculationServiceBaseTest.cs (.../WaveConditionsCalculationServiceBaseTest.cs) (revision c238c8de03e71e09a71c68b6f28fb057ef8a1c4d) @@ -59,9 +59,9 @@ // Call TestDelegate action = () => new WaveConditionsCalculationService().PublicValidateWaveConditionsInput(input, - name, - dbFilePath, - null); + name, + dbFilePath, + null); // Assert var exception = Assert.Throws(action); @@ -100,10 +100,7 @@ var dbFilePath = Path.Combine(testDataPath, "NonExisting.sqlite"); // Call - Action action = () => - { - isValid = new WaveConditionsCalculationService().PublicValidateWaveConditionsInput(null, name, dbFilePath, string.Empty); - }; + Action action = () => isValid = new WaveConditionsCalculationService().PublicValidateWaveConditionsInput(null, name, dbFilePath, string.Empty); // Assert TestHelper.AssertLogMessages(action, messages => @@ -129,10 +126,7 @@ var dbFilePath = Path.Combine(testDataPath, "HRD ijsselmeer.sqlite"); // Call - Action action = () => - { - isValid = new WaveConditionsCalculationService().PublicValidateWaveConditionsInput(input, name, dbFilePath, string.Empty); - }; + Action action = () => isValid = new WaveConditionsCalculationService().PublicValidateWaveConditionsInput(input, name, dbFilePath, string.Empty); // Assert TestHelper.AssertLogMessages(action, messages => @@ -164,9 +158,9 @@ // Call Action action = () => isValid = new WaveConditionsCalculationService().PublicValidateWaveConditionsInput(input, - name, - dbFilePath, - designWaterLevelName); + name, + dbFilePath, + designWaterLevelName); // Assert string expectedMessage = string.Format("Validatie mislukt: Kan {0} niet afleiden op basis van de invoer", @@ -212,9 +206,9 @@ // Call Action action = () => isValid = new WaveConditionsCalculationService().PublicValidateWaveConditionsInput(input, - name, - dbFilePath, - "DesignWaterLevelName"); + name, + dbFilePath, + "DesignWaterLevelName"); // Assert TestHelper.AssertLogMessages(action, messages => @@ -247,9 +241,9 @@ // Call Action action = () => isValid = new WaveConditionsCalculationService().PublicValidateWaveConditionsInput(input, - name, - dbFilePath, - "DesignWaterLevelName"); + name, + dbFilePath, + "DesignWaterLevelName"); // Assert TestHelper.AssertLogMessages(action, messages => @@ -282,9 +276,9 @@ // Call Action action = () => isValid = new WaveConditionsCalculationService().PublicValidateWaveConditionsInput(input, - name, - dbFilePath, - "DesignWaterLevelName"); + name, + dbFilePath, + "DesignWaterLevelName"); // Assert TestHelper.AssertLogMessages(action, messages => @@ -330,9 +324,9 @@ // Call Action action = () => isValid = new WaveConditionsCalculationService().PublicValidateWaveConditionsInput(input, - name, - dbFilePath, - "DesignWaterLevelName"); + name, + dbFilePath, + "DesignWaterLevelName"); // Assert TestHelper.AssertLogMessages(action, messages => @@ -354,9 +348,9 @@ { // Setup RoundedDouble waterLevel = (RoundedDouble) 4.20; - RoundedDouble a = (RoundedDouble)1.0; - RoundedDouble b = (RoundedDouble)0.8; - RoundedDouble c = (RoundedDouble)0.4; + RoundedDouble a = (RoundedDouble) 1.0; + RoundedDouble b = (RoundedDouble) 0.8; + RoundedDouble c = (RoundedDouble) 0.4; int norm = 5; var input = new WaveConditionsInput { @@ -409,9 +403,9 @@ // Call Action action = () => isValid = new WaveConditionsCalculationService().PublicValidateWaveConditionsInput(input, - name, - dbFilePath, - "DesignWaterLevelName"); + name, + dbFilePath, + "DesignWaterLevelName"); // Assert TestHelper.AssertLogMessages(action, messages => @@ -431,9 +425,9 @@ { // Setup var waterLevel = new RoundedDouble(2, 4.00); - var a = (RoundedDouble)1.0; - var b = (RoundedDouble)0.8; - var c = (RoundedDouble)0.4; + var a = (RoundedDouble) 1.0; + var b = (RoundedDouble) 0.8; + var c = (RoundedDouble) 0.4; int norm = 5; var input = new WaveConditionsInput { @@ -453,7 +447,7 @@ using (new HydraRingCalculatorFactoryConfig()) { - var testCalculator = ((TestHydraRingCalculatorFactory)HydraRingCalculatorFactory.Instance).WaveConditionsCosineCalculator; + var testCalculator = ((TestHydraRingCalculatorFactory) HydraRingCalculatorFactory.Instance).WaveConditionsCosineCalculator; testCalculator.EndInFailure = true; // Call @@ -487,19 +481,19 @@ { // Setup var waterLevel = new RoundedDouble(2, 4.00); - var a = (RoundedDouble)1.0; - var b = (RoundedDouble)0.8; - var c = (RoundedDouble)0.4; + var a = (RoundedDouble) 1.0; + var b = (RoundedDouble) 0.8; + var c = (RoundedDouble) 0.4; int norm = 5; var input = new WaveConditionsInput { HydraulicBoundaryLocation = new HydraulicBoundaryLocation(1, string.Empty, 0, 0) { - DesignWaterLevel = (RoundedDouble)4.2 + DesignWaterLevel = (RoundedDouble) 4.2 }, ForeshoreProfile = new TestForeshoreProfile(), UpperBoundaryRevetment = waterLevel, - LowerBoundaryRevetment = (RoundedDouble)3 + LowerBoundaryRevetment = (RoundedDouble) 3 }; string hlcdDirectory = "C:/temp"; @@ -508,7 +502,7 @@ using (new HydraRingCalculatorFactoryConfig()) { - var testCalculator = ((TestHydraRingCalculatorFactory)HydraRingCalculatorFactory.Instance).WaveConditionsCosineCalculator; + var testCalculator = ((TestHydraRingCalculatorFactory) HydraRingCalculatorFactory.Instance).WaveConditionsCosineCalculator; var service = new WaveConditionsCalculationService(); testCalculator.CalculationFinishedHandler += (s, e) => service.Cancel(); @@ -535,7 +529,7 @@ UpperBoundaryRevetment = (RoundedDouble) 10.0, StepSize = WaveConditionsInputStepSize.One, LowerBoundaryWaterLevels = (RoundedDouble) 1.0, - UpperBoundaryWaterLevels = (RoundedDouble) 10.0, + UpperBoundaryWaterLevels = (RoundedDouble) 10.0, Orientation = (RoundedDouble) 0 }; return input; Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Data/LoadSchematizationType.cs =================================================================== diff -u -rdb80505bcfa73bd0d51e41d82ec4ab9c37c3ecbd -rc238c8de03e71e09a71c68b6f28fb057ef8a1c4d --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Data/LoadSchematizationType.cs (.../LoadSchematizationType.cs) (revision db80505bcfa73bd0d51e41d82ec4ab9c37c3ecbd) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Data/LoadSchematizationType.cs (.../LoadSchematizationType.cs) (revision c238c8de03e71e09a71c68b6f28fb057ef8a1c4d) @@ -42,4 +42,4 @@ [ResourcesDisplayName(typeof(Resources), "LoadSchematizationType_Quadratic_DisplayName")] Quadratic = 2 } -} +} \ No newline at end of file Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Data/StabilityPointStructureInflowModelType.cs =================================================================== diff -u -r749f4e50391ac399e02cb497966ae7d749d5fd1e -rc238c8de03e71e09a71c68b6f28fb057ef8a1c4d --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Data/StabilityPointStructureInflowModelType.cs (.../StabilityPointStructureInflowModelType.cs) (revision 749f4e50391ac399e02cb497966ae7d749d5fd1e) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Data/StabilityPointStructureInflowModelType.cs (.../StabilityPointStructureInflowModelType.cs) (revision c238c8de03e71e09a71c68b6f28fb057ef8a1c4d) @@ -41,4 +41,4 @@ [ResourcesDisplayName(typeof(RingtoetsCommonDataResources), "StructureInflowModelType_FloodedCulvert_DisplayName")] FloodedCulvert = 2 } -} +} \ No newline at end of file Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PresentationObjects/StabilityPointStructuresContext.cs =================================================================== diff -u -rc7cb9812ba255ba88d28b65f1a146dcf7454f63d -rc238c8de03e71e09a71c68b6f28fb057ef8a1c4d --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PresentationObjects/StabilityPointStructuresContext.cs (.../StabilityPointStructuresContext.cs) (revision c7cb9812ba255ba88d28b65f1a146dcf7454f63d) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PresentationObjects/StabilityPointStructuresContext.cs (.../StabilityPointStructuresContext.cs) (revision c238c8de03e71e09a71c68b6f28fb057ef8a1c4d) @@ -54,4 +54,4 @@ /// public IAssessmentSection AssessmentSection { get; private set; } } -} +} \ No newline at end of file Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PropertyClasses/StabilityPointStructuresInputContextProperties.cs =================================================================== diff -u -rdb80505bcfa73bd0d51e41d82ec4ab9c37c3ecbd -rc238c8de03e71e09a71c68b6f28fb057ef8a1c4d --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PropertyClasses/StabilityPointStructuresInputContextProperties.cs (.../StabilityPointStructuresInputContextProperties.cs) (revision db80505bcfa73bd0d51e41d82ec4ab9c37c3ecbd) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PropertyClasses/StabilityPointStructuresInputContextProperties.cs (.../StabilityPointStructuresInputContextProperties.cs) (revision c238c8de03e71e09a71c68b6f28fb057ef8a1c4d) @@ -109,6 +109,56 @@ StormDurationPropertyIndex = stormDurationPropertyIndex }) {} + [DynamicVisibleValidationMethod] + public bool DynamicVisibleValidationMethod(string propertyName) + { + // Note: A default initialized calculation doesn't have InflowModelType initialized to any of these 2 values. + if (data.WrappedData.InflowModelType == StabilityPointStructureInflowModelType.FloodedCulvert || + data.WrappedData.InflowModelType == StabilityPointStructureInflowModelType.LowSill) + { + if (propertyName == TypeUtils.GetMemberName(p => p.ModelFactorSuperCriticalFlow)) + { + return data.WrappedData.InflowModelType == StabilityPointStructureInflowModelType.LowSill; + } + if (propertyName == TypeUtils.GetMemberName(p => p.DrainCoefficient)) + { + return data.WrappedData.InflowModelType == StabilityPointStructureInflowModelType.FloodedCulvert; + } + if (propertyName == TypeUtils.GetMemberName(p => p.AreaFlowApertures)) + { + return data.WrappedData.InflowModelType == StabilityPointStructureInflowModelType.FloodedCulvert; + } + if (propertyName == TypeUtils.GetMemberName(p => p.WidthFlowApertures)) + { + return data.WrappedData.InflowModelType == StabilityPointStructureInflowModelType.LowSill; + } + } + + // Note: A default initialized calculation doesn't have LoadSchematizationType initialized to any of these 2 values. + if (data.WrappedData.LoadSchematizationType == LoadSchematizationType.Linear || + data.WrappedData.LoadSchematizationType == LoadSchematizationType.Quadratic) + { + if (propertyName == TypeUtils.GetMemberName(p => p.ConstructiveStrengthLinearLoadModel)) + { + return data.WrappedData.LoadSchematizationType == LoadSchematizationType.Linear; + } + if (propertyName == TypeUtils.GetMemberName(p => p.ConstructiveStrengthQuadraticLoadModel)) + { + return data.WrappedData.LoadSchematizationType == LoadSchematizationType.Quadratic; + } + if (propertyName == TypeUtils.GetMemberName(p => p.StabilityLinearLoadModel)) + { + return data.WrappedData.LoadSchematizationType == LoadSchematizationType.Linear; + } + if (propertyName == TypeUtils.GetMemberName(p => p.StabilityQuadraticLoadModel)) + { + return data.WrappedData.LoadSchematizationType == LoadSchematizationType.Quadratic; + } + } + + return true; + } + public override IEnumerable GetAvailableForeshoreProfiles() { return data.FailureMechanism.ForeshoreProfiles; @@ -552,55 +602,5 @@ } #endregion - - [DynamicVisibleValidationMethod] - public bool DynamicVisibleValidationMethod(string propertyName) - { - // Note: A default initialized calculation doesn't have InflowModelType initialized to any of these 2 values. - if (data.WrappedData.InflowModelType == StabilityPointStructureInflowModelType.FloodedCulvert || - data.WrappedData.InflowModelType == StabilityPointStructureInflowModelType.LowSill) - { - if (propertyName == TypeUtils.GetMemberName(p => p.ModelFactorSuperCriticalFlow)) - { - return data.WrappedData.InflowModelType == StabilityPointStructureInflowModelType.LowSill; - } - if (propertyName == TypeUtils.GetMemberName(p => p.DrainCoefficient)) - { - return data.WrappedData.InflowModelType == StabilityPointStructureInflowModelType.FloodedCulvert; - } - if (propertyName == TypeUtils.GetMemberName(p => p.AreaFlowApertures)) - { - return data.WrappedData.InflowModelType == StabilityPointStructureInflowModelType.FloodedCulvert; - } - if (propertyName == TypeUtils.GetMemberName(p => p.WidthFlowApertures)) - { - return data.WrappedData.InflowModelType == StabilityPointStructureInflowModelType.LowSill; - } - } - - // Note: A default initialized calculation doesn't have LoadSchematizationType initialized to any of these 2 values. - if (data.WrappedData.LoadSchematizationType == LoadSchematizationType.Linear || - data.WrappedData.LoadSchematizationType == LoadSchematizationType.Quadratic) - { - if (propertyName == TypeUtils.GetMemberName(p => p.ConstructiveStrengthLinearLoadModel)) - { - return data.WrappedData.LoadSchematizationType == LoadSchematizationType.Linear; - } - if (propertyName == TypeUtils.GetMemberName(p => p.ConstructiveStrengthQuadraticLoadModel)) - { - return data.WrappedData.LoadSchematizationType == LoadSchematizationType.Quadratic; - } - if (propertyName == TypeUtils.GetMemberName(p => p.StabilityLinearLoadModel)) - { - return data.WrappedData.LoadSchematizationType == LoadSchematizationType.Linear; - } - if (propertyName == TypeUtils.GetMemberName(p => p.StabilityQuadraticLoadModel)) - { - return data.WrappedData.LoadSchematizationType == LoadSchematizationType.Quadratic; - } - } - - return true; - } } } \ No newline at end of file Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Plugin/StabilityPointStructuresPlugin.cs =================================================================== diff -u -r379d603ad7570ee56a65fecc920e56ca24279065 -rc238c8de03e71e09a71c68b6f28fb057ef8a1c4d --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Plugin/StabilityPointStructuresPlugin.cs (.../StabilityPointStructuresPlugin.cs) (revision 379d603ad7570ee56a65fecc920e56ca24279065) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Plugin/StabilityPointStructuresPlugin.cs (.../StabilityPointStructuresPlugin.cs) (revision c238c8de03e71e09a71c68b6f28fb057ef8a1c4d) @@ -383,7 +383,6 @@ CalculateAll(context.WrappedData, context.WrappedData.Calculations.OfType>(), context.Parent); } - #endregion #region StabilityPointStructuresCalculationGroupContext TreeNodeInfo Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Service/StabilityPointStructuresCalculationService.cs =================================================================== diff -u -rdf13dff5aedb149d7b566bed9dda68fe9e3a8e02 -rc238c8de03e71e09a71c68b6f28fb057ef8a1c4d --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Service/StabilityPointStructuresCalculationService.cs (.../StabilityPointStructuresCalculationService.cs) (revision df13dff5aedb149d7b566bed9dda68fe9e3a8e02) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Service/StabilityPointStructuresCalculationService.cs (.../StabilityPointStructuresCalculationService.cs) (revision c238c8de03e71e09a71c68b6f28fb057ef8a1c4d) @@ -132,7 +132,7 @@ else { log.ErrorFormat(Resources.StabilityPointStructuresCalculationService_Calculate_Error_in_stabilityPoint_structures_0_calculation_click_details_for_last_error_1, - calculationName, lastErrorContent); + calculationName, lastErrorContent); } exceptionThrown = true; @@ -736,7 +736,7 @@ { var validationRules = new List() { - new UseBreakWaterRule(input), + new UseBreakWaterRule(input), new NumericInputRule(input.VolumicWeightWater, ParameterNameExtractor.GetFromDisplayName(RingtoetsStabilityPointStructuresFormsResources.Structure_VolumicWeightWater_DisplayName)), new VariationCoefficientLogNormalDistributionRule(input.StormDuration, Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.Test/StabilityPointStructuresFailureMechanismSectionResultTest.cs =================================================================== diff -u -r01d9fa228242fbc40d96844c43b10dd281e3edbf -rc238c8de03e71e09a71c68b6f28fb057ef8a1c4d --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.Test/StabilityPointStructuresFailureMechanismSectionResultTest.cs (.../StabilityPointStructuresFailureMechanismSectionResultTest.cs) (revision 01d9fa228242fbc40d96844c43b10dd281e3edbf) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.Test/StabilityPointStructuresFailureMechanismSectionResultTest.cs (.../StabilityPointStructuresFailureMechanismSectionResultTest.cs) (revision c238c8de03e71e09a71c68b6f28fb057ef8a1c4d) @@ -19,12 +19,10 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. -using System; using Core.Common.Base.Geometry; using NUnit.Framework; using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.Probability; -using Ringtoets.Common.Data.Properties; using Ringtoets.Common.Data.Structures; namespace Ringtoets.StabilityPointStructures.Data.Test Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.TestUtil.Test/TestStabilityPointStructureTest.cs =================================================================== diff -u -r2698972311ca90c3af1171c554c4dec237e34111 -rc238c8de03e71e09a71c68b6f28fb057ef8a1c4d --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.TestUtil.Test/TestStabilityPointStructureTest.cs (.../TestStabilityPointStructureTest.cs) (revision 2698972311ca90c3af1171c554c4dec237e34111) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.TestUtil.Test/TestStabilityPointStructureTest.cs (.../TestStabilityPointStructureTest.cs) (revision c238c8de03e71e09a71c68b6f28fb057ef8a1c4d) @@ -109,11 +109,6 @@ Assert.AreEqual(StabilityPointStructureInflowModelType.FloodedCulvert, structure.InflowModelType); } - private static void AssertAreEqual(double expectedValue, RoundedDouble actualValue) - { - Assert.AreEqual(expectedValue, actualValue, actualValue.GetAccuracy()); - } - [Test] public void Constructor_WithName_ExpectedValues() { @@ -196,5 +191,10 @@ Assert.AreEqual(StabilityPointStructureInflowModelType.FloodedCulvert, structure.InflowModelType); } + + private static void AssertAreEqual(double expectedValue, RoundedDouble actualValue) + { + Assert.AreEqual(expectedValue, actualValue, actualValue.GetAccuracy()); + } } } \ No newline at end of file Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.TestUtil/TestStabilityPointStructure.cs =================================================================== diff -u -radd325fb1e135f779adf7c89446886ff15a9b17c -rc238c8de03e71e09a71c68b6f28fb057ef8a1c4d --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.TestUtil/TestStabilityPointStructure.cs (.../TestStabilityPointStructure.cs) (revision add325fb1e135f779adf7c89446886ff15a9b17c) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.TestUtil/TestStabilityPointStructure.cs (.../TestStabilityPointStructure.cs) (revision c238c8de03e71e09a71c68b6f28fb057ef8a1c4d) @@ -26,7 +26,7 @@ { public class TestStabilityPointStructure : StabilityPointStructure { - public TestStabilityPointStructure() : this("aName"){} + public TestStabilityPointStructure() : this("aName") {} public TestStabilityPointStructure(string name) : base(new ConstructionProperties Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.TestUtil/TestStabilityPointStructuresCalculation.cs =================================================================== diff -u -r276a32161f29fcba4af79cf7c7f0aeb254d4db54 -rc238c8de03e71e09a71c68b6f28fb057ef8a1c4d --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.TestUtil/TestStabilityPointStructuresCalculation.cs (.../TestStabilityPointStructuresCalculation.cs) (revision 276a32161f29fcba4af79cf7c7f0aeb254d4db54) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.TestUtil/TestStabilityPointStructuresCalculation.cs (.../TestStabilityPointStructuresCalculation.cs) (revision c238c8de03e71e09a71c68b6f28fb057ef8a1c4d) @@ -31,8 +31,8 @@ { InputParameters.Structure = new TestStabilityPointStructure(); InputParameters.HydraulicBoundaryLocation = new HydraulicBoundaryLocation(1, "location", 1, 1); - InputParameters.FactorStormDurationOpenStructure = (RoundedDouble)1; + InputParameters.FactorStormDurationOpenStructure = (RoundedDouble) 1; InputParameters.FailureProbabilityStructureWithErosion = 1; } } -} +} \ No newline at end of file Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PropertyClasses/StabilityPointStructuresFailureMechanismPropertiesTest.cs =================================================================== diff -u -r5c5df51bc14a7e25692abf1db5a7476e5036b13f -rc238c8de03e71e09a71c68b6f28fb057ef8a1c4d --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PropertyClasses/StabilityPointStructuresFailureMechanismPropertiesTest.cs (.../StabilityPointStructuresFailureMechanismPropertiesTest.cs) (revision 5c5df51bc14a7e25692abf1db5a7476e5036b13f) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PropertyClasses/StabilityPointStructuresFailureMechanismPropertiesTest.cs (.../StabilityPointStructuresFailureMechanismPropertiesTest.cs) (revision c238c8de03e71e09a71c68b6f28fb057ef8a1c4d) @@ -33,7 +33,6 @@ [TestFixture] public class StabilityPointStructuresFailureMechanismPropertiesTest { - private const int namePropertyIndex = 0; private const int codePropertyIndex = 1; private const int gravitationalAccelerationPropertyIndex = 2; Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/TreeNodeInfos/StabilityPointStructuresFailureMechanismSectionResultContextTreeNodeInfoTest.cs =================================================================== diff -u -re5f4a598d201934e48ab71795fb3b19cb9a960b1 -rc238c8de03e71e09a71c68b6f28fb057ef8a1c4d --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/TreeNodeInfos/StabilityPointStructuresFailureMechanismSectionResultContextTreeNodeInfoTest.cs (.../StabilityPointStructuresFailureMechanismSectionResultContextTreeNodeInfoTest.cs) (revision e5f4a598d201934e48ab71795fb3b19cb9a960b1) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/TreeNodeInfos/StabilityPointStructuresFailureMechanismSectionResultContextTreeNodeInfoTest.cs (.../StabilityPointStructuresFailureMechanismSectionResultContextTreeNodeInfoTest.cs) (revision c238c8de03e71e09a71c68b6f28fb057ef8a1c4d) @@ -28,8 +28,8 @@ using Rhino.Mocks; using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.Common.Forms.Properties; -using Ringtoets.StabilityPointStructures.Plugin; using Ringtoets.StabilityPointStructures.Data; +using Ringtoets.StabilityPointStructures.Plugin; namespace Ringtoets.StabilityPointStructures.Forms.Test.TreeNodeInfos { Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/Views/StabilityPointStructuresFailureMechanismResultViewTest.cs =================================================================== diff -u -r4f9bc63003decfa2a2c6ae7714b31281da94a773 -rc238c8de03e71e09a71c68b6f28fb057ef8a1c4d --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/Views/StabilityPointStructuresFailureMechanismResultViewTest.cs (.../StabilityPointStructuresFailureMechanismResultViewTest.cs) (revision 4f9bc63003decfa2a2c6ae7714b31281da94a773) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/Views/StabilityPointStructuresFailureMechanismResultViewTest.cs (.../StabilityPointStructuresFailureMechanismResultViewTest.cs) (revision c238c8de03e71e09a71c68b6f28fb057ef8a1c4d) @@ -76,7 +76,7 @@ // Setup using (StabilityPointStructuresFailureMechanismResultView view = CreateConfiguredFailureMechanismResultsView()) { - var dataGridView = (DataGridView)new ControlTester("dataGridView").TheObject; + var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; var points = new[] { @@ -112,7 +112,7 @@ var testData = new object(); using (StabilityPointStructuresFailureMechanismResultView view = CreateConfiguredFailureMechanismResultsView()) { - var dataGridView = (DataGridView)new ControlTester("dataGridView").TheObject; + var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; // Call view.Data = testData; @@ -131,22 +131,22 @@ using (CreateConfiguredFailureMechanismResultsView()) { // Then - var dataGridView = (DataGridView)new ControlTester("dataGridView").TheObject; + var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; DataGridViewRowCollection rows = dataGridView.Rows; Assert.AreEqual(2, rows.Count); DataGridViewCellCollection cells = rows[0].Cells; Assert.AreEqual(4, cells.Count); Assert.AreEqual("Section 1", cells[nameColumnIndex].FormattedValue); - Assert.IsFalse((bool)cells[assessmentLayerOneIndex].FormattedValue); + Assert.IsFalse((bool) cells[assessmentLayerOneIndex].FormattedValue); Assert.AreEqual("-", cells[assessmentLayerTwoAIndex].FormattedValue); Assert.AreEqual("-", cells[assessmentLayerThreeIndex].FormattedValue); cells = rows[1].Cells; Assert.AreEqual(4, cells.Count); Assert.AreEqual("Section 2", cells[nameColumnIndex].FormattedValue); - Assert.IsFalse((bool)cells[assessmentLayerOneIndex].FormattedValue); + Assert.IsFalse((bool) cells[assessmentLayerOneIndex].FormattedValue); Assert.AreEqual("-", cells[assessmentLayerTwoAIndex].FormattedValue); Assert.AreEqual("-", cells[assessmentLayerThreeIndex].FormattedValue); } @@ -159,7 +159,7 @@ using (ShowFailureMechanismResultsView()) { // Then - var dataGridView = (DataGridView)new ControlTester("dataGridView").TheObject; + var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; Assert.AreEqual(4, dataGridView.ColumnCount); @@ -198,12 +198,12 @@ var result1 = new StabilityPointStructuresFailureMechanismSectionResult(section1) { AssessmentLayerOne = true, - AssessmentLayerThree = (RoundedDouble)random.NextDouble() + AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; var result2 = new StabilityPointStructuresFailureMechanismSectionResult(section2) { AssessmentLayerOne = false, - AssessmentLayerThree = (RoundedDouble)random.NextDouble() + AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; using (var view = ShowFailureMechanismResultsView()) @@ -216,7 +216,7 @@ }; // Then - var dataGridView = (DataGridView)new ControlTester("dataGridView").TheObject; + var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; DataGridViewRowCollection rows = dataGridView.Rows; Assert.AreEqual(2, rows.Count); @@ -255,7 +255,7 @@ var result = new StabilityPointStructuresFailureMechanismSectionResult(section) { AssessmentLayerOne = false, - AssessmentLayerThree = (RoundedDouble)random.NextDouble() + AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; using (var view = ShowFailureMechanismResultsView()) { @@ -269,7 +269,7 @@ result.NotifyObservers(); // Then - var dataGridView = (DataGridView)new ControlTester("dataGridView").TheObject; + var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; DataGridViewRowCollection rows = dataGridView.Rows; Assert.AreEqual(1, rows.Count); @@ -306,7 +306,7 @@ }; // Then - var dataGridView = (DataGridView)new ControlTester("dataGridView").TheObject; + var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; DataGridViewRowCollection rows = dataGridView.Rows; Assert.AreEqual(0, rows.Count); } Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/Views/StabilityPointStructuresFailureMechanismSectionResultRowTest.cs =================================================================== diff -u -r01d9fa228242fbc40d96844c43b10dd281e3edbf -rc238c8de03e71e09a71c68b6f28fb057ef8a1c4d --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/Views/StabilityPointStructuresFailureMechanismSectionResultRowTest.cs (.../StabilityPointStructuresFailureMechanismSectionResultRowTest.cs) (revision 01d9fa228242fbc40d96844c43b10dd281e3edbf) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/Views/StabilityPointStructuresFailureMechanismSectionResultRowTest.cs (.../StabilityPointStructuresFailureMechanismSectionResultRowTest.cs) (revision c238c8de03e71e09a71c68b6f28fb057ef8a1c4d) @@ -19,7 +19,6 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. -using System; using Core.Common.Base.Geometry; using Core.Common.Utils.Reflection; using NUnit.Framework; Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Integration.Test/StabilityPointStructuresCalculationActivityIntegrationTest.cs =================================================================== diff -u -rdf13dff5aedb149d7b566bed9dda68fe9e3a8e02 -rc238c8de03e71e09a71c68b6f28fb057ef8a1c4d --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Integration.Test/StabilityPointStructuresCalculationActivityIntegrationTest.cs (.../StabilityPointStructuresCalculationActivityIntegrationTest.cs) (revision df13dff5aedb149d7b566bed9dda68fe9e3a8e02) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Integration.Test/StabilityPointStructuresCalculationActivityIntegrationTest.cs (.../StabilityPointStructuresCalculationActivityIntegrationTest.cs) (revision c238c8de03e71e09a71c68b6f28fb057ef8a1c4d) @@ -84,7 +84,7 @@ }); Assert.AreEqual(ActivityState.Failed, activity.State); } - + [Test] public void Run_ValidCalculation_PerformValidationAndCalculationAndLogStartAndEnd() { @@ -218,7 +218,7 @@ var activity = new StabilityPointStructuresCalculationActivity(calculation, testDataPath, failureMechanism, assessmentSection); using (new HydraRingCalculatorFactoryConfig()) { - var calculator = ((TestHydraRingCalculatorFactory)HydraRingCalculatorFactory.Instance).StructuresStabilityPointCalculator; + var calculator = ((TestHydraRingCalculatorFactory) HydraRingCalculatorFactory.Instance).StructuresStabilityPointCalculator; calculator.EndInFailure = true; // Call @@ -233,7 +233,7 @@ StringAssert.StartsWith(string.Format("Validatie van '{0}' beëindigd om: ", calculation.Name), msgs[1]); StringAssert.StartsWith(string.Format("Berekening van '{0}' gestart om: ", calculation.Name), msgs[2]); StringAssert.StartsWith(string.Format("De berekening voor kunstwerk puntconstructies '{0}' is niet gelukt. Er is geen foutrapport beschikbaar.", - calculation.Name), msgs[3]); + calculation.Name), msgs[3]); StringAssert.StartsWith("Puntconstructies berekening is uitgevoerd op de tijdelijke locatie:", msgs[4]); StringAssert.StartsWith(string.Format("Berekening van '{0}' beëindigd om: ", calculation.Name), msgs[5]); }); @@ -273,7 +273,7 @@ var activity = new StabilityPointStructuresCalculationActivity(calculation, testDataPath, failureMechanism, assessmentSection); using (new HydraRingCalculatorFactoryConfig()) { - var calculator = ((TestHydraRingCalculatorFactory)HydraRingCalculatorFactory.Instance).StructuresStabilityPointCalculator; + var calculator = ((TestHydraRingCalculatorFactory) HydraRingCalculatorFactory.Instance).StructuresStabilityPointCalculator; calculator.EndInFailure = false; calculator.LastErrorContent = "An error occured"; @@ -289,7 +289,7 @@ StringAssert.StartsWith(string.Format("Validatie van '{0}' beëindigd om: ", calculation.Name), msgs[1]); StringAssert.StartsWith(string.Format("Berekening van '{0}' gestart om: ", calculation.Name), msgs[2]); StringAssert.StartsWith(string.Format("De berekening voor kunstwerk puntconstructies '{0}' is niet gelukt. Bekijk het foutrapport door op details te klikken.", - calculation.Name), msgs[3]); + calculation.Name), msgs[3]); StringAssert.StartsWith("Puntconstructies berekening is uitgevoerd op de tijdelijke locatie:", msgs[4]); StringAssert.StartsWith(string.Format("Berekening van '{0}' beëindigd om: ", calculation.Name), msgs[5]); }); Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/StabilityPointStructuresPluginTest.cs =================================================================== diff -u -rec82979ab7ef689a1687ebccc771d38f882c5bb7 -rc238c8de03e71e09a71c68b6f28fb057ef8a1c4d --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/StabilityPointStructuresPluginTest.cs (.../StabilityPointStructuresPluginTest.cs) (revision ec82979ab7ef689a1687ebccc771d38f882c5bb7) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/StabilityPointStructuresPluginTest.cs (.../StabilityPointStructuresPluginTest.cs) (revision c238c8de03e71e09a71c68b6f28fb057ef8a1c4d) @@ -19,14 +19,12 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. -using System.Collections.Generic; using System.Linq; using Core.Common.Controls.TreeView; using Core.Common.Gui; using Core.Common.Gui.Commands; using Core.Common.Gui.Plugin; using Core.Common.Gui.TestUtil; -using Core.Common.TestUtil; using NUnit.Framework; using Rhino.Mocks; using Ringtoets.Common.Forms.PresentationObjects; Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/ViewInfos/StabilityPointStructuresScenariosViewInfoTest.cs =================================================================== diff -u -r6af0f01bd9b9b6da145bea0b4f8b8b1b4b09e02b -rc238c8de03e71e09a71c68b6f28fb057ef8a1c4d --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/ViewInfos/StabilityPointStructuresScenariosViewInfoTest.cs (.../StabilityPointStructuresScenariosViewInfoTest.cs) (revision 6af0f01bd9b9b6da145bea0b4f8b8b1b4b09e02b) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/ViewInfos/StabilityPointStructuresScenariosViewInfoTest.cs (.../StabilityPointStructuresScenariosViewInfoTest.cs) (revision c238c8de03e71e09a71c68b6f28fb057ef8a1c4d) @@ -25,12 +25,12 @@ using Core.Common.TestUtil; using NUnit.Framework; using Rhino.Mocks; -using Ringtoets.StabilityPointStructures.Data; -using Ringtoets.StabilityPointStructures.Forms.PresentationObjects; -using Ringtoets.StabilityPointStructures.Forms.Views; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.StabilityPointStructures.Data; +using Ringtoets.StabilityPointStructures.Forms.PresentationObjects; +using Ringtoets.StabilityPointStructures.Forms.Views; using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; namespace Ringtoets.StabilityPointStructures.Plugin.Test.ViewInfos @@ -252,7 +252,7 @@ { Data = new CalculationGroup() }; - + // Call bool closeForData = info.CloseForData(view, assessmentSectionMock);