Index: Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Service.Test/StabilityPointStructuresDataSynchronizationServiceTest.cs =================================================================== diff -u -r8e0365384823f022fbae3bb8104439c538fea0ba -rf4512a03b7418c4171e76c6750d17ab8abb36351 --- Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Service.Test/StabilityPointStructuresDataSynchronizationServiceTest.cs (.../StabilityPointStructuresDataSynchronizationServiceTest.cs) (revision 8e0365384823f022fbae3bb8104439c538fea0ba) +++ Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Service.Test/StabilityPointStructuresDataSynchronizationServiceTest.cs (.../StabilityPointStructuresDataSynchronizationServiceTest.cs) (revision f4512a03b7418c4171e76c6750d17ab8abb36351) @@ -338,67 +338,169 @@ new Point2D(2, 0), new Point2D(4, 0) }); - var structure1 = new TestStabilityPointStructure(new Point2D(1, 0), "id structure1"); - var structure2 = new TestStabilityPointStructure(new Point2D(3, 0), "id structure2"); + var structure1 = new TestStabilityPointStructure(new Point2D(1, 0), "Id 1,0"); + var structure2 = new TestStabilityPointStructure(new Point2D(3, 0), "Id 3,0"); var profile = new TestForeshoreProfile(); - StructuresCalculation calculation1 = new TestStabilityPointStructuresCalculationScenario + + var failureMechanism = new StabilityPointStructuresFailureMechanism(); + failureMechanism.ForeshoreProfiles.AddRange(new[] { + profile + }, "path"); + + failureMechanism.StabilityPointStructures.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 TestStabilityPointStructuresCalculationScenario + 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 TestStabilityPointStructuresCalculationScenario + var calculationWithHydraulicBoundaryLocationAndForeshoreProfile = new StructuresCalculationScenario { InputParameters = { - ForeshoreProfile = profile, - Structure = structure1 + Structure = structure2, + HydraulicBoundaryLocation = hydraulicBoundaryLocation, + ForeshoreProfile = profile } }; - var failureMechanism = new StabilityPointStructuresFailureMechanism + var calculationWithForeshoreProfile = new StructuresCalculationScenario { - CalculationsGroup = + InputParameters = { - Children = - { - calculation1, - new CalculationGroup - { - Children = - { - calculation2 - } - }, - calculation3 - } + Structure = structure1, + ForeshoreProfile = profile } }; - failureMechanism.StabilityPointStructures.AddRange(new[] + var calculationWithOutputHydraulicBoundaryLocationAndForeshoreProfile = new StructuresCalculationScenario { - structure1, - structure2 - }, "path"); + InputParameters = + { + Structure = structure1, + HydraulicBoundaryLocation = hydraulicBoundaryLocation, + ForeshoreProfile = profile + }, + Output = new TestStructuresOutput() + }; - failureMechanism.ForeshoreProfiles.AddRange(new[] + var subCalculation = new StructuresCalculationScenario { - profile - }, "path"); + InputParameters = + { + Structure = structure2 + } + }; + var subCalculationWithOutput = new StructuresCalculationScenario + { + 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() + }; - FailureMechanismTestHelper.SetSections(failureMechanism, new[] + 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 { - section1, - section2 + Children = + { + subCalculation, + subCalculationWithOutput, + subCalculationWithOutputAndHydraulicBoundaryLocation, + subCalculationWithHydraulicBoundaryLocation, + subCalculationWithForeshoreProfile, + subCalculationWithHydraulicBoundaryLocationAndForeshoreProfile, + subCalculationWithOutputHydraulicBoundaryLocationAndForeshoreProfile + } }); return failureMechanism;