Index: DamClients/DamUI/trunk/src/Dam/Tests/LoadCompatiblityTest.cs =================================================================== diff -u -r2159 -r2160 --- DamClients/DamUI/trunk/src/Dam/Tests/LoadCompatiblityTest.cs (.../LoadCompatiblityTest.cs) (revision 2159) +++ DamClients/DamUI/trunk/src/Dam/Tests/LoadCompatiblityTest.cs (.../LoadCompatiblityTest.cs) (revision 2160) @@ -264,10 +264,27 @@ { Assert.AreEqual(location.PlLineOffsetBelowDikeCrestMiddle.Value, scenario.PlLineOffsetBelowDikeCrestMiddle.Value, cTolerance); } - Assert.AreEqual(location.PlLineOffsetBelowDikeToeAtPolder, scenario.PlLineOffsetBelowDikeToeAtPolder, cTolerance); - Assert.AreEqual(location.PlLineOffsetBelowDikeTopAtPolder, scenario.PlLineOffsetBelowDikeTopAtPolder, cTolerance); - Assert.AreEqual(location.PlLineOffsetBelowDikeTopAtRiver, scenario.PlLineOffsetBelowDikeTopAtRiver, cTolerance); - Assert.AreEqual(location.PlLineOffsetBelowShoulderBaseInside, scenario.PlLineOffsetBelowShoulderBaseInside, cTolerance); + + if (scenario.PlLineOffsetBelowDikeToeAtPolder.HasValue) + { + Assert.AreEqual(location.PlLineOffsetBelowDikeToeAtPolder, scenario.PlLineOffsetBelowDikeToeAtPolder, cTolerance); + } + + if (scenario.PlLineOffsetBelowDikeTopAtPolder.HasValue) + { + Assert.AreEqual(location.PlLineOffsetBelowDikeTopAtPolder, scenario.PlLineOffsetBelowDikeTopAtPolder, cTolerance); + } + + if (scenario.PlLineOffsetBelowDikeTopAtRiver.HasValue) + { + Assert.AreEqual(location.PlLineOffsetBelowDikeTopAtRiver, scenario.PlLineOffsetBelowDikeTopAtRiver, cTolerance); + } + + if (scenario.PlLineOffsetBelowShoulderBaseInside.HasValue) + { + Assert.AreEqual(location.PlLineOffsetBelowShoulderBaseInside, scenario.PlLineOffsetBelowShoulderBaseInside, cTolerance); + } + if (location.UsePlLineOffsetFactorBelowShoulderCrest != null) { Assert.AreEqual(location.UsePlLineOffsetFactorBelowShoulderCrest.Value, scenario.UsePlLineOffsetFactorBelowShoulderCrest.Value); @@ -276,11 +293,11 @@ { Assert.AreEqual(location.PlLineOffsetFactorBelowShoulderCrest.Value, scenario.PlLineOffsetFactorBelowShoulderCrest.Value, cTolerance); } - if (location.HeadPl3 != null) + if (location.HeadPl3 != null && scenario.HeadPl3.HasValue) { Assert.AreEqual(location.HeadPl3.Value, scenario.HeadPl3.Value, cTolerance); } - if (location.HeadPl4 != null) + if (location.HeadPl4 != null && scenario.HeadPl4.HasValue) { Assert.AreEqual(location.HeadPl4.Value, scenario.HeadPl4.Value, cTolerance); }