Index: Riskeer/HeightStructures/test/Riskeer.HeightStructures.Service.Test/HeightStructuresDataSynchronizationServiceTest.cs =================================================================== diff -u -r45e769fd026f33507c9f081e823f06954f835ac8 -r80c36c3b870c3162545f7d0475f8dfb5dc7f03af --- Riskeer/HeightStructures/test/Riskeer.HeightStructures.Service.Test/HeightStructuresDataSynchronizationServiceTest.cs (.../HeightStructuresDataSynchronizationServiceTest.cs) (revision 45e769fd026f33507c9f081e823f06954f835ac8) +++ Riskeer/HeightStructures/test/Riskeer.HeightStructures.Service.Test/HeightStructuresDataSynchronizationServiceTest.cs (.../HeightStructuresDataSynchronizationServiceTest.cs) (revision 80c36c3b870c3162545f7d0475f8dfb5dc7f03af) @@ -529,64 +529,166 @@ var structure1 = new TestHeightStructure(new Point2D(1, 0), "Id 1,0"); var structure2 = new TestHeightStructure(new Point2D(3, 0), "Id 3,0"); var profile = new TestForeshoreProfile(); - StructuresCalculation calculation1 = new TestHeightStructuresCalculationScenario + + var failureMechanism = new HeightStructuresFailureMechanism(); + failureMechanism.ForeshoreProfiles.AddRange(new[] { + profile + }, "path"); + + failureMechanism.HeightStructures.AddRange(new[] + { + structure1, + structure2 + }, "someLocation"); + + FailureMechanismTestHelper.SetSections(failureMechanism, new[] + { + section1, + section2 + }); + + var hydraulicBoundaryLocation = new TestHydraulicBoundaryLocation(); + + var calculation = new StructuresCalculationScenario + { InputParameters = { - ForeshoreProfile = profile, Structure = structure1 + } + }; + var calculationWithOutput = new StructuresCalculationScenario + { + InputParameters = + { + Structure = structure1 }, Output = new TestStructuresOutput() }; - StructuresCalculation calculation2 = new TestHeightStructuresCalculationScenario + var calculationWithOutputAndHydraulicBoundaryLocation = new StructuresCalculationScenario { InputParameters = { - ForeshoreProfile = profile, - Structure = structure2 + Structure = structure2, + HydraulicBoundaryLocation = hydraulicBoundaryLocation + }, + Output = new TestStructuresOutput() + }; + var calculationWithHydraulicBoundaryLocation = new StructuresCalculationScenario + { + InputParameters = + { + Structure = structure1, + HydraulicBoundaryLocation = hydraulicBoundaryLocation } }; - StructuresCalculation calculation3 = new TestHeightStructuresCalculationScenario + var calculationWithHydraulicBoundaryLocationAndForeshoreProfile = new StructuresCalculationScenario { InputParameters = { - ForeshoreProfile = profile, - Structure = structure1 + Structure = structure2, + HydraulicBoundaryLocation = hydraulicBoundaryLocation, + ForeshoreProfile = profile } }; - var failureMechanism = new HeightStructuresFailureMechanism + var calculationWithForeshoreProfile = new StructuresCalculationScenario { - CalculationsGroup = + InputParameters = { - Children = - { - calculation1, - new CalculationGroup - { - Children = - { - calculation2 - } - }, - calculation3 - } + Structure = structure1, + ForeshoreProfile = profile } }; - failureMechanism.ForeshoreProfiles.AddRange(new[] + var calculationWithOutputHydraulicBoundaryLocationAndForeshoreProfile = new StructuresCalculationScenario { - profile - }, "path"); + InputParameters = + { + Structure = structure1, + HydraulicBoundaryLocation = hydraulicBoundaryLocation, + ForeshoreProfile = profile + }, + Output = new TestStructuresOutput() + }; - failureMechanism.HeightStructures.AddRange(new[] + var subCalculation = new StructuresCalculationScenario { - structure1, - structure2 - }, "someLocation"); - - FailureMechanismTestHelper.SetSections(failureMechanism, new[] + InputParameters = + { + Structure = structure2 + } + }; + var subCalculationWithOutput = new StructuresCalculationScenario { - section1, - section2 + InputParameters = + { + Structure = structure2 + }, + Output = new TestStructuresOutput() + }; + var subCalculationWithOutputAndHydraulicBoundaryLocation = new StructuresCalculationScenario + { + InputParameters = + { + Structure = structure1, + HydraulicBoundaryLocation = hydraulicBoundaryLocation + }, + Output = new TestStructuresOutput() + }; + var subCalculationWithHydraulicBoundaryLocation = new StructuresCalculationScenario + { + InputParameters = + { + Structure = structure1, + HydraulicBoundaryLocation = hydraulicBoundaryLocation + } + }; + var subCalculationWithHydraulicBoundaryLocationAndForeshoreProfile = new StructuresCalculationScenario + { + InputParameters = + { + Structure = structure1, + HydraulicBoundaryLocation = hydraulicBoundaryLocation, + ForeshoreProfile = profile + } + }; + var subCalculationWithForeshoreProfile = new StructuresCalculationScenario + { + InputParameters = + { + Structure = structure2, + ForeshoreProfile = profile + } + }; + var subCalculationWithOutputHydraulicBoundaryLocationAndForeshoreProfile = new StructuresCalculationScenario + { + InputParameters = + { + Structure = structure2, + HydraulicBoundaryLocation = hydraulicBoundaryLocation, + ForeshoreProfile = profile + }, + Output = new TestStructuresOutput() + }; + + failureMechanism.CalculationsGroup.Children.Add(calculation); + failureMechanism.CalculationsGroup.Children.Add(calculationWithOutput); + failureMechanism.CalculationsGroup.Children.Add(calculationWithOutputAndHydraulicBoundaryLocation); + failureMechanism.CalculationsGroup.Children.Add(calculationWithHydraulicBoundaryLocation); + failureMechanism.CalculationsGroup.Children.Add(calculationWithForeshoreProfile); + failureMechanism.CalculationsGroup.Children.Add(calculationWithHydraulicBoundaryLocationAndForeshoreProfile); + failureMechanism.CalculationsGroup.Children.Add(calculationWithOutputHydraulicBoundaryLocationAndForeshoreProfile); + failureMechanism.CalculationsGroup.Children.Add(new CalculationGroup + { + Children = + { + subCalculation, + subCalculationWithOutput, + subCalculationWithOutputAndHydraulicBoundaryLocation, + subCalculationWithHydraulicBoundaryLocation, + subCalculationWithForeshoreProfile, + subCalculationWithHydraulicBoundaryLocationAndForeshoreProfile, + subCalculationWithOutputHydraulicBoundaryLocationAndForeshoreProfile + } }); return failureMechanism;