Index: DamClients/DamUI/trunk/src/Dam/Tests/LoadCompatiblityTest.cs
===================================================================
diff -u -r2808 -r2817
--- DamClients/DamUI/trunk/src/Dam/Tests/LoadCompatiblityTest.cs (.../LoadCompatiblityTest.cs) (revision 2808)
+++ DamClients/DamUI/trunk/src/Dam/Tests/LoadCompatiblityTest.cs (.../LoadCompatiblityTest.cs) (revision 2817)
@@ -111,7 +111,31 @@
},
};
+ location.Scenarios.Add(new Scenario()
+ {
+ LocationScenarioID = "1",
+ RiverLevel = 0.98,
+ RiverLevelLow = 0.98,
+ DikeTableHeight = 2.31,
+ PolderLevel = -1.3,
+ HeadPl2 = -1.3,
+ HeadPl3 = -1.6,
+ HeadPl4 = null,
+ PlLineOffsetBelowDikeTopAtRiver = 0.5, // actual value
+ PlLineOffsetBelowDikeTopAtPolder = 1.5, // actual value
+ PlLineOffsetBelowShoulderBaseInside = 0.1,
+ PlLineOffsetBelowDikeToeAtPolder = 0.1, // actual value
+
+ ModelFactors = new ModelFactors
+ {
+ UpliftCriterionPiping = 1.2,
+ UpliftCriterionStability = 1.2,
+ RequiredSafetyFactorStabilityInnerSlope = 1.16,
+ RequiredSafetyFactorStabilityOuterSlope = 1.0,
+ },
+ });
+
var soilProfile = new SoilProfile1D {Name = "Segment_234_1D1", BottomLevel = -29};
soilProfile.Layers.Add(new SoilLayer1D(new Soil { Name = "HHNK1_kade" }, 30) {IsAquifer = false} );
soilProfile.Layers.Add(new SoilLayer1D(new Soil { Name = "HHNK1_Tfo" }, -1) { IsAquifer = false } );
@@ -312,8 +336,20 @@
}
}
+ /// Determines whether a project of version 18.1.3 is loaded correctly.
+ /// This test fails, because the following properties were moved from Location to location.Scenarios[]
+ /// - PolderLevel
+ /// - HeadPl2
+ /// - HeadPl3
+ /// - HeadPl4
+ /// And this is not handled correctly
+ ///
+ /// The project filename.
+ /// Expected name of the soilbase.
+ /// Name of the location.
[Test]
[Category("Integration")]
+ [Category(Categories.WorkInProgress)]
[TestCase(@"HHNK\TPL_Hempolder.damx", @"HHNK\TPL_Hempolder0.soilmaterials.mdb", "TPL_Hempolder_0100")]
[TestCase(@"HHNKRegionalDesign\HHNK HemPolder Regional Design.damx", @"HHNKRegionalDesign\HHNK HemPolder Regional Design0.soilmaterials.mdb", "TPL_Hempolder_0100")]
public void CanLoadVersion_18_1_3(string projectFilename, string expectedSoilbaseName, string locationName)
@@ -337,6 +373,9 @@
var result = compare.Compare(expectedLocation, actualLocation);
Assert.AreEqual(0, result.Differences.Count, result.DifferencesString);
+ result = compare.Compare(expectedLocation.Scenarios[0], actualLocation.Scenarios[0]);
+ Assert.AreEqual(0, result.Differences.Count, result.DifferencesString);
+
CheckHempolderSurfaceline(actualLocation);
}
@@ -346,8 +385,18 @@
}
}
+ /// Determines whether a project of version 19.1.1 is loaded correctly.
+ /// This test fails, because the following properties were moved from Location to location.Scenarios[]
+ /// - PolderLevel
+ /// - HeadPl2
+ /// And this is not handled correctly
+ ///
+ /// The project filename.
+ /// Expected name of the soilbase.
+ /// Name of the location.
[Test]
[Category("Integration")]
+ [Category(Categories.WorkInProgress)]
[TestCase(@"HHNKRegionalDesign\HHNK HemPolder Regional Design.damx", @"HHNKRegionalDesign\HHNK HemPolder Regional Design0.soilmaterials.mdb", "TPL_Hempolder_0100")]
public void CanLoadVersion_19_1_1(string projectFilename, string expectedSoilbaseName, string locationName)
{
@@ -369,10 +418,10 @@
CompareSegments(expectedLocation, actualLocation);
var result = compare.Compare(expectedLocation, actualLocation);
Assert.AreEqual(0, result.Differences.Count, result.DifferencesString);
-// TODO: Compare scenarios
-// result = compare.Compare(expectedLocation.Scenarios, actualLocation.Scenarios);
-// Assert.AreEqual(0, result.Differences.Count, result.DifferencesString);
+ result = compare.Compare(expectedLocation.Scenarios[0], actualLocation.Scenarios[0]);
+ Assert.AreEqual(0, result.Differences.Count, result.DifferencesString);
+
CheckHempolderSurfaceline(actualLocation);
}