Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/ForeshoreProfileEntityReadExtensions.cs =================================================================== diff -u -rb2b9fdf365e70928a05c57966eeed30d9050e528 -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/ForeshoreProfileEntityReadExtensions.cs (.../ForeshoreProfileEntityReadExtensions.cs) (revision b2b9fdf365e70928a05c57966eeed30d9050e528) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/ForeshoreProfileEntityReadExtensions.cs (.../ForeshoreProfileEntityReadExtensions.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -62,6 +62,7 @@ CreateBreakWater(entity.BreakWaterType, entity.BreakWaterHeight), new ForeshoreProfile.ConstructionProperties { + Id = "fixthis", Name = entity.Name.DeepClone(), Orientation = entity.Orientation.ToNullAsNaN(), X0 = entity.X0.ToNullAsNaN() Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/GrassCoverErosionInwards/DikeProfileEntityReadExtensions.cs =================================================================== diff -u -rb2b9fdf365e70928a05c57966eeed30d9050e528 -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/GrassCoverErosionInwards/DikeProfileEntityReadExtensions.cs (.../DikeProfileEntityReadExtensions.cs) (revision b2b9fdf365e70928a05c57966eeed30d9050e528) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/GrassCoverErosionInwards/DikeProfileEntityReadExtensions.cs (.../DikeProfileEntityReadExtensions.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -69,6 +69,7 @@ { return new DikeProfile.ConstructionProperties { + Id = "fixme", Name = entity.Name, Orientation = entity.Orientation.ToNullAsNaN(), DikeHeight = entity.DikeHeight.ToNullAsNaN(), Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/ForeshoreProfileCreateExtensionsTest.cs =================================================================== diff -u -r545b105a213ed85564861b4bcf6d2d6425dbde50 -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/ForeshoreProfileCreateExtensionsTest.cs (.../ForeshoreProfileCreateExtensionsTest.cs) (revision 545b105a213ed85564861b4bcf6d2d6425dbde50) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/ForeshoreProfileCreateExtensionsTest.cs (.../ForeshoreProfileCreateExtensionsTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -60,6 +60,7 @@ var foreshoreProfile = new ForeshoreProfile(new Point2D(0, 0), Enumerable.Empty(), null, new ForeshoreProfile.ConstructionProperties { + Id = "fpid", Name = name, Orientation = orientation, X0 = x0 @@ -89,6 +90,7 @@ new BreakWater(BreakWaterType.Caisson, double.NaN), new ForeshoreProfile.ConstructionProperties { + Id = "id", Orientation = double.NaN, X0 = double.NaN }); @@ -114,7 +116,7 @@ new Point2D(0, 0), new Point2D(0, 0) }; - var foreshoreProfile = new ForeshoreProfile(new Point2D(0, 0), geometryPoints, null, new ForeshoreProfile.ConstructionProperties()); + var foreshoreProfile = new TestForeshoreProfile(geometryPoints); var registry = new PersistenceRegistry(); // Call @@ -132,10 +134,7 @@ // Setup double height = new Random(21).NextDouble(); var breakWaterType = BreakWaterType.Caisson; - var foreshoreProfile = new ForeshoreProfile(new Point2D(0, 0), - Enumerable.Empty(), - new BreakWater(breakWaterType, height), - new ForeshoreProfile.ConstructionProperties()); + var foreshoreProfile = new TestForeshoreProfile(new BreakWater(breakWaterType, height)); var registry = new PersistenceRegistry(); // Call @@ -152,10 +151,7 @@ { // Setup string testName = "original name"; - var foreshoreProfile = new ForeshoreProfile(new Point2D(0, 0), Enumerable.Empty(), null, new ForeshoreProfile.ConstructionProperties - { - Name = testName - }); + var foreshoreProfile = new TestForeshoreProfile(testName); var registry = new PersistenceRegistry(); // Call Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionInwards/DikeProfileCreateExtensionsTest.cs =================================================================== diff -u -rb73d9512e3a69a17d8be939d91cb655d20aa64f2 -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionInwards/DikeProfileCreateExtensionsTest.cs (.../DikeProfileCreateExtensionsTest.cs) (revision b73d9512e3a69a17d8be939d91cb655d20aa64f2) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionInwards/DikeProfileCreateExtensionsTest.cs (.../DikeProfileCreateExtensionsTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -27,6 +27,7 @@ using Core.Common.Base.Geometry; using NUnit.Framework; using Ringtoets.Common.Data.DikeProfiles; +using Ringtoets.Common.Data.TestUtil; namespace Application.Ringtoets.Storage.Test.Create.GrassCoverErosionInwards { @@ -37,19 +38,7 @@ public void Create_RegistryIsNull_ThrowArgumentNullException() { // Setup - var dikeProfile = new DikeProfile(new Point2D(1.1, 2.2), - new[] - { - new RoughnessPoint(new Point2D(3.3, 4.4), 0.75), - new RoughnessPoint(new Point2D(5.5, 6.6), 0.75) - }, - new[] - { - new Point2D(7.7, 8.8), - new Point2D(9.9, 10.10) - }, - null, - new DikeProfile.ConstructionProperties()); + var dikeProfile = new TestDikeProfile(); // Call TestDelegate call = () => dikeProfile.Create(null, 0); @@ -78,6 +67,7 @@ null, new DikeProfile.ConstructionProperties { + Id = "fixme", Name = "Dike profile without break water.", DikeHeight = 11.11, Orientation = 12.12, @@ -116,6 +106,7 @@ null, new DikeProfile.ConstructionProperties { + Id = "fixme", Name = originalName }); var registry = new PersistenceRegistry(); @@ -151,6 +142,7 @@ new BreakWater(type, height), new DikeProfile.ConstructionProperties { + Id = "fixme", Name = "Dike profile without break water.", DikeHeight = 98.76, Orientation = 76.54, @@ -182,17 +174,7 @@ public void Create_DikeProfileAlreadyRegistered_ReturnRegisteredEntity() { // Setup - var dikeProfile = new DikeProfile(new Point2D(1.1, 2.2), - new[] - { - new RoughnessPoint(new Point2D(3.3, 4.4), 0.75), - new RoughnessPoint(new Point2D(5.5, 6.6), 0.75) - }, - new[] - { - new Point2D(7.7, 8.8), - new Point2D(9.9, 10.10) - }, null, new DikeProfile.ConstructionProperties()); + var dikeProfile = new TestDikeProfile(); var registry = new PersistenceRegistry(); DikeProfileEntity entity1 = dikeProfile.Create(registry, 0); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionInwards/GrassCoverErosionInwardsFailureMechanismCreateExtensionsTest.cs =================================================================== diff -u -rb4e3629ea2130359117dd403af8db3c8ae0c680b -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionInwards/GrassCoverErosionInwardsFailureMechanismCreateExtensionsTest.cs (.../GrassCoverErosionInwardsFailureMechanismCreateExtensionsTest.cs) (revision b4e3629ea2130359117dd403af8db3c8ae0c680b) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionInwards/GrassCoverErosionInwardsFailureMechanismCreateExtensionsTest.cs (.../GrassCoverErosionInwardsFailureMechanismCreateExtensionsTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -29,6 +29,7 @@ using NUnit.Framework; using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.DikeProfiles; +using Ringtoets.Common.Data.TestUtil; using Ringtoets.GrassCoverErosionInwards.Data; namespace Application.Ringtoets.Storage.Test.Create.GrassCoverErosionInwards @@ -180,33 +181,8 @@ { // Setup var failureMechanism = new GrassCoverErosionInwardsFailureMechanism(); - failureMechanism.DikeProfiles.Add(new DikeProfile(new Point2D(0, 0), - new[] - { - new RoughnessPoint(new Point2D(1, 1), 0.75), - new RoughnessPoint(new Point2D(2, 2), 0.75), - }, - new[] - { - new Point2D(3, 3), - new Point2D(4, 4), - }, - null, new DikeProfile.ConstructionProperties())); - failureMechanism.DikeProfiles.Add(new DikeProfile(new Point2D(5, 5), - new[] - { - new RoughnessPoint(new Point2D(6, 6), 1), - new RoughnessPoint(new Point2D(7, 7), 1), - }, - new Point2D[0], - new BreakWater(BreakWaterType.Caisson, 8), - new DikeProfile.ConstructionProperties - { - Name = "A", - DikeHeight = 9, - Orientation = 10, - X0 = 11 - })); + failureMechanism.DikeProfiles.Add(new TestDikeProfile()); + failureMechanism.DikeProfiles.Add(new TestDikeProfile()); var registry = new PersistenceRegistry(); // Call Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionOutwards/GrassCoverErosionOutwardsWaveConditionsCalculationCreateExtensionsTest.cs =================================================================== diff -u -rf2e108cd25b68267d9484249eac3c6ea0db6a7b6 -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionOutwards/GrassCoverErosionOutwardsWaveConditionsCalculationCreateExtensionsTest.cs (.../GrassCoverErosionOutwardsWaveConditionsCalculationCreateExtensionsTest.cs) (revision f2e108cd25b68267d9484249eac3c6ea0db6a7b6) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionOutwards/GrassCoverErosionOutwardsWaveConditionsCalculationCreateExtensionsTest.cs (.../GrassCoverErosionOutwardsWaveConditionsCalculationCreateExtensionsTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -198,10 +198,7 @@ { InputParameters = { - ForeshoreProfile = new ForeshoreProfile(new Point2D(1, 2), - Enumerable.Empty(), - new BreakWater(BreakWaterType.Caisson, 2), - new ForeshoreProfile.ConstructionProperties()) + ForeshoreProfile = new TestForeshoreProfile() } }; Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/PersistenceRegistryTest.cs =================================================================== diff -u -r489cbf6d1e84948fe927655e1a9bd4fcb4968bfe -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/PersistenceRegistryTest.cs (.../PersistenceRegistryTest.cs) (revision 489cbf6d1e84948fe927655e1a9bd4fcb4968bfe) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/PersistenceRegistryTest.cs (.../PersistenceRegistryTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -62,7 +62,10 @@ new Point2D(5, 6), new Point2D(7, 8) }, - null, new DikeProfile.ConstructionProperties()); + null, new DikeProfile.ConstructionProperties + { + Id = "id" + }); } #region Contains methods Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StabilityStoneCover/StabilityStoneCoverWaveConditionsCalculationCreateExtensionsTest.cs =================================================================== diff -u -rf2e108cd25b68267d9484249eac3c6ea0db6a7b6 -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StabilityStoneCover/StabilityStoneCoverWaveConditionsCalculationCreateExtensionsTest.cs (.../StabilityStoneCoverWaveConditionsCalculationCreateExtensionsTest.cs) (revision f2e108cd25b68267d9484249eac3c6ea0db6a7b6) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StabilityStoneCover/StabilityStoneCoverWaveConditionsCalculationCreateExtensionsTest.cs (.../StabilityStoneCoverWaveConditionsCalculationCreateExtensionsTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -197,10 +197,7 @@ { InputParameters = { - ForeshoreProfile = new ForeshoreProfile(new Point2D(1, 2), - Enumerable.Empty(), - new BreakWater(BreakWaterType.Caisson, 2), - new ForeshoreProfile.ConstructionProperties()) + ForeshoreProfile = new TestForeshoreProfile() } }; Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StructuresCalculationCreateExtensionsTest.cs =================================================================== diff -u -r6ced2c3bd4adaef7cf2363ba75a84911b09c3924 -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StructuresCalculationCreateExtensionsTest.cs (.../StructuresCalculationCreateExtensionsTest.cs) (revision 6ced2c3bd4adaef7cf2363ba75a84911b09c3924) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StructuresCalculationCreateExtensionsTest.cs (.../StructuresCalculationCreateExtensionsTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -698,10 +698,7 @@ public void CreateForClosingStructures_CalculationWithForeshoreProfile_ReturnEntityWithForeshoreProfileEntity() { // Setup - var alreadyRegisteredForeshoreProfile = new ForeshoreProfile(new Point2D(0, 0), - new Point2D[0], - null, - new ForeshoreProfile.ConstructionProperties()); + var alreadyRegisteredForeshoreProfile = new TestForeshoreProfile(); var calculation = new StructuresCalculation { InputParameters = @@ -1212,10 +1209,7 @@ public void CreateForStabilityPointStructures_CalculationWithForeshoreProfile_ReturnEntityWithForeshoreProfileEntity() { // Setup - var alreadyRegisteredForeshoreProfile = new ForeshoreProfile(new Point2D(0, 0), - new Point2D[0], - null, - new ForeshoreProfile.ConstructionProperties()); + var alreadyRegisteredForeshoreProfile = new TestForeshoreProfile(); var calculation = new StructuresCalculation { InputParameters = Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/WaveImpactAsphaltCover/WaveImpactAsphaltCoverWaveConditionsCalculationCreateExtensionsTest.cs =================================================================== diff -u -r2c148643f3a974b4597deab67fee4590c8575cc3 -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/WaveImpactAsphaltCover/WaveImpactAsphaltCoverWaveConditionsCalculationCreateExtensionsTest.cs (.../WaveImpactAsphaltCoverWaveConditionsCalculationCreateExtensionsTest.cs) (revision 2c148643f3a974b4597deab67fee4590c8575cc3) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/WaveImpactAsphaltCover/WaveImpactAsphaltCoverWaveConditionsCalculationCreateExtensionsTest.cs (.../WaveImpactAsphaltCoverWaveConditionsCalculationCreateExtensionsTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -196,10 +196,7 @@ { InputParameters = { - ForeshoreProfile = new ForeshoreProfile(new Point2D(1, 2), - Enumerable.Empty(), - new BreakWater(BreakWaterType.Caisson, 2), - new ForeshoreProfile.ConstructionProperties()) + ForeshoreProfile = new TestForeshoreProfile() } }; Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ClosingStructures/ClosingStructuresCalculationEntityReadExtensionsTest.cs =================================================================== diff -u -r8e8f8c83c45656f65adaa8e47600379dc5ae8f61 -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ClosingStructures/ClosingStructuresCalculationEntityReadExtensionsTest.cs (.../ClosingStructuresCalculationEntityReadExtensionsTest.cs) (revision 8e8f8c83c45656f65adaa8e47600379dc5ae8f61) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ClosingStructures/ClosingStructuresCalculationEntityReadExtensionsTest.cs (.../ClosingStructuresCalculationEntityReadExtensionsTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -30,6 +30,7 @@ using Ringtoets.Common.Data.DikeProfiles; using Ringtoets.Common.Data.Hydraulics; using Ringtoets.Common.Data.Structures; +using Ringtoets.Common.Data.TestUtil; namespace Application.Ringtoets.Storage.Test.Read.ClosingStructures { @@ -275,8 +276,7 @@ public void Read_EntityWithForeshoreProfileEntity_ReturnCalculationWithForeshoreProfile() { // Setup - var profile = new ForeshoreProfile(new Point2D(0, 0), new Point2D[0], - null, new ForeshoreProfile.ConstructionProperties()); + var profile = new TestForeshoreProfile(); var profileEntity = new ForeshoreProfileEntity(); var entity = new ClosingStructuresCalculationEntity { Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/IStructureCalculationEntityReadExtensionsTest.cs =================================================================== diff -u -r8e8f8c83c45656f65adaa8e47600379dc5ae8f61 -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/IStructureCalculationEntityReadExtensionsTest.cs (.../IStructureCalculationEntityReadExtensionsTest.cs) (revision 8e8f8c83c45656f65adaa8e47600379dc5ae8f61) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/IStructureCalculationEntityReadExtensionsTest.cs (.../IStructureCalculationEntityReadExtensionsTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -174,8 +174,7 @@ public void Read_EntityWithForeshoreProfileEntity_InputObjectUpdatedWithForeshoreProfile() { // Setup - var foreshoreProfile = new ForeshoreProfile(new Point2D(0, 0), new Point2D[0], - null, new ForeshoreProfile.ConstructionProperties()); + var foreshoreProfile = new TestForeshoreProfile(); var foreshoreEntity = new ForeshoreProfileEntity(); var mocks = new MockRepository(); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StabilityPointStructures/StabilityPointStructuresCalculationEntityReadExtensionsTest.cs =================================================================== diff -u -r6ced2c3bd4adaef7cf2363ba75a84911b09c3924 -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StabilityPointStructures/StabilityPointStructuresCalculationEntityReadExtensionsTest.cs (.../StabilityPointStructuresCalculationEntityReadExtensionsTest.cs) (revision 6ced2c3bd4adaef7cf2363ba75a84911b09c3924) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StabilityPointStructures/StabilityPointStructuresCalculationEntityReadExtensionsTest.cs (.../StabilityPointStructuresCalculationEntityReadExtensionsTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -28,6 +28,7 @@ using Ringtoets.Common.Data.DikeProfiles; using Ringtoets.Common.Data.Hydraulics; using Ringtoets.Common.Data.Structures; +using Ringtoets.Common.Data.TestUtil; using Ringtoets.StabilityPointStructures.Data; using Ringtoets.StabilityPointStructures.Data.TestUtil; @@ -359,8 +360,7 @@ public void Read_EntityWithForeshoreProfileEntity_ReturnCalculationWithForeshoreProfile() { // Setup - var profile = new ForeshoreProfile(new Point2D(0, 0), new Point2D[0], - null, new ForeshoreProfile.ConstructionProperties()); + var profile = new TestForeshoreProfile(); var profileEntity = new ForeshoreProfileEntity(); var entity = new StabilityPointStructuresCalculationEntity { Index: Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs =================================================================== diff -u -rfc86b96d416f7114060023c6ce714e655002788d -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs (.../RingtoetsProjectTestHelper.cs) (revision fc86b96d416f7114060023c6ce714e655002788d) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs (.../RingtoetsProjectTestHelper.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -283,12 +283,16 @@ new Point2D(8, 5) }, new BreakWater(BreakWaterType.Caisson, 2.5), new ForeshoreProfile.ConstructionProperties { + Id = "fpid", Name = "FP", Orientation = 95.5, X0 = 22.1 })); foreshoreProfiles.Add(new ForeshoreProfile( - new Point2D(2, 5), Enumerable.Empty(), null, new ForeshoreProfile.ConstructionProperties())); + new Point2D(2, 5), Enumerable.Empty(), null, new ForeshoreProfile.ConstructionProperties + { + Id = "fpid", + })); } private static ReferenceLine GetReferenceLine() @@ -852,6 +856,7 @@ new BreakWater(BreakWaterType.Caisson, 15), new DikeProfile.ConstructionProperties { + Id = "id", DikeHeight = 1.1, Name = "2.2", Orientation = 3.3, @@ -868,6 +873,7 @@ null, new DikeProfile.ConstructionProperties { + Id = "id", DikeHeight = 5.5, Name = "6.6", Orientation = 7.7, Index: Ringtoets/Common/src/Ringtoets.Common.Data/DikeProfiles/DikeProfile.cs =================================================================== diff -u -rb2b9fdf365e70928a05c57966eeed30d9050e528 -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Ringtoets/Common/src/Ringtoets.Common.Data/DikeProfiles/DikeProfile.cs (.../DikeProfile.cs) (revision b2b9fdf365e70928a05c57966eeed30d9050e528) +++ Ringtoets/Common/src/Ringtoets.Common.Data/DikeProfiles/DikeProfile.cs (.../DikeProfile.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -57,6 +57,7 @@ ForeshoreProfile = new ForeshoreProfile(worldCoordinate, foreshoreGeometry, breakWater, new ForeshoreProfile.ConstructionProperties { + Id = properties.Id, Name = properties.Name, Orientation = properties.Orientation, X0 = properties.X0 @@ -69,9 +70,20 @@ /// /// Gets the foreshore profile. /// - public ForeshoreProfile ForeshoreProfile { get; private set; } + public ForeshoreProfile ForeshoreProfile { get; } /// + /// Gets the ID of the dike profile. + /// + public string Id + { + get + { + return ForeshoreProfile.Id; + } + } + + /// /// Gets the name of the dike profile. /// public string Name @@ -192,6 +204,11 @@ public class ConstructionProperties { /// + /// Gets or sets the value for . + /// + public string Id { internal get; set; } + + /// /// Gets or sets the value for . /// public string Name { internal get; set; } Index: Ringtoets/Common/src/Ringtoets.Common.Data/DikeProfiles/ForeshoreProfile.cs =================================================================== diff -u -rb2b9fdf365e70928a05c57966eeed30d9050e528 -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Ringtoets/Common/src/Ringtoets.Common.Data/DikeProfiles/ForeshoreProfile.cs (.../ForeshoreProfile.cs) (revision b2b9fdf365e70928a05c57966eeed30d9050e528) +++ Ringtoets/Common/src/Ringtoets.Common.Data/DikeProfiles/ForeshoreProfile.cs (.../ForeshoreProfile.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -59,37 +59,47 @@ { throw new ArgumentNullException(nameof(properties)); } + if (string.IsNullOrWhiteSpace(properties.Id)) + { + throw new ArgumentException(@"Id is null, empty or consists of whitespace.", nameof(properties)); + } SetGeometry(geometry); Orientation = new RoundedDouble(2, properties.Orientation); BreakWater = breakWater; - Name = properties.Name; + Id = properties.Id; + Name = properties.Name ?? properties.Id; WorldReferencePoint = worldCoordinate; X0 = properties.X0; } /// + /// Gets the ID of the foreshore profile. + /// + public string Id { get; } + + /// /// Gets the name of the foreshore profile. /// - public string Name { get; private set; } + public string Name { get; } /// /// Gets the reference point in world coordinates corresponding to the local coordinate . /// - public Point2D WorldReferencePoint { get; private set; } + public Point2D WorldReferencePoint { get; } /// /// Gets the local x-coordinate corresponding to the world reference point . /// - public double X0 { get; private set; } + public double X0 { get; } /// /// Gets the orientation of the foreshore profile geometry with respect to North /// in degrees. A positive value equals a clockwise rotation. /// - public RoundedDouble Orientation { get; private set; } + public RoundedDouble Orientation { get; } /// /// Gets a value indicating if there is a break water object available. @@ -105,7 +115,7 @@ /// /// Gets the break water object of the foreshore profile, if any. /// - public BreakWater BreakWater { get; private set; } + public BreakWater BreakWater { get; } /// /// Gets the geometry of the foreshore profile. @@ -134,6 +144,11 @@ public class ConstructionProperties { /// + /// Gets or sets the value for . + /// + public string Id { internal get; set; } + + /// /// Gets or sets the value for . /// public string Name { internal get; set; } Index: Ringtoets/Common/src/Ringtoets.Common.Forms/UITypeEditors/ForeshoreProfileEditor.cs =================================================================== diff -u -rf861839e975251253e2ffd7bc3f0a1839b85534e -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Ringtoets/Common/src/Ringtoets.Common.Forms/UITypeEditors/ForeshoreProfileEditor.cs (.../ForeshoreProfileEditor.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/UITypeEditors/ForeshoreProfileEditor.cs (.../ForeshoreProfileEditor.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -44,6 +44,7 @@ DisplayMember = nameof(ForeshoreProfile.Name); NullItem = new ForeshoreProfile(new Point2D(0, 0), Enumerable.Empty(), null, new ForeshoreProfile.ConstructionProperties { + Id = CoreCommonControlsResources.DisplayName_None, Name = CoreCommonControlsResources.DisplayName_None }); } Index: Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/DikeProfilesImporter.cs =================================================================== diff -u -rf0546eef016ca191ca0958e00cfed380f682c80d -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/DikeProfilesImporter.cs (.../DikeProfilesImporter.cs) (revision f0546eef016ca191ca0958e00cfed380f682c80d) +++ Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/DikeProfilesImporter.cs (.../DikeProfilesImporter.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -104,6 +104,7 @@ CreateBreakWater(dikeProfileData), new DikeProfile.ConstructionProperties { + Id = dikeProfileData.Id, Name = dikeProfileData.Id, X0 = dikeProfileLocation.Offset, Orientation = dikeProfileData.Orientation, Index: Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/ForeshoreProfilesImporter.cs =================================================================== diff -u -rf0546eef016ca191ca0958e00cfed380f682c80d -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/ForeshoreProfilesImporter.cs (.../ForeshoreProfilesImporter.cs) (revision f0546eef016ca191ca0958e00cfed380f682c80d) +++ Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/ForeshoreProfilesImporter.cs (.../ForeshoreProfilesImporter.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -104,6 +104,7 @@ CreateBreakWater(dikeProfileData), new ForeshoreProfile.ConstructionProperties { + Id = dikeProfileData.Id, Name = dikeProfileData.Id, X0 = dikeProfileLocation.Offset, Orientation = dikeProfileData.Orientation Index: Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/ProfilesImporter.cs =================================================================== diff -u -rda6c157314d3df1c278d58cc444c7754a79dc656 -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/ProfilesImporter.cs (.../ProfilesImporter.cs) (revision da6c157314d3df1c278d58cc444c7754a79dc656) +++ Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/ProfilesImporter.cs (.../ProfilesImporter.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -177,7 +177,7 @@ Resources.ProfilesImporter_GetProfileLocationReadResult_Error_reading_Profile_LineNumber_0_Error_1_The_Profile_is_skipped, i + 1, exception.Message); - Log.Warn(message); + Log.Error(message, exception); } catch (CriticalFileReadException exception) { @@ -288,11 +288,7 @@ private void LogDuplicate(DikeProfileData data, string prflFilePath) { - var message = String.Format( - Resources.ProfilesImporter_LogDuplicateDikeProfileData_Multiple_DikeProfileData_found_for_DikeProfile_0_File_1_skipped, - data.Id, - prflFilePath); - Log.Error(message); + Log.WarnFormat(Resources.ProfilesImporter_LogDuplicateDikeProfileData_Multiple_DikeProfileData_found_for_DikeProfile_0_File_1_skipped, data.Id, prflFilePath); } private double GetDistanceToReferenceLine(Point2D point) Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/DikeProfiles/DikeProfileTest.cs =================================================================== diff -u -r9b0f19dce46cb8c54cd27dadb2d79888035a1aff -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Ringtoets/Common/test/Ringtoets.Common.Data.Test/DikeProfiles/DikeProfileTest.cs (.../DikeProfileTest.cs) (revision 9b0f19dce46cb8c54cd27dadb2d79888035a1aff) +++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/DikeProfiles/DikeProfileTest.cs (.../DikeProfileTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -35,6 +35,7 @@ public void Constructor_ValidParameters_ExpectedValues() { // Setup + string validId = "id"; var worldCoordinate = new Point2D(1.1, 2.2); var dikeGeometry = new[] { @@ -50,14 +51,18 @@ // Call var dikeProfile = new DikeProfile(worldCoordinate, dikeGeometry, foreshoreGeometry, - null, new DikeProfile.ConstructionProperties()); + null, new DikeProfile.ConstructionProperties + { + Id = validId + }); // Assert Assert.IsInstanceOf(dikeProfile.Orientation); Assert.IsInstanceOf(dikeProfile.DikeHeight); Assert.IsInstanceOf(dikeProfile.X0); - Assert.IsNull(dikeProfile.Name); + Assert.AreEqual(validId, dikeProfile.Id); + Assert.AreEqual(validId, dikeProfile.Name); Assert.AreSame(worldCoordinate, dikeProfile.WorldReferencePoint); Assert.AreEqual(0.0, dikeProfile.X0); Assert.AreEqual(0.0, dikeProfile.Orientation.Value); @@ -75,7 +80,10 @@ { // Call TestDelegate call = () => new DikeProfile(null, new RoughnessPoint[0], new Point2D[0], - null, new DikeProfile.ConstructionProperties()); + null, new DikeProfile.ConstructionProperties + { + Id = "id" + }); // Assert string paramName = Assert.Throws(call).ParamName; @@ -87,7 +95,10 @@ { // Call TestDelegate call = () => new DikeProfile(new Point2D(0, 0), null, new Point2D[0], - null, new DikeProfile.ConstructionProperties()); + null, new DikeProfile.ConstructionProperties + { + Id = "id" + }); // Assert var expectedMessage = "De geometrie die opgegeven werd voor het dijkprofiel heeft geen waarde."; @@ -105,7 +116,10 @@ null }, new Point2D[0], - null, new DikeProfile.ConstructionProperties()); + null, new DikeProfile.ConstructionProperties + { + Id = "id" + }); // Assert var expectedMessage = "Een punt in de geometrie voor het dijkprofiel heeft geen waarde."; @@ -117,7 +131,10 @@ { // Call TestDelegate call = () => new DikeProfile(new Point2D(0, 0), new RoughnessPoint[0], null, - null, new DikeProfile.ConstructionProperties()); + null, new DikeProfile.ConstructionProperties + { + Id = "id" + }); // Assert string paramName = Assert.Throws(call).ParamName; @@ -132,7 +149,10 @@ new Point2D[] { null - }, null, new DikeProfile.ConstructionProperties()); + }, null, new DikeProfile.ConstructionProperties + { + Id = "id" + }); // Assert var expectedMessage = "Een punt in de geometrie voor het voorlandprofiel heeft geen waarde."; @@ -157,6 +177,7 @@ var dikeProfile = new DikeProfile(new Point2D(0, 0), new RoughnessPoint[0], new Point2D[0], null, new DikeProfile.ConstructionProperties { + Id = "id", Orientation = 1.23456 }); @@ -172,6 +193,7 @@ var dikeProfile = new DikeProfile(new Point2D(0, 0), new RoughnessPoint[0], new Point2D[0], null, new DikeProfile.ConstructionProperties { + Id = "id", DikeHeight = 1.23456 }); @@ -181,15 +203,15 @@ } [Test] - [TestCase(null)] [TestCase("")] [TestCase("Cool new name!")] - public void Name_SetNewValue_GetsNewValue(string name) + public void Name_SetNameDifferentFromId_GetsGivenNameValue(string name) { // Call var dikeProfile = new DikeProfile(new Point2D(0, 0), new RoughnessPoint[0], new Point2D[0], null, new DikeProfile.ConstructionProperties { + Id = "id", Name = name }); @@ -202,7 +224,10 @@ { // Call var dikeProfile = new DikeProfile(new Point2D(0, 0), new RoughnessPoint[0], new Point2D[0], - null, new DikeProfile.ConstructionProperties()); + null, new DikeProfile.ConstructionProperties + { + Id = "id" + }); // Assert Assert.IsNull(dikeProfile.BreakWater); @@ -216,7 +241,10 @@ // Call var dikeProfile = new DikeProfile(new Point2D(0, 0), new RoughnessPoint[0], new Point2D[0], - newBreakWater, new DikeProfile.ConstructionProperties()); + newBreakWater, new DikeProfile.ConstructionProperties + { + Id = "id" + }); // Assert Assert.AreSame(newBreakWater, dikeProfile.BreakWater); @@ -227,7 +255,10 @@ { // Setup var dikeProfile = new DikeProfile(new Point2D(0, 0), new RoughnessPoint[0], new Point2D[0], - null, new DikeProfile.ConstructionProperties()); + null, new DikeProfile.ConstructionProperties + { + Id = "id" + }); // Call bool hasBreakWater = dikeProfile.HasBreakWater; @@ -242,7 +273,10 @@ // Setup var breakWater = new BreakWater(BreakWaterType.Dam, 12.34); var dikeProfile = new DikeProfile(new Point2D(0, 0), new RoughnessPoint[0], new Point2D[0], - breakWater, new DikeProfile.ConstructionProperties()); + breakWater, new DikeProfile.ConstructionProperties + { + Id = "id" + }); // Call bool hasBreakWater = dikeProfile.HasBreakWater; @@ -259,6 +293,7 @@ var dikeProfile = new DikeProfile(new Point2D(0, 0), new RoughnessPoint[0], new Point2D[0], null, new DikeProfile.ConstructionProperties { + Id = "id", Name = testName }); Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/DikeProfiles/ForeshoreProfileTest.cs =================================================================== diff -u -r0ff7a1a433c8c0835cbf2657cec049d6f2b168c7 -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Ringtoets/Common/test/Ringtoets.Common.Data.Test/DikeProfiles/ForeshoreProfileTest.cs (.../ForeshoreProfileTest.cs) (revision 0ff7a1a433c8c0835cbf2657cec049d6f2b168c7) +++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/DikeProfiles/ForeshoreProfileTest.cs (.../ForeshoreProfileTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -35,6 +35,7 @@ public void Constructor_ValidParameters_ExpectedValues() { // Setup + string validId = "id"; var worldCoordinate = new Point2D(1.1, 2.2); var foreshoreGeometry = new[] @@ -45,13 +46,17 @@ // Call var foreshoreProfile = new ForeshoreProfile(worldCoordinate, foreshoreGeometry, - null, new ForeshoreProfile.ConstructionProperties()); + null, new ForeshoreProfile.ConstructionProperties + { + Id = validId + }); // Assert Assert.IsInstanceOf(foreshoreProfile.Orientation); Assert.IsInstanceOf(foreshoreProfile.X0); - Assert.IsNull(foreshoreProfile.Name); + Assert.AreEqual(validId, foreshoreProfile.Id); + Assert.AreEqual(validId, foreshoreProfile.Name); Assert.AreSame(worldCoordinate, foreshoreProfile.WorldReferencePoint); Assert.AreEqual(0.0, foreshoreProfile.X0); Assert.AreEqual(0.0, foreshoreProfile.Orientation.Value); @@ -62,10 +67,30 @@ } [Test] + [TestCase("")] + [TestCase(" ")] + [TestCase(null)] + public void Constructor_InvalidId_ThrowNullException(string id) + { + // Call + TestDelegate call = () => new ForeshoreProfile(new Point2D(0, 0), new Point2D[0], null, new ForeshoreProfile.ConstructionProperties + { + Id = id + }); + + // Assert + string paramName = Assert.Throws(call).ParamName; + Assert.AreEqual("properties", paramName); + } + + [Test] public void Constructor_WorldCoordinateNull_ThrowArgumentNullException() { // Call - TestDelegate call = () => new ForeshoreProfile(null, new Point2D[0], null, new ForeshoreProfile.ConstructionProperties()); + TestDelegate call = () => new ForeshoreProfile(null, new Point2D[0], null, new ForeshoreProfile.ConstructionProperties + { + Id = "id" + }); // Assert string paramName = Assert.Throws(call).ParamName; @@ -76,7 +101,10 @@ public void Constructor_ForeshoreGeometryNull_ThrowsArgumentNullException() { // Call - TestDelegate call = () => new ForeshoreProfile(new Point2D(0, 0), null, null, new ForeshoreProfile.ConstructionProperties()); + TestDelegate call = () => new ForeshoreProfile(new Point2D(0, 0), null, null, new ForeshoreProfile.ConstructionProperties + { + Id = "id" + }); // Assert string paramName = Assert.Throws(call).ParamName; @@ -103,7 +131,10 @@ { null }, - null, new ForeshoreProfile.ConstructionProperties()); + null, new ForeshoreProfile.ConstructionProperties + { + Id = "id" + }); // Assert var expectedMessage = "Een punt in de geometrie voor het voorlandprofiel heeft geen waarde."; @@ -117,6 +148,7 @@ var foreshoreProfile = new ForeshoreProfile(new Point2D(0, 0), new Point2D[0], null, new ForeshoreProfile.ConstructionProperties { + Id = "id", Orientation = 1.23456 }); @@ -126,15 +158,15 @@ } [Test] - [TestCase(null)] [TestCase("")] [TestCase("Cool new name!")] - public void Name_SetNewValue_GetsNewValue(string name) + public void Name_SetNameDifferentFromId_GetsGivenNameValue(string name) { // Call var foreshoreProfile = new ForeshoreProfile(new Point2D(0, 0), new Point2D[0], null, new ForeshoreProfile.ConstructionProperties { + Id = "id", Name = name }); @@ -147,7 +179,10 @@ { // Call var foreshoreProfile = new ForeshoreProfile(new Point2D(0, 0), new Point2D[0], - null, new ForeshoreProfile.ConstructionProperties()); + null, new ForeshoreProfile.ConstructionProperties + { + Id = "id" + }); // Assert Assert.IsNull(foreshoreProfile.BreakWater); @@ -161,7 +196,10 @@ // Call var foreshoreProfile = new ForeshoreProfile(new Point2D(0, 0), new Point2D[0], - newBreakWater, new ForeshoreProfile.ConstructionProperties()); + newBreakWater, new ForeshoreProfile.ConstructionProperties + { + Id = "id" + }); // Assert Assert.AreSame(newBreakWater, foreshoreProfile.BreakWater); @@ -172,7 +210,10 @@ { // Setup var foreshoreProfile = new ForeshoreProfile(new Point2D(0, 0), new Point2D[0], - null, new ForeshoreProfile.ConstructionProperties()); + null, new ForeshoreProfile.ConstructionProperties + { + Id = "id" + }); // Call bool hasBreakWater = foreshoreProfile.HasBreakWater; @@ -187,7 +228,10 @@ // Setup var breakWater = new BreakWater(BreakWaterType.Dam, 12.34); var foreshoreProfile = new ForeshoreProfile(new Point2D(0, 0), new Point2D[0], - breakWater, new ForeshoreProfile.ConstructionProperties()); + breakWater, new ForeshoreProfile.ConstructionProperties + { + Id = "id" + }); // Call bool hasBreakWater = foreshoreProfile.HasBreakWater; @@ -204,6 +248,7 @@ var foreshoreProfile = new ForeshoreProfile(new Point2D(0, 0), new Point2D[0], null, new ForeshoreProfile.ConstructionProperties { + Id = "id", Name = testName }); Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Structures/StructuresInputBaseTest.cs =================================================================== diff -u -r974fb1eadbd8a630c7a992648ad42ac85ec205b1 -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Structures/StructuresInputBaseTest.cs (.../StructuresInputBaseTest.cs) (revision 974fb1eadbd8a630c7a992648ad42ac85ec205b1) +++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Structures/StructuresInputBaseTest.cs (.../StructuresInputBaseTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -535,6 +535,7 @@ breakWater, new ForeshoreProfile.ConstructionProperties { + Id = "id", Orientation = orientation }); @@ -569,6 +570,7 @@ new BreakWater(BreakWaterType.Caisson, 2.2), new ForeshoreProfile.ConstructionProperties { + Id = "id", Orientation = 96 }); Index: Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/TestDikeProfileTest.cs =================================================================== diff -u -ra2eb198a93d224a701f3fa4d6a68023e22ebcd79 -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/TestDikeProfileTest.cs (.../TestDikeProfileTest.cs) (revision a2eb198a93d224a701f3fa4d6a68023e22ebcd79) +++ Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/TestDikeProfileTest.cs (.../TestDikeProfileTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -43,7 +43,8 @@ Assert.AreEqual(0, testProfile.DikeHeight.Value); CollectionAssert.IsEmpty(testProfile.ForeshoreGeometry); Assert.IsFalse(testProfile.HasBreakWater); - Assert.IsNull(testProfile.Name); + Assert.AreEqual("id", testProfile.Id); + Assert.AreEqual("id", testProfile.Name); Assert.AreEqual(0, testProfile.Orientation.Value); Assert.AreEqual(new Point2D(0, 0), testProfile.WorldReferencePoint); Assert.AreEqual(0, testProfile.X0); @@ -66,6 +67,7 @@ Assert.AreEqual(0, testProfile.DikeHeight.Value); CollectionAssert.IsEmpty(testProfile.ForeshoreGeometry); Assert.IsFalse(testProfile.HasBreakWater); + Assert.AreEqual("id", testProfile.Id); Assert.AreEqual(name, testProfile.Name); Assert.AreEqual(0, testProfile.Orientation.Value); Assert.AreEqual(new Point2D(0, 0), testProfile.WorldReferencePoint); @@ -89,7 +91,8 @@ Assert.AreEqual(0, testProfile.DikeHeight.Value); CollectionAssert.IsEmpty(testProfile.ForeshoreGeometry); Assert.IsFalse(testProfile.HasBreakWater); - Assert.IsNull(testProfile.Name); + Assert.AreEqual("id", testProfile.Id); + Assert.AreEqual("id", testProfile.Name); Assert.AreEqual(0, testProfile.Orientation.Value); Assert.AreEqual(point, testProfile.WorldReferencePoint); Assert.AreEqual(0, testProfile.X0); @@ -113,6 +116,7 @@ Assert.AreEqual(0, testProfile.DikeHeight.Value); CollectionAssert.IsEmpty(testProfile.ForeshoreGeometry); Assert.IsFalse(testProfile.HasBreakWater); + Assert.AreEqual("id", testProfile.Id); Assert.AreEqual(name, testProfile.Name); Assert.AreEqual(0, testProfile.Orientation.Value); Assert.AreEqual(point, testProfile.WorldReferencePoint); @@ -141,7 +145,7 @@ Assert.AreEqual(0, testProfile.DikeHeight.Value); CollectionAssert.AreEqual(foreshoreProfileGeometry, testProfile.ForeshoreGeometry); Assert.IsFalse(testProfile.HasBreakWater); - Assert.IsNull(testProfile.Name); + Assert.AreEqual("id", testProfile.Name); Assert.AreEqual(0, testProfile.Orientation.Value); Assert.AreEqual(new Point2D(0, 0), testProfile.WorldReferencePoint); Assert.AreEqual(0, testProfile.X0); Index: Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/TestForeshoreProfileTest.cs =================================================================== diff -u -ra2eb198a93d224a701f3fa4d6a68023e22ebcd79 -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/TestForeshoreProfileTest.cs (.../TestForeshoreProfileTest.cs) (revision a2eb198a93d224a701f3fa4d6a68023e22ebcd79) +++ Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/TestForeshoreProfileTest.cs (.../TestForeshoreProfileTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -36,7 +36,8 @@ // Assert Assert.IsEmpty(profile.Geometry); - Assert.IsNull(profile.Name); + Assert.AreEqual("id", profile.Id); + Assert.AreEqual("id", profile.Name); Assert.IsFalse(profile.HasBreakWater); Assert.AreEqual(0.0, profile.X0); Assert.AreEqual(0.0, profile.Orientation.Value); @@ -51,7 +52,8 @@ // Assert Assert.IsEmpty(profile.Geometry); - Assert.IsNull(profile.Name); + Assert.AreEqual("id", profile.Id); + Assert.AreEqual("id", profile.Name); Assert.IsTrue(profile.HasBreakWater); Assert.IsNotNull(profile.BreakWater); Assert.AreEqual(BreakWaterType.Dam, profile.BreakWater.Type); @@ -72,6 +74,7 @@ // Assert Assert.IsEmpty(profile.Geometry); + Assert.AreEqual("id", profile.Id); Assert.AreEqual(name, profile.Name); Assert.IsFalse(profile.HasBreakWater); Assert.AreEqual(0.0, profile.X0); @@ -90,7 +93,8 @@ // Assert Assert.IsEmpty(profile.Geometry); - Assert.IsNull(profile.Name); + Assert.AreEqual("id", profile.Id); + Assert.AreEqual("id", profile.Name); Assert.AreSame(breakWater, profile.BreakWater); Assert.IsTrue(profile.HasBreakWater); Assert.AreEqual(0.0, profile.X0); @@ -113,7 +117,8 @@ // Assert CollectionAssert.AreEqual(geometry, profile.Geometry); - Assert.IsNull(profile.Name); + Assert.AreEqual("id", profile.Id); + Assert.AreEqual("id", profile.Name); Assert.IsFalse(profile.HasBreakWater); Assert.AreEqual(0.0, profile.X0); Assert.AreEqual(0.0, profile.Orientation.Value); Index: Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/TestDikeProfile.cs =================================================================== diff -u -r3f1ac36864e2e1cbb1d41869e928eed116f0a310 -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/TestDikeProfile.cs (.../TestDikeProfile.cs) (revision 3f1ac36864e2e1cbb1d41869e928eed116f0a310) +++ Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/TestDikeProfile.cs (.../TestDikeProfile.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -53,27 +53,38 @@ /// a specified foreshore profile geometry. /// /// The geometry of the . - public TestDikeProfile(IEnumerable foreshoreProfileGeometry) - : this(null, new Point2D(0, 0), foreshoreProfileGeometry) {} + public TestDikeProfile(IEnumerable foreshoreProfileGeometry) + : this("id", null, new Point2D(0, 0), Enumerable.Empty(), foreshoreProfileGeometry) {} /// + /// Initializes default at the world origin with + /// a specified dike profile geometry. + /// + /// The geometry of the . + public TestDikeProfile(IEnumerable dikeGeometry) + : this("id", null, new Point2D(0, 0), dikeGeometry, Enumerable.Empty()) {} + + /// /// Initializes default at the world location. /// /// The name of the dike profile. /// The world coordinate of the dike profile. - public TestDikeProfile(string name, Point2D point) : this(name, point, Enumerable.Empty()) {} + public TestDikeProfile(string name, Point2D point) : this("id", name, point, Enumerable.Empty(), Enumerable.Empty()) {} /// /// Initializes default at the world location with /// a specified foreshore profile geometry. /// + /// The ID of the dike profile. /// The name of the dike profile. /// The world coordinate of the dike profile. + /// The geometry of the dike. /// The geometry of the . - private TestDikeProfile(string name, Point2D point, IEnumerable foreshoreProfileGeometry) - : base(point, Enumerable.Empty(), foreshoreProfileGeometry, null, new ConstructionProperties - { - Name = name - }) {} + private TestDikeProfile(string id, string name, Point2D point, IEnumerable dikeGeometry, IEnumerable foreshoreProfileGeometry) + : base(point, dikeGeometry, foreshoreProfileGeometry, null, new ConstructionProperties + { + Id = id, + Name = name + }) {} } } \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/TestForeshoreProfile.cs =================================================================== diff -u -ra2eb198a93d224a701f3fa4d6a68023e22ebcd79 -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/TestForeshoreProfile.cs (.../TestForeshoreProfile.cs) (revision a2eb198a93d224a701f3fa4d6a68023e22ebcd79) +++ Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/TestForeshoreProfile.cs (.../TestForeshoreProfile.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -36,39 +36,40 @@ /// . /// /// Location of the profile. - public TestForeshoreProfile(Point2D worldReferencePoint) : this(null, worldReferencePoint, null, Enumerable.Empty()) { } + public TestForeshoreProfile(Point2D worldReferencePoint) : this("id", null, worldReferencePoint, null, Enumerable.Empty()) { } /// /// Creates a new instance of . /// /// If true, create the ForeshoreProfile with a default . - public TestForeshoreProfile(bool useBreakWater = false) : this(null, new Point2D(0, 0), useBreakWater ? new BreakWater(BreakWaterType.Dam, 10) : null, Enumerable.Empty()) {} + public TestForeshoreProfile(bool useBreakWater = false) : this("id", null, new Point2D(0, 0), useBreakWater ? new BreakWater(BreakWaterType.Dam, 10) : null, Enumerable.Empty()) {} /// /// Creates a new instance of the with a given /// name and no . /// /// Name of the profile. - public TestForeshoreProfile(string profileName) : this(profileName, new Point2D(0, 0), null, Enumerable.Empty()) {} + public TestForeshoreProfile(string profileName) : this("id", profileName, new Point2D(0, 0), null, Enumerable.Empty()) {} /// /// Creates a new instance of with a specified . /// /// The which needs to be set on the . - public TestForeshoreProfile(BreakWater breakWater) : this(null, new Point2D(0, 0), breakWater, Enumerable.Empty()) {} + public TestForeshoreProfile(BreakWater breakWater) : this("id", null, new Point2D(0, 0), breakWater, Enumerable.Empty()) {} /// /// Creates a new instance of with a specified geometry. /// /// The geometry of the profile. - public TestForeshoreProfile(IEnumerable geometry) : this(null, new Point2D(0, 0), null, geometry) {} + public TestForeshoreProfile(IEnumerable geometry) : this("id", null, new Point2D(0, 0), null, geometry) {} - private TestForeshoreProfile(string profileName, Point2D worldCoordinate, BreakWater breakWater, IEnumerable geometry) + private TestForeshoreProfile(string id, string profileName, Point2D worldCoordinate, BreakWater breakWater, IEnumerable geometry) : base(worldCoordinate, geometry, breakWater, new ConstructionProperties { + Id = id, Name = profileName }) {} } Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/BreakWaterPropertiesTest.cs =================================================================== diff -u -r7d6e4c28a40fb056c182d0691dda2b2e88aeebfd -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/BreakWaterPropertiesTest.cs (.../BreakWaterPropertiesTest.cs) (revision 7d6e4c28a40fb056c182d0691dda2b2e88aeebfd) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/BreakWaterPropertiesTest.cs (.../BreakWaterPropertiesTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -20,11 +20,11 @@ // All rights reserved. using System.ComponentModel; -using Core.Common.Base.Geometry; using Core.Common.Gui.PropertyBag; using Core.Common.TestUtil; using NUnit.Framework; using Ringtoets.Common.Data.DikeProfiles; +using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.Forms.PropertyClasses; namespace Ringtoets.Common.Forms.Test.PropertyClasses @@ -48,9 +48,7 @@ public void Data_SetForeshoreProfileInstanceWithBreakWater_ReturnCorrectPropertyValues() { // Setup - var foreshoreProfile = new ForeshoreProfile(new Point2D(0, 0), new Point2D[0], - new BreakWater(BreakWaterType.Wall, 10.0), - new ForeshoreProfile.ConstructionProperties()); + var foreshoreProfile = new TestForeshoreProfile(new BreakWater(BreakWaterType.Wall, 10.0)); var properties = new BreakWaterProperties(); @@ -67,8 +65,7 @@ public void Data_SetForeshoreProfileInstanceWithoutBreakWater_ReturnCorrectPropertyValues() { // Setup - var foreshoreProfile = new ForeshoreProfile(new Point2D(0, 0), new Point2D[0], - null, new ForeshoreProfile.ConstructionProperties()); + var foreshoreProfile = new TestForeshoreProfile(); var properties = new BreakWaterProperties(); @@ -83,9 +80,7 @@ public void PropertyAttributes_SetForeshoreProfileInstanceWithBreakWater_ReturnExpectedValues() { // Setup - var foreshoreProfile = new ForeshoreProfile(new Point2D(0, 0), new Point2D[0], - new BreakWater(BreakWaterType.Caisson, 10.0), - new ForeshoreProfile.ConstructionProperties()); + var foreshoreProfile = new TestForeshoreProfile(new BreakWater(BreakWaterType.Caisson, 10.0)); // Call var properties = new BreakWaterProperties @@ -123,8 +118,7 @@ public void PropertyAttributes_SetForeshoreProfileInstanceWithoutBreakWater_ReturnExpectedValues() { // Setup - var foreshoreProfile = new ForeshoreProfile(new Point2D(0, 0), new Point2D[0], - null, new ForeshoreProfile.ConstructionProperties()); + var foreshoreProfile = new TestForeshoreProfile(); // Call var properties = new BreakWaterProperties Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/ForeshoreGeometryPropertiesTest.cs =================================================================== diff -u -r5c5df51bc14a7e25692abf1db5a7476e5036b13f -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/ForeshoreGeometryPropertiesTest.cs (.../ForeshoreGeometryPropertiesTest.cs) (revision 5c5df51bc14a7e25692abf1db5a7476e5036b13f) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/ForeshoreGeometryPropertiesTest.cs (.../ForeshoreGeometryPropertiesTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -25,6 +25,7 @@ using Core.Common.TestUtil; using NUnit.Framework; using Ringtoets.Common.Data.DikeProfiles; +using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.Forms.PropertyClasses; namespace Ringtoets.Common.Forms.Test.PropertyClasses @@ -51,8 +52,7 @@ var properties = new ForeshoreGeometryProperties(); // Call - properties.Data = new ForeshoreProfile(new Point2D(0, 0), new Point2D[0], null, - new ForeshoreProfile.ConstructionProperties()); + properties.Data = new TestForeshoreProfile(); // Assert CollectionAssert.IsEmpty(properties.Coordinates); @@ -62,12 +62,11 @@ public void Data_SetForeshoreProfileInstanceWithData_ReturnCorrectPropertyValues() { // Setup - var foreshoreProfile = new ForeshoreProfile(new Point2D(0, 0), - new[] - { - new Point2D(0, 0), - new Point2D(1, 1) - }, null, new ForeshoreProfile.ConstructionProperties()); + var foreshoreProfile = new TestForeshoreProfile(new[] + { + new Point2D(0, 0), + new Point2D(1, 1) + }); var properties = new ForeshoreGeometryProperties(); @@ -87,8 +86,7 @@ public void Constructor_Always_PropertiesHaveExpectedAttributesValues() { // Setup - var foreshoreProfile = new ForeshoreProfile(new Point2D(0, 0), new Point2D[0], null, - new ForeshoreProfile.ConstructionProperties()); + var foreshoreProfile = new TestForeshoreProfile(); // Call var properties = new ForeshoreGeometryProperties Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/ForeshoreProfilePropertiesTest.cs =================================================================== diff -u -r5c5df51bc14a7e25692abf1db5a7476e5036b13f -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/ForeshoreProfilePropertiesTest.cs (.../ForeshoreProfilePropertiesTest.cs) (revision 5c5df51bc14a7e25692abf1db5a7476e5036b13f) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/ForeshoreProfilePropertiesTest.cs (.../ForeshoreProfilePropertiesTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -25,6 +25,7 @@ using Core.Common.TestUtil; using NUnit.Framework; using Ringtoets.Common.Data.DikeProfiles; +using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.Forms.PropertyClasses; namespace Ringtoets.Common.Forms.Test.PropertyClasses @@ -57,6 +58,7 @@ var foreshoreProfile = new ForeshoreProfile(new Point2D(12.34, 56.78), new Point2D[0], null, new ForeshoreProfile.ConstructionProperties { + Id = "id", Name = name }); @@ -79,8 +81,7 @@ public void Constructor_Always_PropertiesHaveExpectedAttributesValues() { // Setup - var foreshoreProfile = new ForeshoreProfile(new Point2D(0, 0), new Point2D[0], - null, new ForeshoreProfile.ConstructionProperties()); + var foreshoreProfile = new TestForeshoreProfile(); // Call var properties = new ForeshoreProfileProperties Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/RingtoetsMapDataFeaturesFactoryTest.cs =================================================================== diff -u -ra2eb198a93d224a701f3fa4d6a68023e22ebcd79 -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/RingtoetsMapDataFeaturesFactoryTest.cs (.../RingtoetsMapDataFeaturesFactoryTest.cs) (revision a2eb198a93d224a701f3fa4d6a68023e22ebcd79) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/RingtoetsMapDataFeaturesFactoryTest.cs (.../RingtoetsMapDataFeaturesFactoryTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -651,10 +651,11 @@ { new DikeProfile(new Point2D(5, 4), roughnessPointsOne, pointsOne, null, new DikeProfile.ConstructionProperties { - Name = "A" + Id = "A" }), new DikeProfile(new Point2D(2, 1), roughnessPointsTwo, Enumerable.Empty(), null, new DikeProfile.ConstructionProperties { + Id = "bid", Name = "B" }) }; @@ -738,14 +739,16 @@ { new ForeshoreProfile(new Point2D(5, 4), pointsOne, null, new ForeshoreProfile.ConstructionProperties { - Name = "A" + Id = "A" }), new ForeshoreProfile(new Point2D(3, 3), Enumerable.Empty(), null, new ForeshoreProfile.ConstructionProperties() { + Id = "bid", Name = "B" }), new ForeshoreProfile(new Point2D(2, 1), pointsTwo, null, new ForeshoreProfile.ConstructionProperties { + Id = "cid", Name = "C" }) }; Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Data.Test/GrassCoverErosionInwardsInputTest.cs =================================================================== diff -u -r974fb1eadbd8a630c7a992648ad42ac85ec205b1 -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Data.Test/GrassCoverErosionInwardsInputTest.cs (.../GrassCoverErosionInwardsInputTest.cs) (revision 974fb1eadbd8a630c7a992648ad42ac85ec205b1) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Data.Test/GrassCoverErosionInwardsInputTest.cs (.../GrassCoverErosionInwardsInputTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -116,7 +116,7 @@ }, foreshoreGeometry.ToArray(), breakWater, new DikeProfile.ConstructionProperties { - Orientation = 1.1, DikeHeight = 4.4 + Id = "id", Orientation = 1.1, DikeHeight = 4.4 }); // Call @@ -158,6 +158,7 @@ new BreakWater(BreakWaterType.Caisson, 2.2), new DikeProfile.ConstructionProperties { + Id = "id", Orientation = 1.1, DikeHeight = 9.9 }); Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/DikeProfileDikeGeometryPropertiesTest.cs =================================================================== diff -u -rc4972d4aec336f991ac1b4ab3dcd56161c238516 -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/DikeProfileDikeGeometryPropertiesTest.cs (.../DikeProfileDikeGeometryPropertiesTest.cs) (revision c4972d4aec336f991ac1b4ab3dcd56161c238516) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/DikeProfileDikeGeometryPropertiesTest.cs (.../DikeProfileDikeGeometryPropertiesTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -68,12 +68,11 @@ public void Data_SetDikeProfileInstanceWithData_ReturnCorrectPropertyValues() { // Setup - var dikeProfile = new DikeProfile(new Point2D(0, 0), - new[] - { - new RoughnessPoint(new Point2D(0, 0), 0.6), - new RoughnessPoint(new Point2D(1, 1), 0.7) - }, new Point2D[0], null, new DikeProfile.ConstructionProperties()); + var dikeProfile = new TestDikeProfile(new[] + { + new RoughnessPoint(new Point2D(0, 0), 0.6), + new RoughnessPoint(new Point2D(1, 1), 0.7) + }); var properties = new DikeProfileDikeGeometryProperties(); Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsInputContextDikeGeometryPropertiesTest.cs =================================================================== diff -u -rfb9bf56793b90226745888c194ba6ae760f83f4c -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsInputContextDikeGeometryPropertiesTest.cs (.../GrassCoverErosionInwardsInputContextDikeGeometryPropertiesTest.cs) (revision fb9bf56793b90226745888c194ba6ae760f83f4c) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsInputContextDikeGeometryPropertiesTest.cs (.../GrassCoverErosionInwardsInputContextDikeGeometryPropertiesTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -28,6 +28,7 @@ using Rhino.Mocks; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.DikeProfiles; +using Ringtoets.Common.Data.TestUtil; using Ringtoets.GrassCoverErosionInwards.Data; using Ringtoets.GrassCoverErosionInwards.Forms.PresentationObjects; using Ringtoets.GrassCoverErosionInwards.Forms.PropertyClasses; @@ -88,12 +89,11 @@ mockRepository.ReplayAll(); var failureMechanism = new GrassCoverErosionInwardsFailureMechanism(); - var dikeProfile = new DikeProfile(new Point2D(0, 0), - new[] - { - new RoughnessPoint(new Point2D(1.1, 2.2), 0.6), - new RoughnessPoint(new Point2D(3.3, 4.4), 0.7) - }, new Point2D[0], null, new DikeProfile.ConstructionProperties()); + var dikeProfile = new TestDikeProfile(new[] + { + new RoughnessPoint(new Point2D(1.1, 2.2), 0.6), + new RoughnessPoint(new Point2D(3.3, 4.4), 0.7) + }); var calculation = new GrassCoverErosionInwardsCalculation { Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsChartDataPointsFactoryTest.cs =================================================================== diff -u -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsChartDataPointsFactoryTest.cs (.../GrassCoverErosionInwardsChartDataPointsFactoryTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsChartDataPointsFactoryTest.cs (.../GrassCoverErosionInwardsChartDataPointsFactoryTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -24,6 +24,7 @@ using Core.Common.Base.Geometry; using NUnit.Framework; using Ringtoets.Common.Data.DikeProfiles; +using Ringtoets.Common.Data.TestUtil; using Ringtoets.GrassCoverErosionInwards.Data; using Ringtoets.GrassCoverErosionInwards.Forms.Views; @@ -51,11 +52,7 @@ new RoughnessPoint(new Point2D(1.1, 2.2), 0.5), new RoughnessPoint(new Point2D(3.3, 4.4), 0.6) }; - var dikeProfile = new DikeProfile(new Point2D(0, 0), - roughnessPoints, - new Point2D[0], - null, - new DikeProfile.ConstructionProperties()); + var dikeProfile = new TestDikeProfile(roughnessPoints); // Call Point2D[] points = GrassCoverErosionInwardsChartDataPointsFactory.CreateDikeGeometryPoints(dikeProfile); @@ -96,15 +93,11 @@ // Setup var input = new GrassCoverErosionInwardsInput { - DikeProfile = new DikeProfile(new Point2D(0, 0), - new RoughnessPoint[0], - new[] - { - new Point2D(1.1, 2.2), - new Point2D(3.3, 4.4) - }, - null, - new DikeProfile.ConstructionProperties()), + DikeProfile = new TestDikeProfile(new[] + { + new Point2D(1.1, 2.2), + new Point2D(3.3, 4.4) + }), UseForeshore = false }; @@ -126,11 +119,7 @@ }; var input = new GrassCoverErosionInwardsInput { - DikeProfile = new DikeProfile(new Point2D(0, 0), - new RoughnessPoint[0], - foreshoreGeometry, - null, - new DikeProfile.ConstructionProperties()), + DikeProfile = new TestDikeProfile(foreshoreGeometry), UseForeshore = true }; @@ -157,15 +146,11 @@ // Setup var input = new GrassCoverErosionInwardsInput { - DikeProfile = new DikeProfile(new Point2D(0, 0), - new[] - { - new RoughnessPoint(new Point2D(1.1, 2.2), 0.5), - new RoughnessPoint(new Point2D(3.3, 4.4), 0.6) - }, - new Point2D[0], - null, - new DikeProfile.ConstructionProperties()), + DikeProfile = new TestDikeProfile(new[] + { + new RoughnessPoint(new Point2D(1.1, 2.2), 0.5), + new RoughnessPoint(new Point2D(3.3, 4.4), 0.6) + }), DikeHeight = RoundedDouble.NaN }; @@ -182,14 +167,10 @@ // Setup var input = new GrassCoverErosionInwardsInput { - DikeProfile = new DikeProfile(new Point2D(0, 0), - new[] - { - new RoughnessPoint(new Point2D(1.1, 2.2), 0.5) - }, - new Point2D[0], - null, - new DikeProfile.ConstructionProperties()), + DikeProfile = new TestDikeProfile(new[] + { + new RoughnessPoint(new Point2D(1.1, 2.2), 0.5) + }), DikeHeight = (RoundedDouble) 5.5 }; @@ -206,15 +187,11 @@ // Setup var input = new GrassCoverErosionInwardsInput { - DikeProfile = new DikeProfile(new Point2D(0, 0), - new[] + DikeProfile = new TestDikeProfile(new[] { new RoughnessPoint(new Point2D(1.1, 2.2), 0.5), new RoughnessPoint(new Point2D(3.3, 4.4), 0.6) - }, - new Point2D[0], - null, - new DikeProfile.ConstructionProperties()), + }), DikeHeight = (RoundedDouble) 5.5 }; Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsInputViewTest.cs =================================================================== diff -u -r4dbfc20ef0200e34db43efeb8899d72e4046cc5b -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsInputViewTest.cs (.../GrassCoverErosionInwardsInputViewTest.cs) (revision 4dbfc20ef0200e34db43efeb8899d72e4046cc5b) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsInputViewTest.cs (.../GrassCoverErosionInwardsInputViewTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -471,6 +471,7 @@ return new DikeProfile(new Point2D(0.0, 0.0), dikeGeometry, foreshoreGeometry, null, new DikeProfile.ConstructionProperties { + Id = "id", Name = "Dike profile test", DikeHeight = 10.0 }); Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Integration.Test/GrassCoverErosionInwardsCalculationActivityIntegrationTest.cs =================================================================== diff -u -r84db6d79354723db5626dbb9ff7361d2a70d66d1 -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Integration.Test/GrassCoverErosionInwardsCalculationActivityIntegrationTest.cs (.../GrassCoverErosionInwardsCalculationActivityIntegrationTest.cs) (revision 84db6d79354723db5626dbb9ff7361d2a70d66d1) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Integration.Test/GrassCoverErosionInwardsCalculationActivityIntegrationTest.cs (.../GrassCoverErosionInwardsCalculationActivityIntegrationTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -1070,6 +1070,7 @@ new BreakWater(BreakWaterType.Dam, 10.0), new DikeProfile.ConstructionProperties { + Id = "id", Orientation = 5.5, DikeHeight = 10 }); Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Service.Test/GrassCoverErosionInwardsCalculationServiceTest.cs =================================================================== diff -u -r0a185a7ccdc50bbfb5126f76e16c337b503c9705 -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Service.Test/GrassCoverErosionInwardsCalculationServiceTest.cs (.../GrassCoverErosionInwardsCalculationServiceTest.cs) (revision 0a185a7ccdc50bbfb5126f76e16c337b503c9705) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Service.Test/GrassCoverErosionInwardsCalculationServiceTest.cs (.../GrassCoverErosionInwardsCalculationServiceTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -277,6 +277,7 @@ DikeProfile = new DikeProfile(new Point2D(0, 0), new RoughnessPoint[0], new Point2D[0], null, new DikeProfile.ConstructionProperties { + Id = "id", Orientation = RoundedDouble.NaN }) } @@ -326,6 +327,7 @@ DikeProfile = new DikeProfile(new Point2D(0, 0), new RoughnessPoint[0], new Point2D[0], null, new DikeProfile.ConstructionProperties { + Id = "id", DikeHeight = dikeHeight }) } @@ -1168,6 +1170,7 @@ new Point2D(-1.0, -1.0) }, null, new DikeProfile.ConstructionProperties { + Id = "id", Orientation = 5.5, DikeHeight = 10 }); @@ -1186,7 +1189,10 @@ new RoughnessPoint[0], new Point2D[0], new BreakWater(BreakWaterType.Dam, breakWaterHeight), - new DikeProfile.ConstructionProperties()) + new DikeProfile.ConstructionProperties + { + Id = "id" + }) } }; } Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PresentationObjects/GrassCoverErosionOutwardsWaveConditionsInputContextTest.cs =================================================================== diff -u -r545b105a213ed85564861b4bcf6d2d6425dbde50 -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PresentationObjects/GrassCoverErosionOutwardsWaveConditionsInputContextTest.cs (.../GrassCoverErosionOutwardsWaveConditionsInputContextTest.cs) (revision 545b105a213ed85564861b4bcf6d2d6425dbde50) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PresentationObjects/GrassCoverErosionOutwardsWaveConditionsInputContextTest.cs (.../GrassCoverErosionOutwardsWaveConditionsInputContextTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -26,6 +26,7 @@ using NUnit.Framework; using Ringtoets.Common.Data.DikeProfiles; using Ringtoets.Common.Data.Hydraulics; +using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.Forms.TestUtil; using Ringtoets.GrassCoverErosionOutwards.Data; using Ringtoets.GrassCoverErosionOutwards.Forms.PresentationObjects; @@ -40,10 +41,7 @@ public void Constructor_ExpectedValues() { // Setup - var foreshoreProfile = new ForeshoreProfile(new Point2D(0, 0), - Enumerable.Empty(), - null, - new ForeshoreProfile.ConstructionProperties()); + var foreshoreProfile = new TestForeshoreProfile(); var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(0, string.Empty, 0, 0); Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionOutwardsWaveConditionsCalculationContextTreeNodeInfoTest.cs =================================================================== diff -u -r45440093089496f59ed420e772136756c229e30b -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionOutwardsWaveConditionsCalculationContextTreeNodeInfoTest.cs (.../GrassCoverErosionOutwardsWaveConditionsCalculationContextTreeNodeInfoTest.cs) (revision 45440093089496f59ed420e772136756c229e30b) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionOutwardsWaveConditionsCalculationContextTreeNodeInfoTest.cs (.../GrassCoverErosionOutwardsWaveConditionsCalculationContextTreeNodeInfoTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -319,10 +319,7 @@ { Output = null }; - var foreshoreProfile = new ForeshoreProfile(new Point2D(0, 0), - Enumerable.Empty(), - new BreakWater(BreakWaterType.Caisson, 1), - new ForeshoreProfile.ConstructionProperties()); + var foreshoreProfile = new TestForeshoreProfile(new BreakWater(BreakWaterType.Caisson, 1)); var failureMechanism = new GrassCoverErosionOutwardsFailureMechanism { @@ -382,10 +379,7 @@ { Output = new GrassCoverErosionOutwardsWaveConditionsOutput(Enumerable.Empty()) }; - var foreshoreProfile = new ForeshoreProfile(new Point2D(0, 0), - Enumerable.Empty(), - new BreakWater(BreakWaterType.Caisson, 1), - new ForeshoreProfile.ConstructionProperties()); + var foreshoreProfile = new TestForeshoreProfile(new BreakWater(BreakWaterType.Caisson, 1)); var failureMechanism = new GrassCoverErosionOutwardsFailureMechanism { Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/TreeNodeInfos/ForeshoreProfilesContextTreeNodeInfoTest.cs =================================================================== diff -u -r516abd6e2142e4ea580b851f7e74dfc513357bde -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/TreeNodeInfos/ForeshoreProfilesContextTreeNodeInfoTest.cs (.../ForeshoreProfilesContextTreeNodeInfoTest.cs) (revision 516abd6e2142e4ea580b851f7e74dfc513357bde) +++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/TreeNodeInfos/ForeshoreProfilesContextTreeNodeInfoTest.cs (.../ForeshoreProfilesContextTreeNodeInfoTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -32,6 +32,7 @@ using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.DikeProfiles; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.Forms.PresentationObjects; using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; @@ -132,7 +133,7 @@ var emptyCollection = new ObservableList { - new ForeshoreProfile(new Point2D(0, 0), new Point2D[0], null, new ForeshoreProfile.ConstructionProperties()) + new TestForeshoreProfile() }; var context = new ForeshoreProfilesContext(emptyCollection, failureMechanism, assessmentSection); @@ -153,9 +154,9 @@ var failureMechanism = mocks.Stub(); mocks.ReplayAll(); - var profile1 = new ForeshoreProfile(new Point2D(0, 0), new Point2D[0], null, new ForeshoreProfile.ConstructionProperties()); - var profile2 = new ForeshoreProfile(new Point2D(1, 1), new Point2D[0], null, new ForeshoreProfile.ConstructionProperties()); - var profile3 = new ForeshoreProfile(new Point2D(2, 2), new Point2D[0], null, new ForeshoreProfile.ConstructionProperties()); + var profile1 = new TestForeshoreProfile(new Point2D(0, 0)); + var profile2 = new TestForeshoreProfile(new Point2D(1, 1)); + var profile3 = new TestForeshoreProfile(new Point2D(2, 2)); var emptyCollection = new ObservableList { profile1, Index: Ringtoets/Integration/test/Ringtoets.Integration.TestUtils/TestDataGenerator.cs =================================================================== diff -u -r9e8adeec3a90229b7845e004fa30536b8d2f5f2e -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Ringtoets/Integration/test/Ringtoets.Integration.TestUtils/TestDataGenerator.cs (.../TestDataGenerator.cs) (revision 9e8adeec3a90229b7845e004fa30536b8d2f5f2e) +++ Ringtoets/Integration/test/Ringtoets.Integration.TestUtils/TestDataGenerator.cs (.../TestDataGenerator.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -271,6 +271,7 @@ new BreakWater(BreakWaterType.Caisson, 1.3), new DikeProfile.ConstructionProperties { + Id = "aid", Name = "A", DikeHeight = 5, Orientation = 20, @@ -294,6 +295,7 @@ new BreakWater(BreakWaterType.Caisson, 1.3), new DikeProfile.ConstructionProperties { + Id = "bid", Name = "B", DikeHeight = 3, Orientation = 20, @@ -422,6 +424,7 @@ }, new BreakWater(BreakWaterType.Caisson, 1.1), new ForeshoreProfile.ConstructionProperties { + Id = "aid", Name = "A", Orientation = 30, X0 = 0 @@ -434,6 +437,7 @@ }, new BreakWater(BreakWaterType.Dam, 2.2), new ForeshoreProfile.ConstructionProperties { + Id = "bid", Name = "B", Orientation = 50, X0 = 10 @@ -455,6 +459,7 @@ }, new BreakWater(BreakWaterType.Caisson, 1.1), new ForeshoreProfile.ConstructionProperties { + Id = "aid", Name = "A", Orientation = 30, X0 = 0 @@ -467,6 +472,7 @@ }, new BreakWater(BreakWaterType.Dam, 2.2), new ForeshoreProfile.ConstructionProperties { + Id = "bid", Name = "B", Orientation = 50, X0 = 10 @@ -488,6 +494,7 @@ }, new BreakWater(BreakWaterType.Caisson, 1.1), new ForeshoreProfile.ConstructionProperties { + Id = "aid", Name = "A", Orientation = 30, X0 = 0 @@ -500,6 +507,7 @@ }, new BreakWater(BreakWaterType.Dam, 2.2), new ForeshoreProfile.ConstructionProperties { + Id = "bid", Name = "B", Orientation = 50, X0 = 10 @@ -615,6 +623,7 @@ }, new BreakWater(BreakWaterType.Caisson, 1.1), new ForeshoreProfile.ConstructionProperties { + Id = "aid", Name = "A", Orientation = 30, X0 = 0 @@ -627,6 +636,7 @@ }, new BreakWater(BreakWaterType.Dam, 2.2), new ForeshoreProfile.ConstructionProperties { + Id = "bid", Name = "B", Orientation = 50, X0 = 10 @@ -735,6 +745,7 @@ }, new BreakWater(BreakWaterType.Caisson, 1.1), new ForeshoreProfile.ConstructionProperties { + Id = "aid", Name = "A", Orientation = 30, X0 = 0 @@ -747,6 +758,7 @@ }, new BreakWater(BreakWaterType.Dam, 2.2), new ForeshoreProfile.ConstructionProperties { + Id = "bid", Name = "B", Orientation = 50, X0 = 10 @@ -865,6 +877,7 @@ }, new BreakWater(BreakWaterType.Caisson, 1.1), new ForeshoreProfile.ConstructionProperties { + Id = "aid", Name = "A", Orientation = 30, X0 = 0 @@ -877,6 +890,7 @@ }, new BreakWater(BreakWaterType.Dam, 2.2), new ForeshoreProfile.ConstructionProperties { + Id = "bid", Name = "B", Orientation = 50, X0 = 10 Index: Ringtoets/Revetment/test/Ringtoets.Revetment.Data.Test/WaveConditionsInputTest.cs =================================================================== diff -u -r974fb1eadbd8a630c7a992648ad42ac85ec205b1 -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Ringtoets/Revetment/test/Ringtoets.Revetment.Data.Test/WaveConditionsInputTest.cs (.../WaveConditionsInputTest.cs) (revision 974fb1eadbd8a630c7a992648ad42ac85ec205b1) +++ Ringtoets/Revetment/test/Ringtoets.Revetment.Data.Test/WaveConditionsInputTest.cs (.../WaveConditionsInputTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -208,6 +208,7 @@ breakWater, new ForeshoreProfile.ConstructionProperties { + Id = "id", Orientation = orientation }); @@ -244,6 +245,7 @@ new BreakWater(BreakWaterType.Caisson, 2.2), new ForeshoreProfile.ConstructionProperties { + Id = "id", Orientation = 96 }); Index: Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/PropertyClasses/WaveConditionsInputContextPropertiesTest.cs =================================================================== diff -u -rf861839e975251253e2ffd7bc3f0a1839b85534e -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/PropertyClasses/WaveConditionsInputContextPropertiesTest.cs (.../WaveConditionsInputContextPropertiesTest.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e) +++ Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/PropertyClasses/WaveConditionsInputContextPropertiesTest.cs (.../WaveConditionsInputContextPropertiesTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -130,6 +130,7 @@ new BreakWater(BreakWaterType.Dam, damHeight), new ForeshoreProfile.ConstructionProperties { + Id = "id", Name = string.Empty, Orientation = foreshoreProfileOrientation, X0 = -3 @@ -189,11 +190,7 @@ { // Setup var input = new WaveConditionsInput(); - var foreshoreProfile = new ForeshoreProfile( - new Point2D(0, 0), - Enumerable.Empty(), - null, - new ForeshoreProfile.ConstructionProperties()); + var foreshoreProfile = new TestForeshoreProfile(); if (withForeshoreProfile) { Index: Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/PropertyClasses/WaveConditionsInputForeshoreProfilePropertiesTest.cs =================================================================== diff -u -rec3281e9d98baa572ca092f702b942947a44dbfa -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/PropertyClasses/WaveConditionsInputForeshoreProfilePropertiesTest.cs (.../WaveConditionsInputForeshoreProfilePropertiesTest.cs) (revision ec3281e9d98baa572ca092f702b942947a44dbfa) +++ Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/PropertyClasses/WaveConditionsInputForeshoreProfilePropertiesTest.cs (.../WaveConditionsInputForeshoreProfilePropertiesTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -28,6 +28,7 @@ using NUnit.Framework; using Rhino.Mocks; using Ringtoets.Common.Data.DikeProfiles; +using Ringtoets.Common.Data.TestUtil; using Ringtoets.Revetment.Data; using Ringtoets.Revetment.Forms.PropertyClasses; @@ -72,12 +73,11 @@ // Setup var input = new WaveConditionsInput() { - ForeshoreProfile = new ForeshoreProfile(new Point2D(0, 0), - new[] - { - new Point2D(1.1, 2.2), - new Point2D(3.3, 4.4) - }, null, new ForeshoreProfile.ConstructionProperties()) + ForeshoreProfile = new TestForeshoreProfile(new[] + { + new Point2D(1.1, 2.2), + new Point2D(3.3, 4.4) + }) }; var properties = new WaveConditionsInputForeshoreProfileProperties(); @@ -137,8 +137,7 @@ point2Ds.Add(new Point2D(i, i)); } - input.ForeshoreProfile = new ForeshoreProfile(new Point2D(0, 0), - point2Ds, null, new ForeshoreProfile.ConstructionProperties()); + input.ForeshoreProfile = new TestForeshoreProfile(point2Ds); } // Call Index: Ringtoets/Revetment/test/Ringtoets.Revetment.IO.Test/ExportableWaveConditionsFactoryTest.cs =================================================================== diff -u -rf2e108cd25b68267d9484249eac3c6ea0db6a7b6 -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Ringtoets/Revetment/test/Ringtoets.Revetment.IO.Test/ExportableWaveConditionsFactoryTest.cs (.../ExportableWaveConditionsFactoryTest.cs) (revision f2e108cd25b68267d9484249eac3c6ea0db6a7b6) +++ Ringtoets/Revetment/test/Ringtoets.Revetment.IO.Test/ExportableWaveConditionsFactoryTest.cs (.../ExportableWaveConditionsFactoryTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -26,6 +26,7 @@ using NUnit.Framework; using Ringtoets.Common.Data.DikeProfiles; using Ringtoets.Common.Data.Hydraulics; +using Ringtoets.Common.Data.TestUtil; using Ringtoets.Revetment.Data; using Ringtoets.Revetment.TestUtil; @@ -120,7 +121,7 @@ var waveConditionsInput = new WaveConditionsInput() { HydraulicBoundaryLocation = new HydraulicBoundaryLocation(0, "hblName", 1.0, 8.0), - ForeshoreProfile = new ForeshoreProfile(new Point2D(8.7, 7.8), Enumerable.Empty(), null, new ForeshoreProfile.ConstructionProperties()), + ForeshoreProfile = new TestForeshoreProfile(), UseForeshore = true }; @@ -141,7 +142,7 @@ Assert.AreEqual("hblName", exportableWaveConditions.LocationName); Assert.AreEqual(1.0, exportableWaveConditions.LocationXCoordinate); Assert.AreEqual(8.0, exportableWaveConditions.LocationYCoordinate); - Assert.AreEqual(null, exportableWaveConditions.ForeshoreName); + Assert.AreEqual("id", exportableWaveConditions.ForeshoreName); Assert.AreEqual(false, exportableWaveConditions.UseBreakWater); Assert.AreEqual(true, exportableWaveConditions.UseForeshore); Assert.AreEqual(CoverType.StoneCoverColumns, exportableWaveConditions.CoverType); @@ -219,7 +220,7 @@ var waveConditionsInput = new WaveConditionsInput() { HydraulicBoundaryLocation = new HydraulicBoundaryLocation(0, "hblName", 1.0, 8.0), - ForeshoreProfile = new ForeshoreProfile(new Point2D(8.7, 7.8), Enumerable.Empty(), null, new ForeshoreProfile.ConstructionProperties()), + ForeshoreProfile = new TestForeshoreProfile(), UseForeshore = true }; @@ -237,7 +238,7 @@ Assert.AreEqual("hblName", exportableWaveConditions.LocationName); Assert.AreEqual(1.0, exportableWaveConditions.LocationXCoordinate); Assert.AreEqual(8.0, exportableWaveConditions.LocationYCoordinate); - Assert.AreEqual(null, exportableWaveConditions.ForeshoreName); + Assert.AreEqual("id", exportableWaveConditions.ForeshoreName); Assert.AreEqual(false, exportableWaveConditions.UseBreakWater); Assert.AreEqual(true, exportableWaveConditions.UseForeshore); Assert.AreEqual(CoverType.Grass, exportableWaveConditions.CoverType); Index: Ringtoets/Revetment/test/Ringtoets.Revetment.IO.Test/ExportableWaveConditionsTest.cs =================================================================== diff -u -r878116dd950653a518d005a6f1a6e87e8ed585b1 -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Ringtoets/Revetment/test/Ringtoets.Revetment.IO.Test/ExportableWaveConditionsTest.cs (.../ExportableWaveConditionsTest.cs) (revision 878116dd950653a518d005a6f1a6e87e8ed585b1) +++ Ringtoets/Revetment/test/Ringtoets.Revetment.IO.Test/ExportableWaveConditionsTest.cs (.../ExportableWaveConditionsTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -24,6 +24,7 @@ using NUnit.Framework; using Ringtoets.Common.Data.DikeProfiles; using Ringtoets.Common.Data.Hydraulics; +using Ringtoets.Common.Data.TestUtil; using Ringtoets.Revetment.Data; using Ringtoets.Revetment.TestUtil; @@ -125,10 +126,7 @@ { // Setup WaveConditionsInput waveConditionsInput = CreateValidWaveConditionsInput(); - waveConditionsInput.ForeshoreProfile = new ForeshoreProfile(new Point2D(8.7, 7.8), new Point2D[0], null, new ForeshoreProfile.ConstructionProperties - { - Name = "profile" - }); + waveConditionsInput.ForeshoreProfile = new TestForeshoreProfile("profile"); waveConditionsInput.UseBreakWater = useBreakWater; waveConditionsInput.UseForeshore = useForeshore; Index: Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Forms.Test/PresentationObjects/StabilityStoneCoverWaveConditionsInputContextTest.cs =================================================================== diff -u -rbb80820ff4a4e09793da242cb7b36ca2bce59c32 -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Forms.Test/PresentationObjects/StabilityStoneCoverWaveConditionsInputContextTest.cs (.../StabilityStoneCoverWaveConditionsInputContextTest.cs) (revision bb80820ff4a4e09793da242cb7b36ca2bce59c32) +++ Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Forms.Test/PresentationObjects/StabilityStoneCoverWaveConditionsInputContextTest.cs (.../StabilityStoneCoverWaveConditionsInputContextTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -28,6 +28,7 @@ using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.DikeProfiles; using Ringtoets.Common.Data.Hydraulics; +using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.Forms.TestUtil; using Ringtoets.Revetment.Data; using Ringtoets.Revetment.Forms.PresentationObjects; @@ -57,14 +58,11 @@ assessmentSection.HydraulicBoundaryDatabase = hydraulicBoundaryDatabase; mocks.ReplayAll(); - var foreshoreProfile = new ForeshoreProfile(new Point2D(0, 0), Enumerable.Empty(), - null, new ForeshoreProfile.ConstructionProperties()); - var failureMechanism = new StabilityStoneCoverFailureMechanism { ForeshoreProfiles = { - foreshoreProfile + new TestForeshoreProfile() } }; Index: Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Plugin.Test/TreeNodeInfos/StabilityStoneCoverWaveConditionsCalculationContextTreeNodeInfoTest.cs =================================================================== diff -u -r45440093089496f59ed420e772136756c229e30b -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Plugin.Test/TreeNodeInfos/StabilityStoneCoverWaveConditionsCalculationContextTreeNodeInfoTest.cs (.../StabilityStoneCoverWaveConditionsCalculationContextTreeNodeInfoTest.cs) (revision 45440093089496f59ed420e772136756c229e30b) +++ Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Plugin.Test/TreeNodeInfos/StabilityStoneCoverWaveConditionsCalculationContextTreeNodeInfoTest.cs (.../StabilityStoneCoverWaveConditionsCalculationContextTreeNodeInfoTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -173,10 +173,7 @@ { Output = null }; - var foreshoreProfile = new ForeshoreProfile(new Point2D(0, 0), - Enumerable.Empty(), - new BreakWater(BreakWaterType.Caisson, 1), - new ForeshoreProfile.ConstructionProperties()); + var foreshoreProfile = new TestForeshoreProfile(new BreakWater(BreakWaterType.Caisson, 1)); var failureMechanism = new StabilityStoneCoverFailureMechanism { @@ -233,10 +230,7 @@ Output = new StabilityStoneCoverWaveConditionsOutput(Enumerable.Empty(), Enumerable.Empty()) }; - var foreshoreProfile = new ForeshoreProfile(new Point2D(0, 0), - Enumerable.Empty(), - new BreakWater(BreakWaterType.Caisson, 1), - new ForeshoreProfile.ConstructionProperties()); + var foreshoreProfile = new TestForeshoreProfile(new BreakWater(BreakWaterType.Caisson, 1)); var failureMechanism = new StabilityStoneCoverFailureMechanism { Index: Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Forms.Test/PresentationObjects/WaveImpactAsphaltCoverWaveConditionsInputContextTest.cs =================================================================== diff -u -rbb80820ff4a4e09793da242cb7b36ca2bce59c32 -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Forms.Test/PresentationObjects/WaveImpactAsphaltCoverWaveConditionsInputContextTest.cs (.../WaveImpactAsphaltCoverWaveConditionsInputContextTest.cs) (revision bb80820ff4a4e09793da242cb7b36ca2bce59c32) +++ Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Forms.Test/PresentationObjects/WaveImpactAsphaltCoverWaveConditionsInputContextTest.cs (.../WaveImpactAsphaltCoverWaveConditionsInputContextTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -28,6 +28,7 @@ using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.DikeProfiles; using Ringtoets.Common.Data.Hydraulics; +using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.Forms.TestUtil; using Ringtoets.Revetment.Data; using Ringtoets.Revetment.Forms.PresentationObjects; @@ -44,7 +45,7 @@ { // Setup var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(0, string.Empty, 0, 0); - var hydraulicBoundaryDatabase = new HydraulicBoundaryDatabase() + var hydraulicBoundaryDatabase = new HydraulicBoundaryDatabase { Locations = { @@ -57,14 +58,11 @@ assessmentSection.HydraulicBoundaryDatabase = hydraulicBoundaryDatabase; mocks.ReplayAll(); - var foreshoreProfile = new ForeshoreProfile(new Point2D(0, 0), Enumerable.Empty(), - null, new ForeshoreProfile.ConstructionProperties()); - var failureMechanism = new WaveImpactAsphaltCoverFailureMechanism { ForeshoreProfiles = { - foreshoreProfile + new TestForeshoreProfile() } }; Index: Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Plugin.Test/TreeNodeInfos/WaveImpactAsphaltCoverWaveConditionsCalculationContextTreeNodeInfoTest.cs =================================================================== diff -u -r45440093089496f59ed420e772136756c229e30b -rba715436cd0186ee10a1edc13d547ee27bea4c89 --- Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Plugin.Test/TreeNodeInfos/WaveImpactAsphaltCoverWaveConditionsCalculationContextTreeNodeInfoTest.cs (.../WaveImpactAsphaltCoverWaveConditionsCalculationContextTreeNodeInfoTest.cs) (revision 45440093089496f59ed420e772136756c229e30b) +++ Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Plugin.Test/TreeNodeInfos/WaveImpactAsphaltCoverWaveConditionsCalculationContextTreeNodeInfoTest.cs (.../WaveImpactAsphaltCoverWaveConditionsCalculationContextTreeNodeInfoTest.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) @@ -175,10 +175,7 @@ Output = null }; - var foreshoreProfile = new ForeshoreProfile(new Point2D(0, 0), - Enumerable.Empty(), - new BreakWater(BreakWaterType.Caisson, 1), - new ForeshoreProfile.ConstructionProperties()); + var foreshoreProfile = new TestForeshoreProfile(new BreakWater(BreakWaterType.Caisson, 1)); var failureMechanism = new WaveImpactAsphaltCoverFailureMechanism { ForeshoreProfiles = @@ -233,10 +230,7 @@ { Output = new WaveImpactAsphaltCoverWaveConditionsOutput(Enumerable.Empty()) }; - var foreshoreProfile = new ForeshoreProfile(new Point2D(0, 0), - Enumerable.Empty(), - new BreakWater(BreakWaterType.Caisson, 1), - new ForeshoreProfile.ConstructionProperties()); + var foreshoreProfile = new TestForeshoreProfile(new BreakWater(BreakWaterType.Caisson, 1)); var failureMechanism = new WaveImpactAsphaltCoverFailureMechanism { ForeshoreProfiles =