Index: Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/TestCalculationWithForeshoreProfileTest.cs =================================================================== diff -u -rb046a5ad0ed9a756aea88e9c0ad543bf657877f9 -rc37f276833a0c2638b9514f528f3434c8d68199c --- Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/TestCalculationWithForeshoreProfileTest.cs (.../TestCalculationWithForeshoreProfileTest.cs) (revision b046a5ad0ed9a756aea88e9c0ad543bf657877f9) +++ Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/TestCalculationWithForeshoreProfileTest.cs (.../TestCalculationWithForeshoreProfileTest.cs) (revision c37f276833a0c2638b9514f528f3434c8d68199c) @@ -19,7 +19,9 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using Core.Common.Base; using NUnit.Framework; +using Ringtoets.Common.Data.Calculation; namespace Ringtoets.Common.Data.TestUtil.Test { @@ -34,9 +36,16 @@ TestCalculationWithForeshoreProfile.CreateDefaultCalculation(); // Assert + Assert.IsInstanceOf(calculation); + Assert.IsInstanceOf(calculation); Assert.IsFalse(calculation.HasOutput); - Assert.IsNull(calculation.InputParameters.ForeshoreProfile); Assert.IsNull(calculation.Comments); + + TestCalculationWithForeshoreProfile.TestCalculationInputWithForeshoreProfile input = + calculation.InputParameters; + Assert.IsNull(input.ForeshoreProfile); + Assert.IsFalse(input.UseForeshore); + Assert.IsNull(input.ForeshoreGeometry); } [Test] @@ -57,9 +66,24 @@ TestCalculationWithForeshoreProfile.CreateCalculationWithOutput(foreshoreProfile); // Assert + Assert.IsInstanceOf(calculation); + Assert.IsInstanceOf(calculation); Assert.IsTrue(calculation.HasOutput); - Assert.AreSame(foreshoreProfile, calculation.InputParameters.ForeshoreProfile); Assert.IsNull(calculation.Comments); + + TestCalculationWithForeshoreProfile.TestCalculationInputWithForeshoreProfile input = + calculation.InputParameters; + Assert.AreSame(foreshoreProfile, input.ForeshoreProfile); + Assert.IsFalse(input.UseForeshore); + + if (hasForeshoreProfile) + { + Assert.AreSame(foreshoreProfile.Geometry, input.ForeshoreGeometry); + } + else + { + Assert.IsNull(input.ForeshoreGeometry); + } } [Test] @@ -80,9 +104,24 @@ TestCalculationWithForeshoreProfile.CreateCalculationWithoutOutput(foreshoreProfile); // Assert + Assert.IsInstanceOf(calculation); + Assert.IsInstanceOf(calculation); Assert.IsFalse(calculation.HasOutput); - Assert.AreSame(foreshoreProfile, calculation.InputParameters.ForeshoreProfile); Assert.IsNull(calculation.Comments); + + TestCalculationWithForeshoreProfile.TestCalculationInputWithForeshoreProfile input = + calculation.InputParameters; + Assert.AreSame(foreshoreProfile, input.ForeshoreProfile); + Assert.IsFalse(input.UseForeshore); + + if (hasForeshoreProfile) + { + Assert.AreSame(foreshoreProfile.Geometry, input.ForeshoreGeometry); + } + else + { + Assert.IsNull(input.ForeshoreGeometry); + } } [Test]