Index: DamClients/DamUI/trunk/src/Dam/Tests/LocationTest.cs =================================================================== diff -u -r2514 -r2529 --- DamClients/DamUI/trunk/src/Dam/Tests/LocationTest.cs (.../LocationTest.cs) (revision 2514) +++ DamClients/DamUI/trunk/src/Dam/Tests/LocationTest.cs (.../LocationTest.cs) (revision 2529) @@ -35,7 +35,6 @@ var expectedLocation = new Location { Name = "Sand", - PlLineOffsetBelowDikeTopAtPolder = 10.1, DampingFactorPL3 = 11.11 }) using (var actualLocation = new Location()) @@ -45,7 +44,7 @@ { actualLocation.SetParameterFromNameValuePair(soilDetail.Key, soilDetail.Value); } - Assert.AreEqual(expectedLocation.PlLineOffsetBelowDikeTopAtPolder, actualLocation.PlLineOffsetBelowDikeTopAtPolder, cTolerance); + Assert.AreEqual(expectedLocation.DampingFactorPL3, actualLocation.DampingFactorPL3, cTolerance); } @@ -60,10 +59,6 @@ const double trafficLoad = 0.0; const double tL_DegreeOfConsolidation = 0.0; const PLLineCreationMethod plLineCreationMethod = PLLineCreationMethod.ExpertKnowledgeRRD; - const double plLineOffsetBelowDikeTopAtRiver = 0.5; - const double plLineOffsetBelowDikeTopAtPolder = 1.5; - const double plLineOffsetBelowShoulderBaseInside = 0.1; - const double plLineOffsetBelowDikeToeAtPolder = 0.1; const double stabilityShoulderGrowSlope = 0.3333333333333; const double stabilityShoulderGrowDeltaX = 2.0; const double stabilitySlopeAdaptionDeltaX = 2.0; @@ -77,14 +72,6 @@ Assert.AreEqual(trafficLoad, actualLocation.TrafficLoad); Assert.AreEqual(tL_DegreeOfConsolidation, actualLocation.TL_DegreeOfConsolidation); Assert.AreEqual(plLineCreationMethod, actualLocation.PLLineCreationMethod); - Assert.AreEqual(plLineOffsetBelowDikeTopAtRiver, actualLocation.PlLineOffsetBelowDikeTopAtRiver); - Assert.AreEqual(plLineOffsetBelowDikeTopAtPolder, actualLocation.PlLineOffsetBelowDikeTopAtPolder); - Assert.AreEqual(plLineOffsetBelowShoulderBaseInside, actualLocation.PlLineOffsetBelowShoulderBaseInside); - Assert.AreEqual(plLineOffsetBelowDikeToeAtPolder, actualLocation.PlLineOffsetBelowDikeToeAtPolder); - Assert.AreEqual(null, actualLocation.PlLineOffsetBelowDikeCrestMiddle); - Assert.AreEqual(null, actualLocation.PlLineOffsetFactorBelowShoulderCrest); - Assert.AreEqual(null, actualLocation.UsePlLineOffsetBelowDikeCrestMiddle); - Assert.AreEqual(null, actualLocation.UsePlLineOffsetFactorBelowShoulderCrest); Assert.AreEqual(IntrusionVerticalWaterPressureType.Standard, actualLocation.IntrusionVerticalWaterPressure); Assert.AreEqual(stabilityShoulderGrowSlope, actualLocation.StabilityShoulderGrowSlope, 1e-12); Assert.AreEqual(stabilityShoulderGrowDeltaX, actualLocation.StabilityShoulderGrowDeltaX); @@ -103,123 +90,6 @@ Assert.AreEqual(expected, location.PolderLevel); } } - - [Test] - public void RiverLevel_ReadWrite_ShouldGiveExpectedResult() - { - // setup - const double expected = 1.1; - using (var location = new Location("test") {RiverLevel = expected}) - { - // checks - Assert.AreEqual(expected, location.RiverLevel); - } - } - - [Test] - [TestCase("ModelFactorRequiredSafetyFactorPiping")] - [TestCase("ModelFactorRequiredSafetyFactorStabilityInnerSlope")] - [TestCase("ModelFactorRequiredSafetyFactorStabilityOuterSlope")] - [TestCase("UpliftCriterionStability")] - [TestCase("UpliftCriterionPiping")] - [TestCase("PlLineOffsetBelowDikeToeAtPolder")] - [TestCase("PlLineOffsetBelowDikeTopAtPolder")] - [TestCase("PlLineOffsetBelowDikeTopAtRiver")] - [TestCase("PlLineOffsetBelowShoulderBaseInside")] - [TestCase("PlLineOffsetBelowDikeCrestMiddle")] - [TestCase("PlLineOffsetFactorBelowShoulderCrest")] - [TestCase("UsePlLineOffsetBelowDikeCrestMiddle")] - [TestCase("UsePlLineOffsetFactorBelowShoulderCrest")] - [TestCase("HeadPl3")] - [TestCase("HeadPl4")] - [TestCase("DikeTableHeight")] - [TestCase("RiverLevel")] - [TestCase("RiverLevelLow")] - public void DamProjectTypeInDesignMode_ScenarioParameters_ReturnsExpectedVisibility(string propertyName) - { - // Setup - Location.DamProjectType = DamProjectType.Design; - var location = new Location(); - - // Call - var isVisible = location.IsVisible(propertyName); - - // Assert - Assert.IsFalse(isVisible); - } - - [Test] - [TestCase("ModelFactorRequiredSafetyFactorPiping", false)] - [TestCase("ModelFactorRequiredSafetyFactorStabilityInnerSlope", false)] - [TestCase("ModelFactorRequiredSafetyFactorStabilityOuterSlope", false)] - [TestCase("UpliftCriterionStability", true)] - [TestCase("UpliftCriterionPiping", true)] - [TestCase("PlLineOffsetBelowDikeToeAtPolder", false)] - [TestCase("PlLineOffsetBelowDikeTopAtPolder", false)] - [TestCase("PlLineOffsetBelowDikeTopAtRiver", false)] - [TestCase("PlLineOffsetBelowShoulderBaseInside", false)] - [TestCase("PlLineOffsetBelowDikeCrestMiddle", false)] - [TestCase("PlLineOffsetFactorBelowShoulderCrest", false)] - [TestCase("UsePlLineOffsetBelowDikeCrestMiddle", false)] - [TestCase("UsePlLineOffsetFactorBelowShoulderCrest", false)] - [TestCase("HeadPl3", true)] - [TestCase("HeadPl4", true)] - [TestCase("DikeTableHeight", true)] - [TestCase("RiverLevel", true)] - [TestCase("RiverLevelLow", true)] - public void DamProjectTypeInNotDesignModeAndPLLineCreationMethodWithoutRequiredExpertKnowledge_ScenarioParameters_ReturnsExpectedVisibility( - string propertyName, - bool expectedVisibility) - { - // Setup - Location.DamProjectType = DamProjectType.Calamity; - var location = new Location - { - PLLineCreationMethod = PLLineCreationMethod.ExpertKnowledgeLinearInDike - }; - - // Call - var isVisible = location.IsVisible(propertyName); - - // Assert - Assert.AreEqual(expectedVisibility, isVisible); - } - - [Test] - [TestCase("ModelFactorRequiredSafetyFactorPiping", false)] - [TestCase("ModelFactorRequiredSafetyFactorStabilityInnerSlope", false)] - [TestCase("ModelFactorRequiredSafetyFactorStabilityOuterSlope", false)] - [TestCase("UpliftCriterionStability", true)] - [TestCase("UpliftCriterionPiping", true)] - [TestCase("PlLineOffsetBelowDikeToeAtPolder", true)] - [TestCase("PlLineOffsetBelowDikeTopAtPolder", true)] - [TestCase("PlLineOffsetBelowDikeTopAtRiver", true)] - [TestCase("PlLineOffsetBelowShoulderBaseInside", true)] - [TestCase("PlLineOffsetBelowDikeCrestMiddle", true)] - [TestCase("PlLineOffsetFactorBelowShoulderCrest", true)] - [TestCase("UsePlLineOffsetBelowDikeCrestMiddle", true)] - [TestCase("UsePlLineOffsetFactorBelowShoulderCrest", true)] - [TestCase("HeadPl3", true)] - [TestCase("HeadPl4", true)] - [TestCase("DikeTableHeight", true)] - [TestCase("RiverLevel", true)] - [TestCase("RiverLevelLow", true)] - public void DamProjectTypeInNotDesignModeAndPLLineCreationMethodWithRequiredExpertKnowledge_ScenarioParameters_ReturnsExpectedVisibility( - string propertyName, - bool expectedVisibility) - { - // Setup - Location.DamProjectType = DamProjectType.Calamity; - var location = new Location - { - PLLineCreationMethod = PLLineCreationMethod.ExpertKnowledgeRRD - }; - - // Call - var isVisible = location.IsVisible(propertyName); - - // Assert - Assert.AreEqual(expectedVisibility, isVisible); - } } + } \ No newline at end of file