Index: Ringtoets/Integration/test/Ringtoets.Integration.Service.Test/Comparers/AssessmentSectionMergeComparerTest.cs =================================================================== diff -u -r2a81f01756e227d5ce93717b21b87e8a5cd5fcbb -r739c37f3a0c1938b48bd48a2d7a90ea760edffd3 --- Ringtoets/Integration/test/Ringtoets.Integration.Service.Test/Comparers/AssessmentSectionMergeComparerTest.cs (.../AssessmentSectionMergeComparerTest.cs) (revision 2a81f01756e227d5ce93717b21b87e8a5cd5fcbb) +++ Ringtoets/Integration/test/Ringtoets.Integration.Service.Test/Comparers/AssessmentSectionMergeComparerTest.cs (.../AssessmentSectionMergeComparerTest.cs) (revision 739c37f3a0c1938b48bd48a2d7a90ea760edffd3) @@ -21,6 +21,7 @@ using System; using System.Collections.Generic; +using System.Linq; using Core.Common.Base.Geometry; using Core.Common.TestUtil; using NUnit.Framework; @@ -75,16 +76,16 @@ [Test] [TestCase(true)] [TestCase(false)] - public void Compare_AssessmentSectionsHaveEquivalentReferenceLines_ReturnsTrue(bool hasReferenceLine) + public void Compare_AssessmentSectionsHaveEquivalentReferenceLines_ReturnsTrue(bool referenceLineImported) { // Setup AssessmentSection assessmentSection = CreateAssessmentSection(); AssessmentSection otherAssessmentSection = CreateAssessmentSection(); - if (!hasReferenceLine) + if (!referenceLineImported) { - assessmentSection.ReferenceLine = null; - otherAssessmentSection.ReferenceLine = null; + assessmentSection.ReferenceLine.SetGeometry(Enumerable.Empty()); + otherAssessmentSection.ReferenceLine.SetGeometry(Enumerable.Empty()); } var comparer = new AssessmentSectionMergeComparer(); @@ -112,16 +113,14 @@ private static AssessmentSection CreateAssessmentSection() { - var referenceLine = new ReferenceLine(); - referenceLine.SetGeometry(new[] + var assessmentSection = new AssessmentSection(AssessmentSectionComposition.Dike, 0.1, 0.025); + assessmentSection.ReferenceLine.SetGeometry(new[] { new Point2D(1, 1), new Point2D(1, 2) }); - return new AssessmentSection(AssessmentSectionComposition.Dike, 0.1, 0.025) - { - ReferenceLine = referenceLine - }; + + return assessmentSection; } private static IEnumerable GetUnequivalentAssessmentSectionTestCases() @@ -141,18 +140,23 @@ { new Point2D(1, 1) }); - yield return new ChangePropertyData(sec => sec.ReferenceLine = referenceLineDifferentPointCount, + yield return new ChangePropertyData(sec => sec.ReferenceLine.SetGeometry(new[] + { + new Point2D(1, 1) + }), "Referenceline different point count"); - yield return new ChangePropertyData(sec => sec.ReferenceLine = null, - "Referenceline null"); var referenceLineDifferentPoint = new ReferenceLine(); referenceLineDifferentPoint.SetGeometry(new[] { new Point2D(1, 1), new Point2D(1, 3) }); - yield return new ChangePropertyData(sec => sec.ReferenceLine = referenceLineDifferentPoint, + yield return new ChangePropertyData(sec => sec.ReferenceLine.SetGeometry(new[] + { + new Point2D(1, 1), + new Point2D(1, 3) + }), "Referenceline different point"); yield return new ChangePropertyData(sec => sec.Id = "DifferentVersion",