Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.IO.Test/Exporters/StabilityPointStructuresCalculationConfigurationExporterTest.cs =================================================================== diff -u -ra9b3b3d970ae59100d45e092e767dd2dbc5ccdf7 -re4ac9527c2d9c837a35ca5195b7774612d72f750 --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.IO.Test/Exporters/StabilityPointStructuresCalculationConfigurationExporterTest.cs (.../StabilityPointStructuresCalculationConfigurationExporterTest.cs) (revision a9b3b3d970ae59100d45e092e767dd2dbc5ccdf7) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.IO.Test/Exporters/StabilityPointStructuresCalculationConfigurationExporterTest.cs (.../StabilityPointStructuresCalculationConfigurationExporterTest.cs) (revision e4ac9527c2d9c837a35ca5195b7774612d72f750) @@ -29,7 +29,6 @@ using Ringtoets.Common.Data.Probabilistics; using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Data.TestUtil; -using Ringtoets.Common.IO.Configurations; using Ringtoets.Common.IO.TestUtil; using Ringtoets.StabilityPointStructures.Data; using Ringtoets.StabilityPointStructures.Data.TestUtil; @@ -78,6 +77,21 @@ } }) .SetName("Calculation configuration with hierarchy"); + yield return new TestCaseData("configurationWithForeshoreProfile", new[] + { + CreateCalculationWithForeshoreProfile() + }) + .SetName("Calculation configuration with foreshore profile"); + yield return new TestCaseData("configurationWithUseBreakWater", new[] + { + CreateCalculationWithUseBreakWater() + }) + .SetName("Calculation configuration with use breakwater true"); + yield return new TestCaseData("configurationWithStructure", new[] + { + CreateCalculationWithStructure() + }) + .SetName("Calculation configuration with a structure set"); } } @@ -96,6 +110,49 @@ WriteAndValidate(calculations, expectedXmlFilePath); } + private static StructuresCalculation CreateCalculationWithStructure() + { + return new StructuresCalculation + { + Name = "with structure", + InputParameters = + { + Structure = new TestStabilityPointStructure("kunstwerk1") + } + }; + } + + private static StructuresCalculation CreateCalculationWithForeshoreProfile() + { + return new StructuresCalculation + { + Name = "with foreshore profile", + InputParameters = + { + ForeshoreProfile = new TestForeshoreProfile("profiel1") + } + }; + } + + private static StructuresCalculation CreateCalculationWithUseBreakWater() + { + return new StructuresCalculation + { + Name = "with use breakwater", + InputParameters = + { + ForeshoreProfile = new TestForeshoreProfile("profiel1"), + BreakWater = + { + Type = BreakWaterType.Wall, + Height = (RoundedDouble) 1.24 + }, + UseBreakWater = true, + UseForeshore = false + } + }; + } + private static ICalculationBase CreateSparseCalculation() { return new StructuresCalculation @@ -253,139 +310,5 @@ { return new StabilityPointStructuresCalculationConfigurationExporter(calculations, filePath); } - - private static StabilityPointStructuresCalculationConfiguration CreateFullCalculation2() - { - return new StabilityPointStructuresCalculationConfiguration("full config") - { - AllowedLevelIncreaseStorage = new MeanStandardDeviationStochastConfiguration - { - Mean = 0.2, - StandardDeviation = 0.01 - }, - AreaFlowApertures = new MeanStandardDeviationStochastConfiguration - { - Mean = 80.5, - StandardDeviation = 1 - }, - BankWidth = new MeanStandardDeviationStochastConfiguration - { - Mean = 1.2, - StandardDeviation = 0.1 - }, - ConstructiveStrengthLinearLoadModel = new MeanVariationCoefficientStochastConfiguration - { - Mean = 2, - VariationCoefficient = 0.1 - }, - ConstructiveStrengthQuadraticLoadModel = new MeanVariationCoefficientStochastConfiguration - { - Mean = 2, - VariationCoefficient = 0.1 - }, - CriticalOvertoppingDischarge = new MeanVariationCoefficientStochastConfiguration - { - Mean = 2, - VariationCoefficient = 0.1 - }, - DrainCoefficient = new MeanStandardDeviationStochastConfiguration - { - Mean = 0.1 - }, - EvaluationLevel = 1e-1, - FactorStormDurationOpenStructure = 1e-2, - FailureCollisionEnergy = new MeanVariationCoefficientStochastConfiguration - { - Mean = 1.2, - VariationCoefficient = 0.1 - }, - FailureProbabilityRepairClosure = 1e-3, - FailureProbabilityStructureWithErosion = 1e-4, - FlowVelocityStructureClosable = new MeanVariationCoefficientStochastConfiguration - { - Mean = 1.1 - }, - FlowWidthAtBottomProtection = new MeanStandardDeviationStochastConfiguration - { - Mean = 15.2, - StandardDeviation = 0.1 - }, - ForeshoreProfileName = "profiel1", - HydraulicBoundaryLocationName = "Locatie1", - InflowModelType = ConfigurationStabilityPointStructuresInflowModelType.FloodedCulvert, - InsideWaterLevel = new MeanStandardDeviationStochastConfiguration - { - Mean = 0.5, - StandardDeviation = 0.1 - }, - InsideWaterLevelFailureConstruction = new MeanStandardDeviationStochastConfiguration - { - Mean = 0.7, - StandardDeviation = 0.1 - }, - LevelCrestStructure = new MeanStandardDeviationStochastConfiguration - { - Mean = 4.3, - StandardDeviation = 0.1 - }, - LevellingCount = 1, - LoadSchematizationType = ConfigurationStabilityPointStructuresLoadSchematizationType.Linear, - ModelFactorSuperCriticalFlow = new MeanStandardDeviationStochastConfiguration - { - Mean = 0.1 - }, - ProbabilityCollisionSecondaryStructure = 1e-5, - VolumicWeightWater = 1e-6, - StormDuration = new MeanVariationCoefficientStochastConfiguration - { - Mean = 6.0 - }, - ShipMass = new MeanVariationCoefficientStochastConfiguration - { - Mean = 16000, - VariationCoefficient = 0.1 - }, - ShipVelocity = new MeanVariationCoefficientStochastConfiguration - { - Mean = 1.2, - VariationCoefficient = 0.1 - }, - StabilityLinearLoadModel = new MeanVariationCoefficientStochastConfiguration - { - Mean = 1.2, - VariationCoefficient = 0.1 - }, - StabilityQuadraticLoadModel = new MeanVariationCoefficientStochastConfiguration - { - Mean = 1.2, - VariationCoefficient = 0.1 - }, - StorageStructureArea = new MeanVariationCoefficientStochastConfiguration - { - Mean = 15000, - VariationCoefficient = 0.01 - }, - StructureName = "kunstwerk1", - StructureNormalOrientation = 1e-7, - ThresholdHeightOpenWeir = new MeanStandardDeviationStochastConfiguration - { - Mean = 1.2, - StandardDeviation = 0.1 - }, - VerticalDistance = 1e-8, - WaveReduction = new WaveReductionConfiguration - { - UseBreakWater = true, - BreakWaterType = ConfigurationBreakWaterType.Dam, - BreakWaterHeight = 1.23, - UseForeshoreProfile = false - }, - WidthFlowApertures = new MeanStandardDeviationStochastConfiguration - { - Mean = 15.2, - StandardDeviation = 0.1 - } - }; - } } } \ No newline at end of file Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.IO.Test/test-data/StabilityPointStructuresCalculationConfigurationExporter/configurationWithForeshoreProfile.xml =================================================================== diff -u --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.IO.Test/test-data/StabilityPointStructuresCalculationConfigurationExporter/configurationWithForeshoreProfile.xml (revision 0) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.IO.Test/test-data/StabilityPointStructuresCalculationConfigurationExporter/configurationWithForeshoreProfile.xml (revision e4ac9527c2d9c837a35ca5195b7774612d72f750) @@ -0,0 +1,26 @@ + + + + 1 + profiel1 + 1 + 9.81 + + false + havendam + 0 + false + + + + 1.1 + + + 6 + + + 1 + + + + \ No newline at end of file Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.IO.Test/test-data/StabilityPointStructuresCalculationConfigurationExporter/configurationWithStructure.xml =================================================================== diff -u --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.IO.Test/test-data/StabilityPointStructuresCalculationConfigurationExporter/configurationWithStructure.xml (revision 0) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.IO.Test/test-data/StabilityPointStructuresCalculationConfigurationExporter/configurationWithStructure.xml (revision e4ac9527c2d9c837a35ca5195b7774612d72f750) @@ -0,0 +1,102 @@ + + + + kunstwerk1 + 123.46 + 1 + 555.55 + 1 + 0.55 + verdronkenkoker + 42 + 0.55 + 555.55 + 9.81 + + + 890.12 + 0.89 + + + 456.79 + 0.46 + + + 234.57 + 0.23 + + + 789.01 + 0.79 + + + 1.1 + + + 345.68 + 0.35 + + + 6 + + + 901.23 + 0.9 + + + 234.57 + + + 901.23 + 0.9 + + + 123.46 + 0.12 + + + 1 + + + 567.89 + 0.57 + + + 678.9 + 0.2 + + + 567.89 + 0.57 + + + 345.68 + 0.35 + + + 456.79 + 0.46 + + + 7777777.78 + 0.78 + + + 567.89 + 0.57 + + + 789.01 + 0.79 + + + 890.12 + 0.89 + + + 678.9 + 0.68 + + + + \ No newline at end of file Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.IO.Test/test-data/StabilityPointStructuresCalculationConfigurationExporter/configurationWithUseBreakWater.xml =================================================================== diff -u --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.IO.Test/test-data/StabilityPointStructuresCalculationConfigurationExporter/configurationWithUseBreakWater.xml (revision 0) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.IO.Test/test-data/StabilityPointStructuresCalculationConfigurationExporter/configurationWithUseBreakWater.xml (revision e4ac9527c2d9c837a35ca5195b7774612d72f750) @@ -0,0 +1,26 @@ + + + + 1 + profiel1 + 1 + 9.81 + + true + verticalewand + 1.24 + false + + + + 1.1 + + + 6 + + + 1 + + + + \ No newline at end of file