Index: DamClients/DamUI/trunk/src/Dam/Tests/DamEngineIo/FillXmlInputFromDamUiTests.cs =================================================================== diff -u -r2612 -r2614 --- DamClients/DamUI/trunk/src/Dam/Tests/DamEngineIo/FillXmlInputFromDamUiTests.cs (.../FillXmlInputFromDamUiTests.cs) (revision 2612) +++ DamClients/DamUI/trunk/src/Dam/Tests/DamEngineIo/FillXmlInputFromDamUiTests.cs (.../FillXmlInputFromDamUiTests.cs) (revision 2614) @@ -637,7 +637,7 @@ currentSpecification.FailureMechanismSystemType = failureMechanismSystemType; // First set PipingModelType to default because it will be set to default when reading the xml back when FailureMechanismSystemType is not Piping currentSpecification.PipingModelType = PipingModelType.Sellmeijer4Forces; - // Next line sets the CalculationType to Bishop as well + // Next line sets the CalculationModel to Bishop as well currentSpecification.StabilityModelType = MStabModelType.Bishop; // When Writing Xml @@ -654,7 +654,8 @@ [TestCase(FailureMechanismSystemType.StabilityInside)] [TestCase(FailureMechanismSystemType.HorizontalBalance)] [TestCase(FailureMechanismSystemType.FlowSlide)] - public void DoNotRaiseExceptionWhenRiverLevelLowIsMissingForOtherTypeThanStabilityOutsideOrPiping(FailureMechanismSystemType failureMechanismSystemType) + [TestCase(FailureMechanismSystemType.Piping)] + public void DoNotRaiseExceptionWhenRiverLevelLowIsMissingForOtherTypeThanStabilityOutside(FailureMechanismSystemType failureMechanismSystemType) { // Given DataSet with undefined RiverLevelLow, for stability inside / horizontal balance / flow slide DamProjectData expectedDamProjectData = CreateExampleDamProjectData(); @@ -664,33 +665,16 @@ currentSpecification.FailureMechanismSystemType = failureMechanismSystemType; // First set PipingModelType to default because it will be set to default when reading the xml back when FailureMechanismSystemType is not Piping currentSpecification.PipingModelType = PipingModelType.Sellmeijer4Forces; - // Next line sets the CalculationType to Bishop as well - currentSpecification.StabilityModelType = MStabModelType.Bishop; - - // When Writing Xml - Input input = FillXmlInputFromDamUi.CreateInput(expectedDamProjectData); - string xmlString = DamXmlSerialization.SaveInputAsXmlString(input); - - // Then Raise Exception With Clear Message() - input = DamXmlSerialization.LoadInputFromXmlString(xmlString); - DamProjectData actualDamProjectData = FillDamUiFromXmlInput.CreateDamProjectData(input); - CompareDamProjectData(actualDamProjectData, expectedDamProjectData); - } - - [Test] - [TestCase(FailureMechanismSystemType.Piping)] - public void DoNotRaiseExceptionWhenRiverLevelLowIsMissingForPiping(FailureMechanismSystemType failureMechanismSystemType) - { - // Given DataSet with undefined RiverLevelLow, for piping - DamProjectData expectedDamProjectData = CreateExampleDamProjectData(); - var scenario = expectedDamProjectData.WaterBoard.Dikes[0].Locations[0].Scenarios[0]; - scenario.RiverLevelLow = null; - var currentSpecification = expectedDamProjectData.DamProjectCalculationSpecification.CurrentSpecification; - currentSpecification.FailureMechanismSystemType = failureMechanismSystemType; // First set StabilityModelType to default because it will be set to default when reading the xml back when FailureMechanismSystemType is not Stability currentSpecification.StabilityModelType = MStabModelType.Bishop; - // Next line sets the CalculationType to Bligh as well - currentSpecification.PipingModelType = PipingModelType.Bligh; + if (failureMechanismSystemType == FailureMechanismSystemType.Piping) + { + currentSpecification.CalculationModel = currentSpecification.PipingModelType; + } + else + { + currentSpecification.CalculationModel = currentSpecification.StabilityModelType; + } // When Writing Xml Input input = FillXmlInputFromDamUi.CreateInput(expectedDamProjectData);