Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Application.Ringtoets.Storage.csproj =================================================================== diff -u -r88db4d493b026e3f5bb083d1bb33bc607ff0d63e -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Application.Ringtoets.Storage.csproj (.../Application.Ringtoets.Storage.csproj) (revision 88db4d493b026e3f5bb083d1bb33bc607ff0d63e) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Application.Ringtoets.Storage.csproj (.../Application.Ringtoets.Storage.csproj) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -427,10 +427,10 @@ - - - - + + + + Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/AssessmentSectionCreateExtensions.cs =================================================================== diff -u -r1f0cd3fafaa7340a446612870810629587474302 -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/AssessmentSectionCreateExtensions.cs (.../AssessmentSectionCreateExtensions.cs) (revision 1f0cd3fafaa7340a446612870810629587474302) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/AssessmentSectionCreateExtensions.cs (.../AssessmentSectionCreateExtensions.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -60,7 +60,7 @@ /// The index at which resides in its parent. /// A new . /// Thrown when is null. - internal static AssessmentSectionEntity Create(this AssessmentSection section, PersistenceRegistry registry, int order) + public static AssessmentSectionEntity Create(this AssessmentSection section, PersistenceRegistry registry, int order) { if (registry == null) { @@ -111,7 +111,7 @@ { if (section.ReferenceLine != null) { - entity.ReferenceLinePointXml = new Point2DXmlSerializer().ToXml(section.ReferenceLine.Points); + entity.ReferenceLinePointXml = new Point2DCollectionXmlSerializer().ToXml(section.ReferenceLine.Points); } } Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/FailureMechanismSectionCreateExtensions.cs =================================================================== diff -u -r3fb0df0ed6e64657154700ee7706e035d5bf99f5 -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/FailureMechanismSectionCreateExtensions.cs (.../FailureMechanismSectionCreateExtensions.cs) (revision 3fb0df0ed6e64657154700ee7706e035d5bf99f5) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/FailureMechanismSectionCreateExtensions.cs (.../FailureMechanismSectionCreateExtensions.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -39,7 +39,7 @@ /// The object keeping track of create operations. /// A new . /// Thrown when is null. - internal static FailureMechanismSectionEntity Create(this FailureMechanismSection section, PersistenceRegistry registry) + public static FailureMechanismSectionEntity Create(this FailureMechanismSection section, PersistenceRegistry registry) { if (registry == null) { @@ -48,7 +48,7 @@ var failureMechanismSectionEntity = new FailureMechanismSectionEntity { Name = section.Name.DeepClone(), - FailureMechanismSectionPointXml = new Point2DXmlSerializer().ToXml(section.Points) + FailureMechanismSectionPointXml = new Point2DCollectionXmlSerializer().ToXml(section.Points) }; registry.Register(failureMechanismSectionEntity, section); Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/ForeshoreProfileCreateExtensions.cs =================================================================== diff -u -r3fb0df0ed6e64657154700ee7706e035d5bf99f5 -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/ForeshoreProfileCreateExtensions.cs (.../ForeshoreProfileCreateExtensions.cs) (revision 3fb0df0ed6e64657154700ee7706e035d5bf99f5) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/ForeshoreProfileCreateExtensions.cs (.../ForeshoreProfileCreateExtensions.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -30,7 +30,7 @@ /// /// Extension methods for related to creating a . /// - public static class ForeshoreProfileCreateExtensions + internal static class ForeshoreProfileCreateExtensions { /// /// Creates a based on the information of the . @@ -40,7 +40,7 @@ /// The index at which resides within its parent. /// A new . /// Thrown when is null. - internal static ForeshoreProfileEntity Create(this ForeshoreProfile foreshoreProfile, PersistenceRegistry registry, int order) + public static ForeshoreProfileEntity Create(this ForeshoreProfile foreshoreProfile, PersistenceRegistry registry, int order) { if (registry == null) { @@ -55,7 +55,7 @@ { Id = foreshoreProfile.Id.DeepClone(), Name = foreshoreProfile.Name.DeepClone(), - GeometryXml = new Point2DXmlSerializer().ToXml(foreshoreProfile.Geometry), + GeometryXml = new Point2DCollectionXmlSerializer().ToXml(foreshoreProfile.Geometry), X = foreshoreProfile.WorldReferencePoint.X, Y = foreshoreProfile.WorldReferencePoint.Y, X0 = foreshoreProfile.X0, Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/GrassCoverErosionInwards/DikeProfileCreateExtensions.cs =================================================================== diff -u -r3fb0df0ed6e64657154700ee7706e035d5bf99f5 -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/GrassCoverErosionInwards/DikeProfileCreateExtensions.cs (.../DikeProfileCreateExtensions.cs) (revision 3fb0df0ed6e64657154700ee7706e035d5bf99f5) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/GrassCoverErosionInwards/DikeProfileCreateExtensions.cs (.../DikeProfileCreateExtensions.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -40,7 +40,7 @@ /// Index at which this instance resides inside its parent container. /// A new . /// Thrown when is null. - internal static DikeProfileEntity Create(this DikeProfile dikeProfile, PersistenceRegistry registry, int order) + public static DikeProfileEntity Create(this DikeProfile dikeProfile, PersistenceRegistry registry, int order) { if (registry == null) { @@ -56,8 +56,8 @@ X = dikeProfile.WorldReferencePoint.X, Y = dikeProfile.WorldReferencePoint.Y, X0 = dikeProfile.X0, - DikeGeometryXml = new RoughnessPointXmlSerializer().ToXml(dikeProfile.DikeGeometry), - ForeshoreXml = new Point2DXmlSerializer().ToXml(dikeProfile.ForeshoreGeometry), + DikeGeometryXml = new RoughnessPointCollectionXmlSerializer().ToXml(dikeProfile.DikeGeometry), + ForeshoreXml = new Point2DCollectionXmlSerializer().ToXml(dikeProfile.ForeshoreGeometry), Orientation = dikeProfile.Orientation, DikeHeight = dikeProfile.DikeHeight, Id = dikeProfile.Id.DeepClone(), Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/MacroStabilityInwards/MacroStabilityInwardsFailureMechanismSectionResultCreateExtensions.cs =================================================================== diff -u -ra0e52fbfb95d4930abf6e828fc87e6f4834fb55a -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/MacroStabilityInwards/MacroStabilityInwardsFailureMechanismSectionResultCreateExtensions.cs (.../MacroStabilityInwardsFailureMechanismSectionResultCreateExtensions.cs) (revision a0e52fbfb95d4930abf6e828fc87e6f4834fb55a) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/MacroStabilityInwards/MacroStabilityInwardsFailureMechanismSectionResultCreateExtensions.cs (.../MacroStabilityInwardsFailureMechanismSectionResultCreateExtensions.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -37,8 +37,14 @@ /// /// The result to create a database entity for. /// A new . + /// Thrown when is null. public static MacroStabilityInwardsSectionResultEntity Create(this MacroStabilityInwardsFailureMechanismSectionResult result) { + if (result == null) + { + throw new ArgumentNullException(nameof(result)); + } + var sectionResultEntity = new MacroStabilityInwardsSectionResultEntity { LayerOne = Convert.ToByte(result.AssessmentLayerOne), Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/MacroStabilityInwards/MacroStabilityInwardsSoilLayer2DCreateExtensions.cs =================================================================== diff -u -r88db4d493b026e3f5bb083d1bb33bc607ff0d63e -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/MacroStabilityInwards/MacroStabilityInwardsSoilLayer2DCreateExtensions.cs (.../MacroStabilityInwardsSoilLayer2DCreateExtensions.cs) (revision 88db4d493b026e3f5bb083d1bb33bc607ff0d63e) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/MacroStabilityInwards/MacroStabilityInwardsSoilLayer2DCreateExtensions.cs (.../MacroStabilityInwardsSoilLayer2DCreateExtensions.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -52,8 +52,8 @@ MacroStabilityInwardsSoilLayerProperties properties = soilLayer.Properties; return new MacroStabilityInwardsSoilLayerTwoDEntity { - OuterRingXml = new Point2DXmlSerializer().ToXml(soilLayer.OuterRing.Points), - HolesXml = new RingXmlSerializer().ToXml(soilLayer.Holes), + OuterRingXml = new Point2DCollectionXmlSerializer().ToXml(soilLayer.OuterRing.Points), + HolesXml = new RingCollectionXmlSerializer().ToXml(soilLayer.Holes), IsAquifer = Convert.ToByte(properties.IsAquifer), MaterialName = properties.MaterialName.DeepClone(), Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/MacroStabilityInwards/MacroStabilityInwardsStochasticSoilModelCreateExtensions.cs =================================================================== diff -u -ra0e52fbfb95d4930abf6e828fc87e6f4834fb55a -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/MacroStabilityInwards/MacroStabilityInwardsStochasticSoilModelCreateExtensions.cs (.../MacroStabilityInwardsStochasticSoilModelCreateExtensions.cs) (revision a0e52fbfb95d4930abf6e828fc87e6f4834fb55a) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/MacroStabilityInwards/MacroStabilityInwardsStochasticSoilModelCreateExtensions.cs (.../MacroStabilityInwardsStochasticSoilModelCreateExtensions.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -58,7 +58,7 @@ var entity = new StochasticSoilModelEntity { Name = model.Name.DeepClone(), - StochasticSoilModelSegmentPointXml = new Point2DXmlSerializer().ToXml(model.Geometry), + StochasticSoilModelSegmentPointXml = new Point2DCollectionXmlSerializer().ToXml(model.Geometry), Order = order }; Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/MacroStabilityInwards/MacroStabilityInwardsSurfaceLineCreateExtensions.cs =================================================================== diff -u -r8e213638a22dd9f04d965d875bb58156db019be5 -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/MacroStabilityInwards/MacroStabilityInwardsSurfaceLineCreateExtensions.cs (.../MacroStabilityInwardsSurfaceLineCreateExtensions.cs) (revision 8e213638a22dd9f04d965d875bb58156db019be5) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/MacroStabilityInwards/MacroStabilityInwardsSurfaceLineCreateExtensions.cs (.../MacroStabilityInwardsSurfaceLineCreateExtensions.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -66,7 +66,7 @@ Name = surfaceLine.Name.DeepClone(), ReferenceLineIntersectionX = surfaceLine.ReferenceLineIntersectionWorldPoint.X.ToNaNAsNull(), ReferenceLineIntersectionY = surfaceLine.ReferenceLineIntersectionWorldPoint.Y.ToNaNAsNull(), - PointsXml = new Point3DXmlSerializer().ToXml(surfaceLine.Points), + PointsXml = new Point3DCollectionXmlSerializer().ToXml(surfaceLine.Points), Order = order }; CreateCharacteristicPointEntities(surfaceLine, entity); Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/Piping/PipingStochasticSoilModelCreateExtensions.cs =================================================================== diff -u -ra0e52fbfb95d4930abf6e828fc87e6f4834fb55a -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/Piping/PipingStochasticSoilModelCreateExtensions.cs (.../PipingStochasticSoilModelCreateExtensions.cs) (revision a0e52fbfb95d4930abf6e828fc87e6f4834fb55a) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/Piping/PipingStochasticSoilModelCreateExtensions.cs (.../PipingStochasticSoilModelCreateExtensions.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -62,7 +62,7 @@ var entity = new StochasticSoilModelEntity { Name = model.Name.DeepClone(), - StochasticSoilModelSegmentPointXml = new Point2DXmlSerializer().ToXml(model.Geometry), + StochasticSoilModelSegmentPointXml = new Point2DCollectionXmlSerializer().ToXml(model.Geometry), Order = order }; Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/Piping/PipingSurfaceLineCreateExtensions.cs =================================================================== diff -u -re08b5ce64ea11d4f631c96acf8c7bf7f33865f78 -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/Piping/PipingSurfaceLineCreateExtensions.cs (.../PipingSurfaceLineCreateExtensions.cs) (revision e08b5ce64ea11d4f631c96acf8c7bf7f33865f78) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/Piping/PipingSurfaceLineCreateExtensions.cs (.../PipingSurfaceLineCreateExtensions.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -43,7 +43,7 @@ /// Index at which this instance resides inside its parent container. /// A new . /// Thrown when any input parameter is null. - internal static SurfaceLineEntity Create(this PipingSurfaceLine surfaceLine, PersistenceRegistry registry, int order) + public static SurfaceLineEntity Create(this PipingSurfaceLine surfaceLine, PersistenceRegistry registry, int order) { if (surfaceLine == null) { @@ -64,7 +64,7 @@ Name = surfaceLine.Name.DeepClone(), ReferenceLineIntersectionX = surfaceLine.ReferenceLineIntersectionWorldPoint.X.ToNaNAsNull(), ReferenceLineIntersectionY = surfaceLine.ReferenceLineIntersectionWorldPoint.Y.ToNaNAsNull(), - PointsXml = new Point3DXmlSerializer().ToXml(surfaceLine.Points), + PointsXml = new Point3DCollectionXmlSerializer().ToXml(surfaceLine.Points), Order = order }; CreateCharacteristicPointEntities(surfaceLine, entity); Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/AssessmentSectionEntityReadExtensions.cs =================================================================== diff -u -r1f0cd3fafaa7340a446612870810629587474302 -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/AssessmentSectionEntityReadExtensions.cs (.../AssessmentSectionEntityReadExtensions.cs) (revision 1f0cd3fafaa7340a446612870810629587474302) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/AssessmentSectionEntityReadExtensions.cs (.../AssessmentSectionEntityReadExtensions.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -44,7 +44,7 @@ /// The object keeping track of read operations. /// A new . /// Thrown when is null. - internal static AssessmentSection Read(this AssessmentSectionEntity entity, ReadConversionCollector collector) + public static AssessmentSection Read(this AssessmentSectionEntity entity, ReadConversionCollector collector) { if (collector == null) { @@ -109,7 +109,7 @@ { if (entity.ReferenceLinePointXml != null) { - Point2D[] points = new Point2DXmlSerializer().FromXml(entity.ReferenceLinePointXml); + Point2D[] points = new Point2DCollectionXmlSerializer().FromXml(entity.ReferenceLinePointXml); var referenceLine = new ReferenceLine(); referenceLine.SetGeometry(points); Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/FailureMechanismSectionEntityReadExtensions.cs =================================================================== diff -u -r3fb0df0ed6e64657154700ee7706e035d5bf99f5 -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/FailureMechanismSectionEntityReadExtensions.cs (.../FailureMechanismSectionEntityReadExtensions.cs) (revision 3fb0df0ed6e64657154700ee7706e035d5bf99f5) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/FailureMechanismSectionEntityReadExtensions.cs (.../FailureMechanismSectionEntityReadExtensions.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -42,14 +42,14 @@ /// Thrown when is null. /// Thrown when /// of is null or empty. - internal static FailureMechanismSection Read(this FailureMechanismSectionEntity entity, ReadConversionCollector collector) + public static FailureMechanismSection Read(this FailureMechanismSectionEntity entity, ReadConversionCollector collector) { if (collector == null) { throw new ArgumentNullException(nameof(collector)); } - Point2D[] points = new Point2DXmlSerializer().FromXml(entity.FailureMechanismSectionPointXml); + Point2D[] points = new Point2DCollectionXmlSerializer().FromXml(entity.FailureMechanismSectionPointXml); var mechanismSection = new FailureMechanismSection(entity.Name, points); collector.Read(entity, mechanismSection); Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/ForeshoreProfileEntityReadExtensions.cs =================================================================== diff -u -r3fb0df0ed6e64657154700ee7706e035d5bf99f5 -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/ForeshoreProfileEntityReadExtensions.cs (.../ForeshoreProfileEntityReadExtensions.cs) (revision 3fb0df0ed6e64657154700ee7706e035d5bf99f5) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/ForeshoreProfileEntityReadExtensions.cs (.../ForeshoreProfileEntityReadExtensions.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -43,7 +43,7 @@ /// Thrown when is null. /// Thrown when /// of is null or empty. - internal static ForeshoreProfile Read(this ForeshoreProfileEntity entity, ReadConversionCollector collector) + public static ForeshoreProfile Read(this ForeshoreProfileEntity entity, ReadConversionCollector collector) { if (collector == null) { @@ -55,7 +55,7 @@ return collector.Get(entity); } - Point2D[] points = new Point2DXmlSerializer().FromXml(entity.GeometryXml); + Point2D[] points = new Point2DCollectionXmlSerializer().FromXml(entity.GeometryXml); var foreshoreProfile = new ForeshoreProfile(new Point2D(entity.X.ToNullAsNaN(), entity.Y.ToNullAsNaN()), points, Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/GrassCoverErosionInwards/DikeProfileEntityReadExtensions.cs =================================================================== diff -u -r3fb0df0ed6e64657154700ee7706e035d5bf99f5 -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/GrassCoverErosionInwards/DikeProfileEntityReadExtensions.cs (.../DikeProfileEntityReadExtensions.cs) (revision 3fb0df0ed6e64657154700ee7706e035d5bf99f5) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/GrassCoverErosionInwards/DikeProfileEntityReadExtensions.cs (.../DikeProfileEntityReadExtensions.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -43,7 +43,7 @@ /// Thrown when is null. /// Thrown when /// or of is null or empty. - internal static DikeProfile Read(this DikeProfileEntity entity, ReadConversionCollector collector) + public static DikeProfile Read(this DikeProfileEntity entity, ReadConversionCollector collector) { if (collector == null) { @@ -55,8 +55,8 @@ } var dikeProfile = new DikeProfile(new Point2D(entity.X.ToNullAsNaN(), entity.Y.ToNullAsNaN()), - new RoughnessPointXmlSerializer().FromXml(entity.DikeGeometryXml), - new Point2DXmlSerializer().FromXml(entity.ForeshoreXml), + new RoughnessPointCollectionXmlSerializer().FromXml(entity.DikeGeometryXml), + new Point2DCollectionXmlSerializer().FromXml(entity.ForeshoreXml), CreateBreakWater(entity), CreateProperties(entity)); Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/MacroStabilityInwards/MacroStabilityInwardsSoilLayerTwoDEntityReadExtensions.cs =================================================================== diff -u -r88db4d493b026e3f5bb083d1bb33bc607ff0d63e -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/MacroStabilityInwards/MacroStabilityInwardsSoilLayerTwoDEntityReadExtensions.cs (.../MacroStabilityInwardsSoilLayerTwoDEntityReadExtensions.cs) (revision 88db4d493b026e3f5bb083d1bb33bc607ff0d63e) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/MacroStabilityInwards/MacroStabilityInwardsSoilLayerTwoDEntityReadExtensions.cs (.../MacroStabilityInwardsSoilLayerTwoDEntityReadExtensions.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -48,8 +48,8 @@ throw new ArgumentNullException(nameof(entity)); } - var outerRing = new Ring(new Point2DXmlSerializer().FromXml(entity.OuterRingXml)); - Ring[] holes = new RingXmlSerializer().FromXml(entity.HolesXml); + var outerRing = new Ring(new Point2DCollectionXmlSerializer().FromXml(entity.OuterRingXml)); + Ring[] holes = new RingCollectionXmlSerializer().FromXml(entity.HolesXml); return new MacroStabilityInwardsSoilLayer2D(outerRing, holes) { Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/StochasticSoilModelEntityReadExtensions.cs =================================================================== diff -u -rd51dc83f282b0bb48c26d98e11ba32e371b8c384 -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/StochasticSoilModelEntityReadExtensions.cs (.../StochasticSoilModelEntityReadExtensions.cs) (revision d51dc83f282b0bb48c26d98e11ba32e371b8c384) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/StochasticSoilModelEntityReadExtensions.cs (.../StochasticSoilModelEntityReadExtensions.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -135,7 +135,7 @@ private static IEnumerable ReadSegmentPoints(StochasticSoilModelEntity entity) { - return new Point2DXmlSerializer().FromXml(entity.StochasticSoilModelSegmentPointXml); + return new Point2DCollectionXmlSerializer().FromXml(entity.StochasticSoilModelSegmentPointXml); } } } \ No newline at end of file Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/SurfaceLineEntityReadExtensions.cs =================================================================== diff -u -rd7264e2c19e7531625a5b408d5f9d7c15229a904 -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/SurfaceLineEntityReadExtensions.cs (.../SurfaceLineEntityReadExtensions.cs) (revision d7264e2c19e7531625a5b408d5f9d7c15229a904) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/SurfaceLineEntityReadExtensions.cs (.../SurfaceLineEntityReadExtensions.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -240,7 +240,7 @@ private static IEnumerable ReadGeometryPoints(SurfaceLineEntity entity) { - return new Point3DXmlSerializer().FromXml(entity.PointsXml); + return new Point3DCollectionXmlSerializer().FromXml(entity.PointsXml); } } } \ No newline at end of file Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Serializers/Point2DCollectionXmlSerializer.cs =================================================================== diff -u --- Application/Ringtoets/src/Application.Ringtoets.Storage/Serializers/Point2DCollectionXmlSerializer.cs (revision 0) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Serializers/Point2DCollectionXmlSerializer.cs (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -0,0 +1,63 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using System.Collections.Generic; +using System.Linq; +using Core.Common.Base.Geometry; + +namespace Application.Ringtoets.Storage.Serializers +{ + /// + /// Converter class that converts between a collection of and an + /// XML representation of that data. + /// + internal class Point2DCollectionXmlSerializer : DataCollectionSerializer + { + protected override SerializablePoint2D[] ToSerializableData(IEnumerable points) + { + return points.Select(p => new SerializablePoint2D(p)).ToArray(); + } + + protected override Point2D[] FromSerializableData(IEnumerable pointData) + { + return pointData.Select(pd => pd.ToPoint2D()).ToArray(); + } + + [Serializable] + internal class SerializablePoint2D + { + private readonly double x; + private readonly double y; + + public SerializablePoint2D(Point2D point2D) + { + x = point2D.X; + y = point2D.Y; + } + + public Point2D ToPoint2D() + { + return new Point2D(x, y); + } + } + } +} \ No newline at end of file Fisheye: Tag 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 refers to a dead (removed) revision in file `Application/Ringtoets/src/Application.Ringtoets.Storage/Serializers/Point2DXmlSerializer.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Serializers/Point3DCollectionXmlSerializer.cs =================================================================== diff -u --- Application/Ringtoets/src/Application.Ringtoets.Storage/Serializers/Point3DCollectionXmlSerializer.cs (revision 0) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Serializers/Point3DCollectionXmlSerializer.cs (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -0,0 +1,65 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using System.Collections.Generic; +using System.Linq; +using Core.Common.Base.Geometry; + +namespace Application.Ringtoets.Storage.Serializers +{ + /// + /// Converter class that converts between a collection of and an + /// XML representation of that data. + /// + internal class Point3DCollectionXmlSerializer : DataCollectionSerializer + { + protected override Point3D[] FromSerializableData(IEnumerable serializedElements) + { + return serializedElements.Select(sp => sp.ToPoint3D()).ToArray(); + } + + protected override SerializablePoint3D[] ToSerializableData(IEnumerable elements) + { + return elements.Select(p => new SerializablePoint3D(p)).ToArray(); + } + + [Serializable] + internal class SerializablePoint3D + { + private readonly double x; + private readonly double y; + private readonly double z; + + public SerializablePoint3D(Point3D point3D) + { + x = point3D.X; + y = point3D.Y; + z = point3D.Z; + } + + public Point3D ToPoint3D() + { + return new Point3D(x, y, z); + } + } + } +} \ No newline at end of file Fisheye: Tag 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 refers to a dead (removed) revision in file `Application/Ringtoets/src/Application.Ringtoets.Storage/Serializers/Point3DXmlSerializer.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Serializers/RingCollectionXmlSerializer.cs =================================================================== diff -u --- Application/Ringtoets/src/Application.Ringtoets.Storage/Serializers/RingCollectionXmlSerializer.cs (revision 0) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Serializers/RingCollectionXmlSerializer.cs (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -0,0 +1,63 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using System.Collections.Generic; +using System.Linq; +using Ringtoets.MacroStabilityInwards.Primitives; + +namespace Application.Ringtoets.Storage.Serializers +{ + /// + /// Converter class that converts between a collection of and an + /// XML representation of that data. + /// + internal class RingCollectionXmlSerializer : DataCollectionSerializer + { + protected override SerializableRing[] ToSerializableData(IEnumerable elements) + { + return elements.Select(r => new SerializableRing(r)).ToArray(); + } + + protected override Ring[] FromSerializableData(IEnumerable serializedElements) + { + return serializedElements.Select(sr => sr.ToRing()).ToArray(); + } + + [Serializable] + internal class SerializableRing + { + private readonly IEnumerable points; + + public SerializableRing(Ring ring) + { + points = ring.Points + .Select(p => new Point2DCollectionXmlSerializer.SerializablePoint2D(p)) + .ToArray(); + } + + public Ring ToRing() + { + return new Ring(points.Select(p => p.ToPoint2D())); + } + } + } +} \ No newline at end of file Fisheye: Tag 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 refers to a dead (removed) revision in file `Application/Ringtoets/src/Application.Ringtoets.Storage/Serializers/RingXmlSerializer.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Serializers/RoughnessPointCollectionXmlSerializer.cs =================================================================== diff -u --- Application/Ringtoets/src/Application.Ringtoets.Storage/Serializers/RoughnessPointCollectionXmlSerializer.cs (revision 0) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Serializers/RoughnessPointCollectionXmlSerializer.cs (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -0,0 +1,66 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using System.Collections.Generic; +using System.Linq; +using Core.Common.Base.Geometry; +using Ringtoets.Common.Data.DikeProfiles; + +namespace Application.Ringtoets.Storage.Serializers +{ + /// + /// Converter class that converts between a collection of + /// and an XML representation of that data. + /// + internal class RoughnessPointCollectionXmlSerializer : DataCollectionSerializer + { + protected override SerializableRoughnessPoint[] ToSerializableData(IEnumerable elements) + { + return elements.Select(p => new SerializableRoughnessPoint(p)).ToArray(); + } + + protected override RoughnessPoint[] FromSerializableData(IEnumerable serializedElements) + { + return serializedElements.Select(sp => sp.ToRoughnessPoint()).ToArray(); + } + + [Serializable] + internal class SerializableRoughnessPoint + { + private readonly double x; + private readonly double y; + private readonly double roughness; + + public SerializableRoughnessPoint(RoughnessPoint point) + { + x = point.Point.X; + y = point.Point.Y; + roughness = point.Roughness; + } + + public RoughnessPoint ToRoughnessPoint() + { + return new RoughnessPoint(new Point2D(x, y), roughness); + } + } + } +} \ No newline at end of file Fisheye: Tag 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 refers to a dead (removed) revision in file `Application/Ringtoets/src/Application.Ringtoets.Storage/Serializers/RoughnessPointXmlSerializer.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Application.Ringtoets.Storage.Test.csproj =================================================================== diff -u -ra1fa1538918813373bcc864f0bce092bf28fd0ce -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Application.Ringtoets.Storage.Test.csproj (.../Application.Ringtoets.Storage.Test.csproj) (revision a1fa1538918813373bcc864f0bce092bf28fd0ce) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Application.Ringtoets.Storage.Test.csproj (.../Application.Ringtoets.Storage.Test.csproj) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -167,10 +167,10 @@ - - - - + + + + Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/AssessmentSectionCreateExtensionsTest.cs =================================================================== diff -u -rb9a41aade97cb989edf90b0b15a2aebc614b7a59 -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/AssessmentSectionCreateExtensionsTest.cs (.../AssessmentSectionCreateExtensionsTest.cs) (revision b9a41aade97cb989edf90b0b15a2aebc614b7a59) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/AssessmentSectionCreateExtensionsTest.cs (.../AssessmentSectionCreateExtensionsTest.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -236,7 +236,7 @@ AssessmentSectionEntity entity = assessmentSection.Create(registry, 0); // Assert - string expectedXml = new Point2DXmlSerializer().ToXml(points); + string expectedXml = new Point2DCollectionXmlSerializer().ToXml(points); Assert.AreEqual(expectedXml, entity.ReferenceLinePointXml); } } Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/FailureMechanismSectionCreateExtensionsTest.cs =================================================================== diff -u -r3fb0df0ed6e64657154700ee7706e035d5bf99f5 -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/FailureMechanismSectionCreateExtensionsTest.cs (.../FailureMechanismSectionCreateExtensionsTest.cs) (revision 3fb0df0ed6e64657154700ee7706e035d5bf99f5) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/FailureMechanismSectionCreateExtensionsTest.cs (.../FailureMechanismSectionCreateExtensionsTest.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -66,7 +66,7 @@ // Assert Assert.IsNotNull(entity); Assert.AreEqual(testName, entity.Name); - string expectedXml = new Point2DXmlSerializer().ToXml(geometryPoints); + string expectedXml = new Point2DCollectionXmlSerializer().ToXml(geometryPoints); Assert.AreEqual(expectedXml, entity.FailureMechanismSectionPointXml); } Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/ForeshoreProfileCreateExtensionsTest.cs =================================================================== diff -u -r3fb0df0ed6e64657154700ee7706e035d5bf99f5 -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/ForeshoreProfileCreateExtensionsTest.cs (.../ForeshoreProfileCreateExtensionsTest.cs) (revision 3fb0df0ed6e64657154700ee7706e035d5bf99f5) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/ForeshoreProfileCreateExtensionsTest.cs (.../ForeshoreProfileCreateExtensionsTest.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -126,7 +126,7 @@ // Assert Assert.IsNotNull(entity); - string expectedXml = new Point2DXmlSerializer().ToXml(geometryPoints); + string expectedXml = new Point2DCollectionXmlSerializer().ToXml(geometryPoints); Assert.AreEqual(expectedXml, entity.GeometryXml); } Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionInwards/DikeProfileCreateExtensionsTest.cs =================================================================== diff -u -r3fb0df0ed6e64657154700ee7706e035d5bf99f5 -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionInwards/DikeProfileCreateExtensionsTest.cs (.../DikeProfileCreateExtensionsTest.cs) (revision 3fb0df0ed6e64657154700ee7706e035d5bf99f5) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionInwards/DikeProfileCreateExtensionsTest.cs (.../DikeProfileCreateExtensionsTest.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -83,9 +83,9 @@ Assert.AreEqual(dikeProfile.WorldReferencePoint.Y, entity.Y); Assert.AreEqual(dikeProfile.X0, entity.X0); Assert.AreEqual(order, entity.Order); - string convertedDikeGeometry = new RoughnessPointXmlSerializer().ToXml(dikeProfile.DikeGeometry); + string convertedDikeGeometry = new RoughnessPointCollectionXmlSerializer().ToXml(dikeProfile.DikeGeometry); Assert.AreEqual(convertedDikeGeometry, entity.DikeGeometryXml); - string convertedForeshoreGeometry = new Point2DXmlSerializer().ToXml(dikeProfile.ForeshoreGeometry); + string convertedForeshoreGeometry = new Point2DCollectionXmlSerializer().ToXml(dikeProfile.ForeshoreGeometry); Assert.AreEqual(convertedForeshoreGeometry, entity.ForeshoreXml); Assert.AreEqual(dikeProfile.Orientation.Value, entity.Orientation); Assert.AreEqual(dikeProfile.DikeHeight.Value, entity.DikeHeight); @@ -163,9 +163,9 @@ Assert.AreEqual(dikeProfile.WorldReferencePoint.Y, entity.Y); Assert.AreEqual(dikeProfile.X0, entity.X0); Assert.AreEqual(order, entity.Order); - string convertedDikeGeometry = new RoughnessPointXmlSerializer().ToXml(dikeProfile.DikeGeometry); + string convertedDikeGeometry = new RoughnessPointCollectionXmlSerializer().ToXml(dikeProfile.DikeGeometry); Assert.AreEqual(convertedDikeGeometry, entity.DikeGeometryXml); - string convertedForeshoreGeometry = new Point2DXmlSerializer().ToXml(dikeProfile.ForeshoreGeometry); + string convertedForeshoreGeometry = new Point2DCollectionXmlSerializer().ToXml(dikeProfile.ForeshoreGeometry); Assert.AreEqual(convertedForeshoreGeometry, entity.ForeshoreXml); Assert.AreEqual(dikeProfile.Orientation.Value, entity.Orientation); Assert.AreEqual(dikeProfile.DikeHeight.Value, entity.DikeHeight); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacroStabilityInwards/MacroStabilityInwardsFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -ra04c3ef2f95c7bac6e29306413c76e9f481e2aa0 -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacroStabilityInwards/MacroStabilityInwardsFailureMechanismSectionResultCreateExtensionsTest.cs (.../MacroStabilityInwardsFailureMechanismSectionResultCreateExtensionsTest.cs) (revision a04c3ef2f95c7bac6e29306413c76e9f481e2aa0) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacroStabilityInwards/MacroStabilityInwardsFailureMechanismSectionResultCreateExtensionsTest.cs (.../MacroStabilityInwardsFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -35,6 +35,17 @@ public class MacroStabilityInwardsFailureMechanismSectionResultCreateExtensionsTest { [Test] + public void Create_ResultNull_ThrowsArgumentNullException() + { + // Call + TestDelegate test = () => ((MacroStabilityInwardsFailureMechanismSectionResult) null).Create(); + + // Assert + var exception = Assert.Throws(test); + Assert.AreEqual("result", exception.ParamName); + } + + [Test] public void Create_WithResults_ReturnsEntityWithExpectedResults() { // Setup Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacroStabilityInwards/MacroStabilityInwardsSoilLayer2DCreateExtensionsTest.cs =================================================================== diff -u -r88db4d493b026e3f5bb083d1bb33bc607ff0d63e -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacroStabilityInwards/MacroStabilityInwardsSoilLayer2DCreateExtensionsTest.cs (.../MacroStabilityInwardsSoilLayer2DCreateExtensionsTest.cs) (revision 88db4d493b026e3f5bb083d1bb33bc607ff0d63e) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacroStabilityInwards/MacroStabilityInwardsSoilLayer2DCreateExtensionsTest.cs (.../MacroStabilityInwardsSoilLayer2DCreateExtensionsTest.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -116,18 +116,6 @@ AssertHoles(soilLayer, entity); } - private static void AssertHoles(MacroStabilityInwardsSoilLayer2D soilLayer, MacroStabilityInwardsSoilLayerTwoDEntity entity) - { - string expectedHolesXml = new RingXmlSerializer().ToXml(soilLayer.Holes); - Assert.AreEqual(expectedHolesXml, entity.HolesXml); - } - - private static void AssertOuterRing(Ring outerRing, MacroStabilityInwardsSoilLayerTwoDEntity entity) - { - string expectedOuterRingXml = new Point2DXmlSerializer().ToXml(outerRing.Points); - Assert.AreEqual(expectedOuterRingXml, entity.OuterRingXml); - } - [Test] public void Create_WithNaNProperties_ReturnsEntityWithPropertiesSetToNull() { @@ -207,6 +195,18 @@ TestHelper.AssertAreEqualButNotSame(materialName, entity.MaterialName); } + private static void AssertHoles(MacroStabilityInwardsSoilLayer2D soilLayer, MacroStabilityInwardsSoilLayerTwoDEntity entity) + { + string expectedHolesXml = new RingCollectionXmlSerializer().ToXml(soilLayer.Holes); + Assert.AreEqual(expectedHolesXml, entity.HolesXml); + } + + private static void AssertOuterRing(Ring outerRing, MacroStabilityInwardsSoilLayerTwoDEntity entity) + { + string expectedOuterRingXml = new Point2DCollectionXmlSerializer().ToXml(outerRing.Points); + Assert.AreEqual(expectedOuterRingXml, entity.OuterRingXml); + } + private static Ring CreateRandomRing(Random random) { return new Ring(new[] Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacroStabilityInwards/MacroStabilityInwardsStochasticSoilModelCreateExtensionsTest.cs =================================================================== diff -u -ra0e52fbfb95d4930abf6e828fc87e6f4834fb55a -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacroStabilityInwards/MacroStabilityInwardsStochasticSoilModelCreateExtensionsTest.cs (.../MacroStabilityInwardsStochasticSoilModelCreateExtensionsTest.cs) (revision a0e52fbfb95d4930abf6e828fc87e6f4834fb55a) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacroStabilityInwards/MacroStabilityInwardsStochasticSoilModelCreateExtensionsTest.cs (.../MacroStabilityInwardsStochasticSoilModelCreateExtensionsTest.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -81,7 +81,7 @@ CollectionAssert.IsEmpty(entity.PipingStochasticSoilProfileEntities); CollectionAssert.IsEmpty(entity.MacroStabilityInwardsStochasticSoilProfileEntities); - string expectedXml = new Point2DXmlSerializer().ToXml(stochasticSoilModel.Geometry); + string expectedXml = new Point2DCollectionXmlSerializer().ToXml(stochasticSoilModel.Geometry); Assert.AreEqual(expectedXml, entity.StochasticSoilModelSegmentPointXml); } @@ -126,7 +126,7 @@ // Assert Assert.IsNotNull(entity); - string expectedXml = new Point2DXmlSerializer().ToXml(stochasticSoilModel.Geometry); + string expectedXml = new Point2DCollectionXmlSerializer().ToXml(stochasticSoilModel.Geometry); Assert.AreEqual(expectedXml, entity.StochasticSoilModelSegmentPointXml); } Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacroStabilityInwards/MacroStabilityInwardsSurfaceLineCreateExtensionsTest.cs =================================================================== diff -u -r268d5940d8ed4a65319179de7515eaf89586ad0a -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacroStabilityInwards/MacroStabilityInwardsSurfaceLineCreateExtensionsTest.cs (.../MacroStabilityInwardsSurfaceLineCreateExtensionsTest.cs) (revision 268d5940d8ed4a65319179de7515eaf89586ad0a) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacroStabilityInwards/MacroStabilityInwardsSurfaceLineCreateExtensionsTest.cs (.../MacroStabilityInwardsSurfaceLineCreateExtensionsTest.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -84,7 +84,7 @@ Assert.AreEqual(surfaceLine.ReferenceLineIntersectionWorldPoint.Y, entity.ReferenceLineIntersectionY); Assert.AreEqual(order, entity.Order); - string expectedXml = new Point3DXmlSerializer().ToXml(new Point3D[0]); + string expectedXml = new Point3DCollectionXmlSerializer().ToXml(new Point3D[0]); Assert.AreEqual(expectedXml, entity.PointsXml); } @@ -135,7 +135,7 @@ Assert.AreEqual(surfaceLine.ReferenceLineIntersectionWorldPoint.Y, entity.ReferenceLineIntersectionY); Assert.AreEqual(order, entity.Order); - string expectedXml = new Point3DXmlSerializer().ToXml(surfaceLine.Points); + string expectedXml = new Point3DCollectionXmlSerializer().ToXml(surfaceLine.Points); Assert.AreEqual(expectedXml, entity.PointsXml); } @@ -207,7 +207,7 @@ Assert.AreEqual(surfaceLine.ReferenceLineIntersectionWorldPoint.X, entity.ReferenceLineIntersectionX); Assert.AreEqual(surfaceLine.ReferenceLineIntersectionWorldPoint.Y, entity.ReferenceLineIntersectionY); - string expectedXml = new Point3DXmlSerializer().ToXml(geometry); + string expectedXml = new Point3DCollectionXmlSerializer().ToXml(geometry); Assert.AreEqual(expectedXml, entity.PointsXml); Assert.AreEqual(14, entity.MacroStabilityInwardsCharacteristicPointEntities.Count); @@ -330,7 +330,7 @@ Assert.AreEqual(surfaceLine.ReferenceLineIntersectionWorldPoint.X, entity.ReferenceLineIntersectionX); Assert.AreEqual(surfaceLine.ReferenceLineIntersectionWorldPoint.Y, entity.ReferenceLineIntersectionY); - string expectedXml = new Point3DXmlSerializer().ToXml(geometry); + string expectedXml = new Point3DCollectionXmlSerializer().ToXml(geometry); Assert.AreEqual(expectedXml, entity.PointsXml); Assert.AreEqual(14, entity.MacroStabilityInwardsCharacteristicPointEntities.Count); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/PipingStochasticSoilModelCreateExtensionsTest.cs =================================================================== diff -u -rb018578a2c719c00258c5a32a571c1dff77d2242 -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/PipingStochasticSoilModelCreateExtensionsTest.cs (.../PipingStochasticSoilModelCreateExtensionsTest.cs) (revision b018578a2c719c00258c5a32a571c1dff77d2242) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/PipingStochasticSoilModelCreateExtensionsTest.cs (.../PipingStochasticSoilModelCreateExtensionsTest.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -84,7 +84,7 @@ CollectionAssert.IsEmpty(entity.PipingStochasticSoilProfileEntities); CollectionAssert.IsEmpty(entity.MacroStabilityInwardsStochasticSoilProfileEntities); - string expectedXml = new Point2DXmlSerializer().ToXml(stochasticSoilModel.Geometry); + string expectedXml = new Point2DCollectionXmlSerializer().ToXml(stochasticSoilModel.Geometry); Assert.AreEqual(expectedXml, entity.StochasticSoilModelSegmentPointXml); } @@ -149,7 +149,7 @@ // Assert Assert.IsNotNull(entity); - string expectedXml = new Point2DXmlSerializer().ToXml(stochasticSoilModel.Geometry); + string expectedXml = new Point2DCollectionXmlSerializer().ToXml(stochasticSoilModel.Geometry); Assert.AreEqual(expectedXml, entity.StochasticSoilModelSegmentPointXml); } Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/PipingSurfaceLineCreateExtensionsTest.cs =================================================================== diff -u -rb018578a2c719c00258c5a32a571c1dff77d2242 -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/PipingSurfaceLineCreateExtensionsTest.cs (.../PipingSurfaceLineCreateExtensionsTest.cs) (revision b018578a2c719c00258c5a32a571c1dff77d2242) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/PipingSurfaceLineCreateExtensionsTest.cs (.../PipingSurfaceLineCreateExtensionsTest.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -87,7 +87,7 @@ Assert.IsNull(entity.FailureMechanismEntity); IEnumerable points = new Point3D[0]; - string expectedXml = new Point3DXmlSerializer().ToXml(points); + string expectedXml = new Point3DCollectionXmlSerializer().ToXml(points); Assert.AreEqual(expectedXml, entity.PointsXml); } @@ -137,7 +137,7 @@ Assert.AreEqual(surfaceLine.ReferenceLineIntersectionWorldPoint.Y, entity.ReferenceLineIntersectionY); Assert.AreEqual(order, entity.Order); - string expectedXml = new Point3DXmlSerializer().ToXml(surfaceLine.Points); + string expectedXml = new Point3DCollectionXmlSerializer().ToXml(surfaceLine.Points); Assert.AreEqual(expectedXml, entity.PointsXml); Assert.IsNull(entity.FailureMechanismEntity); @@ -186,7 +186,7 @@ Assert.AreEqual(surfaceLine.ReferenceLineIntersectionWorldPoint.X, entity.ReferenceLineIntersectionX); Assert.AreEqual(surfaceLine.ReferenceLineIntersectionWorldPoint.Y, entity.ReferenceLineIntersectionY); - string expectedXml = new Point3DXmlSerializer().ToXml(geometry); + string expectedXml = new Point3DCollectionXmlSerializer().ToXml(geometry); Assert.AreEqual(expectedXml, entity.PointsXml); Assert.AreEqual(6, entity.PipingCharacteristicPointEntities.Count); @@ -261,7 +261,7 @@ Assert.AreEqual(surfaceLine.ReferenceLineIntersectionWorldPoint.X, entity.ReferenceLineIntersectionX); Assert.AreEqual(surfaceLine.ReferenceLineIntersectionWorldPoint.Y, entity.ReferenceLineIntersectionY); - string expectedXml = new Point3DXmlSerializer().ToXml(geometry); + string expectedXml = new Point3DCollectionXmlSerializer().ToXml(geometry); Assert.AreEqual(expectedXml, entity.PointsXml); Assert.AreEqual(6, entity.PipingCharacteristicPointEntities.Count); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/AssessmentSectionEntityReadExtensionsTest.cs =================================================================== diff -u -r0641053e020a1478f793ee17e753df60af26171f -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/AssessmentSectionEntityReadExtensionsTest.cs (.../AssessmentSectionEntityReadExtensionsTest.cs) (revision 0641053e020a1478f793ee17e753df60af26171f) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/AssessmentSectionEntityReadExtensionsTest.cs (.../AssessmentSectionEntityReadExtensionsTest.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -169,7 +169,7 @@ new Point2D(firstX, firstY), new Point2D(secondX, secondY) }; - entity.ReferenceLinePointXml = new Point2DXmlSerializer().ToXml(points); + entity.ReferenceLinePointXml = new Point2DCollectionXmlSerializer().ToXml(points); entity.BackgroundDataEntities.Add(CreateBackgroundDataEntity()); var collector = new ReadConversionCollector(); @@ -270,7 +270,7 @@ // Setup AssessmentSectionEntity entity = CreateAssessmentSectionEntity(); - string emptySegmentPointsXml = new Point2DXmlSerializer().ToXml(new Point2D[0]); + string emptySegmentPointsXml = new Point2DCollectionXmlSerializer().ToXml(new Point2D[0]); const string stochasticSoilModelSourcePath = "path"; var failureMechanismEntity = new FailureMechanismEntity { @@ -316,7 +316,7 @@ // Setup AssessmentSectionEntity entity = CreateAssessmentSectionEntity(); - string emptyPointsXml = new Point3DXmlSerializer().ToXml(new Point3D[0]); + string emptyPointsXml = new Point3DCollectionXmlSerializer().ToXml(new Point3D[0]); const string surfaceLineSourcePath = "some/path"; var failureMechanismEntity = new FailureMechanismEntity { @@ -489,7 +489,7 @@ // Setup AssessmentSectionEntity entity = CreateAssessmentSectionEntity(); - string emptySegmentPointsXml = new Point2DXmlSerializer().ToXml(new Point2D[0]); + string emptySegmentPointsXml = new Point2DCollectionXmlSerializer().ToXml(new Point2D[0]); const string stochasticSoilModelSourcePath = "path"; var failureMechanismEntity = new FailureMechanismEntity { @@ -535,7 +535,7 @@ // Setup AssessmentSectionEntity entity = CreateAssessmentSectionEntity(); - string emptyPointsXml = new Point3DXmlSerializer().ToXml(new Point3D[0]); + string emptyPointsXml = new Point3DCollectionXmlSerializer().ToXml(new Point3D[0]); const string surfaceLineSourcePath = "some/path"; var failureMechanismEntity = new FailureMechanismEntity { @@ -849,13 +849,13 @@ { Order = 1, Id = profileAId, - GeometryXml = new Point2DXmlSerializer().ToXml(Enumerable.Empty()) + GeometryXml = new Point2DCollectionXmlSerializer().ToXml(Enumerable.Empty()) }, new ForeshoreProfileEntity { Order = 0, Id = profileBId, - GeometryXml = new Point2DXmlSerializer().ToXml(Enumerable.Empty()) + GeometryXml = new Point2DCollectionXmlSerializer().ToXml(Enumerable.Empty()) } } }; @@ -979,13 +979,13 @@ { Order = 1, Id = profileAId, - GeometryXml = new Point2DXmlSerializer().ToXml(Enumerable.Empty()) + GeometryXml = new Point2DCollectionXmlSerializer().ToXml(Enumerable.Empty()) }, new ForeshoreProfileEntity { Order = 0, Id = profileBId, - GeometryXml = new Point2DXmlSerializer().ToXml(Enumerable.Empty()) + GeometryXml = new Point2DCollectionXmlSerializer().ToXml(Enumerable.Empty()) } }, StabilityStoneCoverFailureMechanismMetaEntities = @@ -1074,13 +1074,13 @@ { Order = 1, Id = profileAId, - GeometryXml = new Point2DXmlSerializer().ToXml(Enumerable.Empty()) + GeometryXml = new Point2DCollectionXmlSerializer().ToXml(Enumerable.Empty()) }, new ForeshoreProfileEntity { Order = 0, Id = profileBId, - GeometryXml = new Point2DXmlSerializer().ToXml(Enumerable.Empty()) + GeometryXml = new Point2DCollectionXmlSerializer().ToXml(Enumerable.Empty()) } }, WaveImpactAsphaltCoverFailureMechanismMetaEntities = @@ -1498,7 +1498,7 @@ { new Point2D(0.0, 0.0) }; - string dummyPointXml = new Point2DXmlSerializer().ToXml(dummyPointData); + string dummyPointXml = new Point2DCollectionXmlSerializer().ToXml(dummyPointData); return new[] { new FailureMechanismSectionEntity Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/FailureMechanismEntityReadExtensionsTest.cs =================================================================== diff -u -r0641053e020a1478f793ee17e753df60af26171f -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/FailureMechanismEntityReadExtensionsTest.cs (.../FailureMechanismEntityReadExtensionsTest.cs) (revision 0641053e020a1478f793ee17e753df60af26171f) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/FailureMechanismEntityReadExtensionsTest.cs (.../FailureMechanismEntityReadExtensionsTest.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -107,7 +107,7 @@ { new Point2D(0, 0) }; - string dummyPointXml = new Point2DXmlSerializer().ToXml(dummyPoints); + string dummyPointXml = new Point2DCollectionXmlSerializer().ToXml(dummyPoints); var failureMechanismSectionEntity = new FailureMechanismSectionEntity { Name = "section", @@ -351,7 +351,7 @@ public void ReadAsPipingFailureMechanism_WithStochasticSoilModelsSet_SetsPipingFailureMechanismWithStochasticSoilModels() { // Setup - string emptySegmentPointsXml = new Point2DXmlSerializer().ToXml(new Point2D[0]); + string emptySegmentPointsXml = new Point2DCollectionXmlSerializer().ToXml(new Point2D[0]); const string sourcePath = "some/Path"; var entity = new FailureMechanismEntity { @@ -427,7 +427,7 @@ public void ReadAsPipingFailureMechanism_WithSurfaceLines_SetsPipingFailureMechanismSurfaceLines() { // Setup - string emptyPointsXml = new Point3DXmlSerializer().ToXml(new Point3D[0]); + string emptyPointsXml = new Point3DCollectionXmlSerializer().ToXml(new Point3D[0]); const string sourcePath = "some/path"; var entity = new FailureMechanismEntity { @@ -697,7 +697,7 @@ public void ReadAsMacroStabilityInwardsFailureMechanism_WithStochasticSoilModelsSet_MacroStabilityInwardsFailureMechanismWithStochasticSoilModelsSet() { // Setup - string emptySegmentPointsXml = new Point2DXmlSerializer().ToXml(new Point2D[0]); + string emptySegmentPointsXml = new Point2DCollectionXmlSerializer().ToXml(new Point2D[0]); const string sourcePath = "some/Path"; var entity = new FailureMechanismEntity { @@ -773,7 +773,7 @@ public void ReadAsMacroStabilityInwardsFailureMechanism_WithSurfaceLines_MacroStabilityInwardsFailureMechanismWithSurfaceLinesSet() { // Setup - string emptyPointsXml = new Point3DXmlSerializer().ToXml(new Point3D[0]); + string emptyPointsXml = new Point3DCollectionXmlSerializer().ToXml(new Point3D[0]); const string sourcePath = "some/path"; var entity = new FailureMechanismEntity { @@ -895,8 +895,8 @@ public void ReadAsGrassCoverErosionInwardsFailureMechanism_WithDikeProfilesSet_ReturnsGrassCoverErosionInwardsFailureMechanismWithDikeProfilesAdded() { // Setup - string emptyDikeGeometryXml = new RoughnessPointXmlSerializer().ToXml(new RoughnessPoint[0]); - string emptyForeshoreBinaryXml = new Point2DXmlSerializer().ToXml(new Point2D[0]); + string emptyDikeGeometryXml = new RoughnessPointCollectionXmlSerializer().ToXml(new RoughnessPoint[0]); + string emptyForeshoreBinaryXml = new Point2DCollectionXmlSerializer().ToXml(new Point2D[0]); const string sourcePath = "some/path/to/my/dikeprofiles"; var entity = new FailureMechanismEntity { @@ -1106,13 +1106,13 @@ new ForeshoreProfileEntity { Id = "Child1", - GeometryXml = new Point2DXmlSerializer().ToXml(Enumerable.Empty()), + GeometryXml = new Point2DCollectionXmlSerializer().ToXml(Enumerable.Empty()), Order = 1 }, new ForeshoreProfileEntity { Id = "Child2", - GeometryXml = new Point2DXmlSerializer().ToXml(Enumerable.Empty()), + GeometryXml = new Point2DCollectionXmlSerializer().ToXml(Enumerable.Empty()), Order = 0 } }, @@ -1396,13 +1396,13 @@ new ForeshoreProfileEntity { Id = "Child1", - GeometryXml = new Point2DXmlSerializer().ToXml(Enumerable.Empty()), + GeometryXml = new Point2DCollectionXmlSerializer().ToXml(Enumerable.Empty()), Order = 1 }, new ForeshoreProfileEntity { Id = "Child2", - GeometryXml = new Point2DXmlSerializer().ToXml(Enumerable.Empty()), + GeometryXml = new Point2DCollectionXmlSerializer().ToXml(Enumerable.Empty()), Order = 0 } }, @@ -1559,13 +1559,13 @@ new ForeshoreProfileEntity { Id = "Child1", - GeometryXml = new Point2DXmlSerializer().ToXml(Enumerable.Empty()), + GeometryXml = new Point2DCollectionXmlSerializer().ToXml(Enumerable.Empty()), Order = 1 }, new ForeshoreProfileEntity { Id = "Child2", - GeometryXml = new Point2DXmlSerializer().ToXml(Enumerable.Empty()), + GeometryXml = new Point2DCollectionXmlSerializer().ToXml(Enumerable.Empty()), Order = 0 } }, @@ -1682,13 +1682,13 @@ new ForeshoreProfileEntity { Id = "Child1", - GeometryXml = new Point2DXmlSerializer().ToXml(Enumerable.Empty()), + GeometryXml = new Point2DCollectionXmlSerializer().ToXml(Enumerable.Empty()), Order = 1 }, new ForeshoreProfileEntity { Id = "Child2", - GeometryXml = new Point2DXmlSerializer().ToXml(Enumerable.Empty()), + GeometryXml = new Point2DCollectionXmlSerializer().ToXml(Enumerable.Empty()), Order = 0 } }, @@ -1913,13 +1913,13 @@ new ForeshoreProfileEntity { Id = "Child1", - GeometryXml = new Point2DXmlSerializer().ToXml(Enumerable.Empty()), + GeometryXml = new Point2DCollectionXmlSerializer().ToXml(Enumerable.Empty()), Order = 1 }, new ForeshoreProfileEntity { Id = "Child2", - GeometryXml = new Point2DXmlSerializer().ToXml(Enumerable.Empty()), + GeometryXml = new Point2DCollectionXmlSerializer().ToXml(Enumerable.Empty()), Order = 0 } }, @@ -2165,13 +2165,13 @@ new ForeshoreProfileEntity { Id = "Child1", - GeometryXml = new Point2DXmlSerializer().ToXml(Enumerable.Empty()), + GeometryXml = new Point2DCollectionXmlSerializer().ToXml(Enumerable.Empty()), Order = 1 }, new ForeshoreProfileEntity { Id = "Child2", - GeometryXml = new Point2DXmlSerializer().ToXml(Enumerable.Empty()), + GeometryXml = new Point2DCollectionXmlSerializer().ToXml(Enumerable.Empty()), Order = 0 } }, Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/FailureMechanismSectionEntityReadExtensionsTest.cs =================================================================== diff -u -r3fb0df0ed6e64657154700ee7706e035d5bf99f5 -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/FailureMechanismSectionEntityReadExtensionsTest.cs (.../FailureMechanismSectionEntityReadExtensionsTest.cs) (revision 3fb0df0ed6e64657154700ee7706e035d5bf99f5) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/FailureMechanismSectionEntityReadExtensionsTest.cs (.../FailureMechanismSectionEntityReadExtensionsTest.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -71,7 +71,7 @@ { new Point2D(0, 0) }; - string pointXml = new Point2DXmlSerializer().ToXml(points); + string pointXml = new Point2DCollectionXmlSerializer().ToXml(points); var entity = new FailureMechanismSectionEntity { Name = name, Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ForeshoreProfileReadExtensionsTest.cs =================================================================== diff -u -rfe90a6d174a01975381e6cda55ed1f7f4e831a51 -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ForeshoreProfileReadExtensionsTest.cs (.../ForeshoreProfileReadExtensionsTest.cs) (revision fe90a6d174a01975381e6cda55ed1f7f4e831a51) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ForeshoreProfileReadExtensionsTest.cs (.../ForeshoreProfileReadExtensionsTest.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -54,7 +54,7 @@ var entity = new ForeshoreProfileEntity { Id = "id", - GeometryXml = new Point2DXmlSerializer().ToXml(new Point2D[0]) + GeometryXml = new Point2DCollectionXmlSerializer().ToXml(new Point2D[0]) }; // Precondition @@ -92,7 +92,7 @@ // Setup const string name = "testName"; const string id = "testId"; - string pointXml = new Point2DXmlSerializer().ToXml(Enumerable.Empty()); + string pointXml = new Point2DCollectionXmlSerializer().ToXml(Enumerable.Empty()); var entity = new ForeshoreProfileEntity { Id = id, @@ -133,7 +133,7 @@ { new Point2D(0, 0) }; - string pointXml = new Point2DXmlSerializer().ToXml(points); + string pointXml = new Point2DCollectionXmlSerializer().ToXml(points); var entity = new ForeshoreProfileEntity { Order = order, Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/GrassCoverErosionInwards/DikeProfileEntityReadExtensionsTest.cs =================================================================== diff -u -r3fb0df0ed6e64657154700ee7706e035d5bf99f5 -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/GrassCoverErosionInwards/DikeProfileEntityReadExtensionsTest.cs (.../DikeProfileEntityReadExtensionsTest.cs) (revision 3fb0df0ed6e64657154700ee7706e035d5bf99f5) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/GrassCoverErosionInwards/DikeProfileEntityReadExtensionsTest.cs (.../DikeProfileEntityReadExtensionsTest.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -63,8 +63,8 @@ var entity = new DikeProfileEntity { Id = "id", - ForeshoreXml = new Point2DXmlSerializer().ToXml(new Point2D[0]), - DikeGeometryXml = new RoughnessPointXmlSerializer().ToXml(new RoughnessPoint[0]) + ForeshoreXml = new Point2DCollectionXmlSerializer().ToXml(new Point2D[0]), + DikeGeometryXml = new RoughnessPointCollectionXmlSerializer().ToXml(new RoughnessPoint[0]) }; // Precondition @@ -138,8 +138,8 @@ Orientation = 45.67, BreakWaterHeight = null, BreakWaterType = null, - ForeshoreXml = new Point2DXmlSerializer().ToXml(foreshorePoints), - DikeGeometryXml = new RoughnessPointXmlSerializer().ToXml(roughnessPoints), + ForeshoreXml = new Point2DCollectionXmlSerializer().ToXml(foreshorePoints), + DikeGeometryXml = new RoughnessPointCollectionXmlSerializer().ToXml(roughnessPoints), DikeHeight = 1.2, X = 3.4, Y = 5.6, @@ -186,8 +186,8 @@ Orientation = 360.0, BreakWaterHeight = height, BreakWaterType = Convert.ToByte(type), - ForeshoreXml = new Point2DXmlSerializer().ToXml(foreshorePoints), - DikeGeometryXml = new RoughnessPointXmlSerializer().ToXml(roughnessPoints), + ForeshoreXml = new Point2DCollectionXmlSerializer().ToXml(foreshorePoints), + DikeGeometryXml = new RoughnessPointCollectionXmlSerializer().ToXml(roughnessPoints), DikeHeight = 4.5, X = 93.0, Y = 945.6, Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/GrassCoverErosionInwards/GrassCoverErosionInwardsCalculationEntityReadExtensionsTest.cs =================================================================== diff -u -r73a1d6d9249e3c0e40603afaec38ff3c3f404764 -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/GrassCoverErosionInwards/GrassCoverErosionInwardsCalculationEntityReadExtensionsTest.cs (.../GrassCoverErosionInwardsCalculationEntityReadExtensionsTest.cs) (revision 73a1d6d9249e3c0e40603afaec38ff3c3f404764) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/GrassCoverErosionInwards/GrassCoverErosionInwardsCalculationEntityReadExtensionsTest.cs (.../GrassCoverErosionInwardsCalculationEntityReadExtensionsTest.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -195,8 +195,8 @@ var dikeProfileEntity = new DikeProfileEntity { Id = "a", - DikeGeometryXml = new RoughnessPointXmlSerializer().ToXml(new RoughnessPoint[0]), - ForeshoreXml = new Point2DXmlSerializer().ToXml(new Point2D[0]) + DikeGeometryXml = new RoughnessPointCollectionXmlSerializer().ToXml(new RoughnessPoint[0]), + ForeshoreXml = new Point2DCollectionXmlSerializer().ToXml(new Point2D[0]) }; var entity = new GrassCoverErosionInwardsCalculationEntity { Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/GrassCoverErosionOutwards/GrassCoverErosionOutwardsWaveConditionsCalculationEntityReadExtensionsTest.cs =================================================================== diff -u -r38414ee18cb869ba91e6b70abc4019a39ea2e08c -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/GrassCoverErosionOutwards/GrassCoverErosionOutwardsWaveConditionsCalculationEntityReadExtensionsTest.cs (.../GrassCoverErosionOutwardsWaveConditionsCalculationEntityReadExtensionsTest.cs) (revision 38414ee18cb869ba91e6b70abc4019a39ea2e08c) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/GrassCoverErosionOutwards/GrassCoverErosionOutwardsWaveConditionsCalculationEntityReadExtensionsTest.cs (.../GrassCoverErosionOutwardsWaveConditionsCalculationEntityReadExtensionsTest.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -165,7 +165,7 @@ var foreshoreProfile = new TestForeshoreProfile(); var foreshoreProfileEntity = new ForeshoreProfileEntity { - GeometryXml = new Point2DXmlSerializer().ToXml(Enumerable.Empty()) + GeometryXml = new Point2DCollectionXmlSerializer().ToXml(Enumerable.Empty()) }; var entity = new GrassCoverErosionOutwardsWaveConditionsCalculationEntity { @@ -190,7 +190,7 @@ var foreshoreProfileEntity = new ForeshoreProfileEntity { Id = id, - GeometryXml = new Point2DXmlSerializer().ToXml(Enumerable.Empty()) + GeometryXml = new Point2DCollectionXmlSerializer().ToXml(Enumerable.Empty()) }; var entity = new GrassCoverErosionOutwardsWaveConditionsCalculationEntity Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/HeightStructures/HeightStructuresCalculationEntityReadExtensionsTest.cs =================================================================== diff -u -rfe90a6d174a01975381e6cda55ed1f7f4e831a51 -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/HeightStructures/HeightStructuresCalculationEntityReadExtensionsTest.cs (.../HeightStructuresCalculationEntityReadExtensionsTest.cs) (revision fe90a6d174a01975381e6cda55ed1f7f4e831a51) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/HeightStructures/HeightStructuresCalculationEntityReadExtensionsTest.cs (.../HeightStructuresCalculationEntityReadExtensionsTest.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -151,7 +151,7 @@ { new Point2D(0, 0) }; - string pointXml = new Point2DXmlSerializer().ToXml(points); + string pointXml = new Point2DCollectionXmlSerializer().ToXml(points); var foreshoreEntity = new ForeshoreProfileEntity { Id = "id", Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MacroStabilityInwards/MacroStabilityInwardsSoilLayerTwoDEntityReadExtensionsTest.cs =================================================================== diff -u -r88db4d493b026e3f5bb083d1bb33bc607ff0d63e -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MacroStabilityInwards/MacroStabilityInwardsSoilLayerTwoDEntityReadExtensionsTest.cs (.../MacroStabilityInwardsSoilLayerTwoDEntityReadExtensionsTest.cs) (revision 88db4d493b026e3f5bb083d1bb33bc607ff0d63e) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MacroStabilityInwards/MacroStabilityInwardsSoilLayerTwoDEntityReadExtensionsTest.cs (.../MacroStabilityInwardsSoilLayerTwoDEntityReadExtensionsTest.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -111,8 +111,8 @@ PopMean = popMean, PopCoefficientOfVariation = popCoefficientOfVariation, - OuterRingXml = new Point2DXmlSerializer().ToXml(outerRingPoints), - HolesXml = new RingXmlSerializer().ToXml(holes) + OuterRingXml = new Point2DCollectionXmlSerializer().ToXml(outerRingPoints), + HolesXml = new RingCollectionXmlSerializer().ToXml(holes) }; // Call @@ -159,8 +159,8 @@ var entity = new MacroStabilityInwardsSoilLayerTwoDEntity { MaterialName = nameof(MacroStabilityInwardsSoilLayerTwoDEntity), - OuterRingXml = new Point2DXmlSerializer().ToXml(CreateRandomRing(new Random(31)).Points), - HolesXml = new RingXmlSerializer().ToXml(new Ring[0]) + OuterRingXml = new Point2DCollectionXmlSerializer().ToXml(CreateRandomRing(new Random(31)).Points), + HolesXml = new RingCollectionXmlSerializer().ToXml(new Ring[0]) }; // Call Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MacroStabilityInwards/MacroStabilityInwardsSoilProfileTwoDEntityReadExtensionsTest.cs =================================================================== diff -u -r88db4d493b026e3f5bb083d1bb33bc607ff0d63e -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MacroStabilityInwards/MacroStabilityInwardsSoilProfileTwoDEntityReadExtensionsTest.cs (.../MacroStabilityInwardsSoilProfileTwoDEntityReadExtensionsTest.cs) (revision 88db4d493b026e3f5bb083d1bb33bc607ff0d63e) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MacroStabilityInwards/MacroStabilityInwardsSoilProfileTwoDEntityReadExtensionsTest.cs (.../MacroStabilityInwardsSoilProfileTwoDEntityReadExtensionsTest.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -80,8 +80,8 @@ new Point2D(random.NextDouble(), random.NextDouble()) }); - var point2DXmlSerializer = new Point2DXmlSerializer(); - var ringXmlSerializer = new RingXmlSerializer(); + var point2DXmlSerializer = new Point2DCollectionXmlSerializer(); + var ringXmlSerializer = new RingCollectionXmlSerializer(); var entity = new MacroStabilityInwardsSoilProfileTwoDEntity { Name = nameof(MacroStabilityInwardsSoilProfileTwoDEntity), Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/Piping/PipingCalculationEntityReadExtensionsTest.cs =================================================================== diff -u -r07552978e68ab62d36f7086f9f5c84411a2fee9f -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/Piping/PipingCalculationEntityReadExtensionsTest.cs (.../PipingCalculationEntityReadExtensionsTest.cs) (revision 07552978e68ab62d36f7086f9f5c84411a2fee9f) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/Piping/PipingCalculationEntityReadExtensionsTest.cs (.../PipingCalculationEntityReadExtensionsTest.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -169,7 +169,7 @@ var surfaceLineEntity = new SurfaceLineEntity { Name = "surface line", - PointsXml = new Point3DXmlSerializer().ToXml(points) + PointsXml = new Point3DCollectionXmlSerializer().ToXml(points) }; var entity = new PipingCalculationEntity @@ -296,7 +296,7 @@ var stochasticSoilModelEntity = new StochasticSoilModelEntity { Name = "StochasticSoilModel", - StochasticSoilModelSegmentPointXml = new Point2DXmlSerializer().ToXml(new Point2D[0]), + StochasticSoilModelSegmentPointXml = new Point2DCollectionXmlSerializer().ToXml(new Point2D[0]), PipingStochasticSoilProfileEntities = { stochasticSoilProfileEntity Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/Piping/PipingFailureMechanismMetaEntityReadExtensionsTest.cs =================================================================== diff -u -r668c7fb9df618f1c1e1fc0b5ab2ae3ab58c85d8e -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/Piping/PipingFailureMechanismMetaEntityReadExtensionsTest.cs (.../PipingFailureMechanismMetaEntityReadExtensionsTest.cs) (revision 668c7fb9df618f1c1e1fc0b5ab2ae3ab58c85d8e) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/Piping/PipingFailureMechanismMetaEntityReadExtensionsTest.cs (.../PipingFailureMechanismMetaEntityReadExtensionsTest.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -38,7 +38,7 @@ var input = new PipingProbabilityAssessmentInput(); // Call - TestDelegate test = () => ((PipingFailureMechanismMetaEntity)null).ReadProbabilityAssessmentInput(input); + TestDelegate test = () => ((PipingFailureMechanismMetaEntity) null).ReadProbabilityAssessmentInput(input); // Assert var exception = Assert.Throws(test); @@ -83,7 +83,7 @@ var input = new GeneralPipingInput(); // Call - TestDelegate test = () => ((PipingFailureMechanismMetaEntity)null).ReadGeneralPipingInput(input); + TestDelegate test = () => ((PipingFailureMechanismMetaEntity) null).ReadGeneralPipingInput(input); // Assert var exception = Assert.Throws(test); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StabilityStoneCover/StabilityStoneCoverWaveConditionsCalculationEntityReadExtensionsTest.cs =================================================================== diff -u -r38414ee18cb869ba91e6b70abc4019a39ea2e08c -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StabilityStoneCover/StabilityStoneCoverWaveConditionsCalculationEntityReadExtensionsTest.cs (.../StabilityStoneCoverWaveConditionsCalculationEntityReadExtensionsTest.cs) (revision 38414ee18cb869ba91e6b70abc4019a39ea2e08c) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StabilityStoneCover/StabilityStoneCoverWaveConditionsCalculationEntityReadExtensionsTest.cs (.../StabilityStoneCoverWaveConditionsCalculationEntityReadExtensionsTest.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -165,7 +165,7 @@ var foreshoreProfile = new TestForeshoreProfile(); var foreshoreProfileEntity = new ForeshoreProfileEntity { - GeometryXml = new Point2DXmlSerializer().ToXml(Enumerable.Empty()) + GeometryXml = new Point2DCollectionXmlSerializer().ToXml(Enumerable.Empty()) }; var entity = new StabilityStoneCoverWaveConditionsCalculationEntity { @@ -190,7 +190,7 @@ var foreshoreProfileEntity = new ForeshoreProfileEntity { Id = id, - GeometryXml = new Point2DXmlSerializer().ToXml(Enumerable.Empty()) + GeometryXml = new Point2DCollectionXmlSerializer().ToXml(Enumerable.Empty()) }; var entity = new StabilityStoneCoverWaveConditionsCalculationEntity Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StochasticSoilModelEntityReadExtensionsTest.cs =================================================================== diff -u -r88db4d493b026e3f5bb083d1bb33bc607ff0d63e -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StochasticSoilModelEntityReadExtensionsTest.cs (.../StochasticSoilModelEntityReadExtensionsTest.cs) (revision 88db4d493b026e3f5bb083d1bb33bc607ff0d63e) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StochasticSoilModelEntityReadExtensionsTest.cs (.../StochasticSoilModelEntityReadExtensionsTest.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -91,7 +91,7 @@ var entity = new StochasticSoilModelEntity { Name = testName, - StochasticSoilModelSegmentPointXml = new Point2DXmlSerializer().ToXml(new Point2D[0]) + StochasticSoilModelSegmentPointXml = new Point2DCollectionXmlSerializer().ToXml(new Point2D[0]) }; var collector = new ReadConversionCollector(); @@ -110,7 +110,7 @@ var entity = new StochasticSoilModelEntity { Name = "StochasticSoilModel", - StochasticSoilModelSegmentPointXml = new Point2DXmlSerializer().ToXml(new Point2D[0]), + StochasticSoilModelSegmentPointXml = new Point2DCollectionXmlSerializer().ToXml(new Point2D[0]), PipingStochasticSoilProfileEntities = { new PipingStochasticSoilProfileEntity @@ -166,7 +166,7 @@ var entity = new StochasticSoilModelEntity { Name = "StochasticSoilModel", - StochasticSoilModelSegmentPointXml = new Point2DXmlSerializer().ToXml(segmentPoints) + StochasticSoilModelSegmentPointXml = new Point2DCollectionXmlSerializer().ToXml(segmentPoints) }; var collector = new ReadConversionCollector(); @@ -184,7 +184,7 @@ var entity = new StochasticSoilModelEntity { Name = "StochasticSoilModel", - StochasticSoilModelSegmentPointXml = new Point2DXmlSerializer().ToXml(new Point2D[0]) + StochasticSoilModelSegmentPointXml = new Point2DCollectionXmlSerializer().ToXml(new Point2D[0]) }; var collector = new ReadConversionCollector(); @@ -253,7 +253,7 @@ var entity = new StochasticSoilModelEntity { Name = testName, - StochasticSoilModelSegmentPointXml = new Point2DXmlSerializer().ToXml(new Point2D[0]) + StochasticSoilModelSegmentPointXml = new Point2DCollectionXmlSerializer().ToXml(new Point2D[0]) }; var collector = new ReadConversionCollector(); @@ -272,14 +272,14 @@ var entity = new StochasticSoilModelEntity { Name = "StochasticSoilModel", - StochasticSoilModelSegmentPointXml = new Point2DXmlSerializer().ToXml(new Point2D[0]), + StochasticSoilModelSegmentPointXml = new Point2DCollectionXmlSerializer().ToXml(new Point2D[0]), MacroStabilityInwardsStochasticSoilProfileEntities = { new MacroStabilityInwardsStochasticSoilProfileEntity { MacroStabilityInwardsSoilProfileOneDEntity = new MacroStabilityInwardsSoilProfileOneDEntity { - MacroStabilityInwardsSoilLayerOneDEntities = + MacroStabilityInwardsSoilLayerOneDEntities = { new MacroStabilityInwardsSoilLayerOneDEntity() }, @@ -328,7 +328,7 @@ var entity = new StochasticSoilModelEntity { Name = "StochasticSoilModel", - StochasticSoilModelSegmentPointXml = new Point2DXmlSerializer().ToXml(segmentPoints) + StochasticSoilModelSegmentPointXml = new Point2DCollectionXmlSerializer().ToXml(segmentPoints) }; var collector = new ReadConversionCollector(); @@ -346,7 +346,7 @@ var entity = new StochasticSoilModelEntity { Name = "StochasticSoilModel", - StochasticSoilModelSegmentPointXml = new Point2DXmlSerializer().ToXml(new Point2D[0]) + StochasticSoilModelSegmentPointXml = new Point2DCollectionXmlSerializer().ToXml(new Point2D[0]) }; var collector = new ReadConversionCollector(); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/SurfaceLineEntityReadExtensionsTest.cs =================================================================== diff -u -rd7264e2c19e7531625a5b408d5f9d7c15229a904 -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/SurfaceLineEntityReadExtensionsTest.cs (.../SurfaceLineEntityReadExtensionsTest.cs) (revision d7264e2c19e7531625a5b408d5f9d7c15229a904) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/SurfaceLineEntityReadExtensionsTest.cs (.../SurfaceLineEntityReadExtensionsTest.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -93,7 +93,7 @@ Name = "nice name!", ReferenceLineIntersectionX = random.NextDouble(), ReferenceLineIntersectionY = random.NextDouble(), - PointsXml = new Point3DXmlSerializer().ToXml(new Point3D[0]) + PointsXml = new Point3DCollectionXmlSerializer().ToXml(new Point3D[0]) }; // Call @@ -133,7 +133,7 @@ Name = nameof(SurfaceLineEntity), ReferenceLineIntersectionX = random.NextDouble(), ReferenceLineIntersectionY = random.NextDouble(), - PointsXml = new Point3DXmlSerializer().ToXml(points) + PointsXml = new Point3DCollectionXmlSerializer().ToXml(points) }; // Call @@ -177,7 +177,7 @@ Name = "Better name.", ReferenceLineIntersectionX = random.NextDouble(), ReferenceLineIntersectionY = random.NextDouble(), - PointsXml = new Point3DXmlSerializer().ToXml(points), + PointsXml = new Point3DCollectionXmlSerializer().ToXml(points), PipingCharacteristicPointEntities = { CreatePipingCharacteristicPointEntity(points[1], PipingCharacteristicPointType.BottomDitchDikeSide), @@ -225,7 +225,7 @@ Name = "Better name.", ReferenceLineIntersectionX = random.NextDouble(), ReferenceLineIntersectionY = random.NextDouble(), - PointsXml = new Point3DXmlSerializer().ToXml(points), + PointsXml = new Point3DCollectionXmlSerializer().ToXml(points), PipingCharacteristicPointEntities = { CreatePipingCharacteristicPointEntity(points[0], PipingCharacteristicPointType.BottomDitchDikeSide), @@ -274,7 +274,7 @@ var entity = new SurfaceLineEntity { Name = "name", - PointsXml = new Point3DXmlSerializer().ToXml(points), + PointsXml = new Point3DCollectionXmlSerializer().ToXml(points), PipingCharacteristicPointEntities = { CreatePipingCharacteristicPointEntity(points[0], PipingCharacteristicPointType.BottomDitchDikeSide), @@ -315,7 +315,7 @@ var entity = new SurfaceLineEntity { Name = "surface line", - PointsXml = new Point3DXmlSerializer().ToXml(new Point3D[0]) + PointsXml = new Point3DCollectionXmlSerializer().ToXml(new Point3D[0]) }; // Call @@ -385,7 +385,7 @@ Name = "nice name!", ReferenceLineIntersectionX = random.NextDouble(), ReferenceLineIntersectionY = random.NextDouble(), - PointsXml = new Point3DXmlSerializer().ToXml(new Point3D[0]) + PointsXml = new Point3DCollectionXmlSerializer().ToXml(new Point3D[0]) }; // Call @@ -433,7 +433,7 @@ Name = nameof(SurfaceLineEntity), ReferenceLineIntersectionX = random.NextDouble(), ReferenceLineIntersectionY = random.NextDouble(), - PointsXml = new Point3DXmlSerializer().ToXml(points) + PointsXml = new Point3DCollectionXmlSerializer().ToXml(points) }; // Call @@ -476,7 +476,7 @@ Name = "Better name.", ReferenceLineIntersectionX = random.NextDouble(), ReferenceLineIntersectionY = random.NextDouble(), - PointsXml = new Point3DXmlSerializer().ToXml(points), + PointsXml = new Point3DCollectionXmlSerializer().ToXml(points), MacroStabilityInwardsCharacteristicPointEntities = { CreateMacroStabilityInwardsCharacteristicPointEntity(points[0], MacroStabilityInwardsCharacteristicPointType.SurfaceLevelOutside), @@ -540,7 +540,7 @@ Name = "Better name.", ReferenceLineIntersectionX = random.NextDouble(), ReferenceLineIntersectionY = random.NextDouble(), - PointsXml = new Point3DXmlSerializer().ToXml(points), + PointsXml = new Point3DCollectionXmlSerializer().ToXml(points), MacroStabilityInwardsCharacteristicPointEntities = { CreateMacroStabilityInwardsCharacteristicPointEntity(points[0], MacroStabilityInwardsCharacteristicPointType.SurfaceLevelOutside), @@ -605,7 +605,7 @@ var entity = new SurfaceLineEntity { Name = "name", - PointsXml = new Point3DXmlSerializer().ToXml(points), + PointsXml = new Point3DCollectionXmlSerializer().ToXml(points), MacroStabilityInwardsCharacteristicPointEntities = { CreateMacroStabilityInwardsCharacteristicPointEntity(points[0], MacroStabilityInwardsCharacteristicPointType.SurfaceLevelOutside), @@ -662,7 +662,7 @@ var entity = new SurfaceLineEntity { Name = "surface line", - PointsXml = new Point3DXmlSerializer().ToXml(new Point3D[0]) + PointsXml = new Point3DCollectionXmlSerializer().ToXml(new Point3D[0]) }; // Call Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/WaveImpactAsphaltCover/WaveImpactAsphaltCoverWaveConditionsCalculationEntityReadExtensionsTest.cs =================================================================== diff -u -r38414ee18cb869ba91e6b70abc4019a39ea2e08c -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/WaveImpactAsphaltCover/WaveImpactAsphaltCoverWaveConditionsCalculationEntityReadExtensionsTest.cs (.../WaveImpactAsphaltCoverWaveConditionsCalculationEntityReadExtensionsTest.cs) (revision 38414ee18cb869ba91e6b70abc4019a39ea2e08c) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/WaveImpactAsphaltCover/WaveImpactAsphaltCoverWaveConditionsCalculationEntityReadExtensionsTest.cs (.../WaveImpactAsphaltCoverWaveConditionsCalculationEntityReadExtensionsTest.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -165,7 +165,7 @@ var foreshoreProfile = new TestForeshoreProfile(); var foreshoreProfileEntity = new ForeshoreProfileEntity { - GeometryXml = new Point2DXmlSerializer().ToXml(Enumerable.Empty()) + GeometryXml = new Point2DCollectionXmlSerializer().ToXml(Enumerable.Empty()) }; var entity = new WaveImpactAsphaltCoverWaveConditionsCalculationEntity { @@ -190,7 +190,7 @@ var foreshoreProfileEntity = new ForeshoreProfileEntity { Id = id, - GeometryXml = new Point2DXmlSerializer().ToXml(Enumerable.Empty()) + GeometryXml = new Point2DCollectionXmlSerializer().ToXml(Enumerable.Empty()) }; var entity = new WaveImpactAsphaltCoverWaveConditionsCalculationEntity Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Serializers/Point2DCollectionXmlSerializerTest.cs =================================================================== diff -u --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Serializers/Point2DCollectionXmlSerializerTest.cs (revision 0) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Serializers/Point2DCollectionXmlSerializerTest.cs (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -0,0 +1,82 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using Application.Ringtoets.Storage.Serializers; +using Core.Common.Base.Geometry; +using NUnit.Framework; + +namespace Application.Ringtoets.Storage.Test.Serializers +{ + [TestFixture] + public class Point2DCollectionXmlSerializerTest + { + [Test] + public void Constructor_ExpectedValues() + { + // Call + var serializer = new Point2DCollectionXmlSerializer(); + + // Assert + Assert.IsInstanceOf>(serializer); + } + + [Test] + public void GivenArrayWithPoint2D_WhenConvertingRoundTrip_ThenEqualArrayOfPoints2D() + { + // Given + var original = new[] + { + new Point2D(-7.7, -6.6), + new Point2D(-5.5, -4.4), + new Point2D(-3.3, -2.2), + new Point2D(-1.1, 0.0), + new Point2D(1.1, 2.2), + new Point2D(3.3, 4.4), + new Point2D(5.5, 6.6), + new Point2D(7.7, 8.8), + new Point2D(9.9, 10.10) + }; + var serializer = new Point2DCollectionXmlSerializer(); + + // When + string xml = serializer.ToXml(original); + Point2D[] roundtripResult = serializer.FromXml(xml); + + // Then + CollectionAssert.AreEqual(original, roundtripResult); + } + + [Test] + public void GivenEmptyArray_WhenConvertingRoundTrip_ThenReturnEmptyArray() + { + // Given + var original = new Point2D[0]; + var serializer = new Point2DCollectionXmlSerializer(); + + // When + string xml = serializer.ToXml(original); + Point2D[] roundtripResult = serializer.FromXml(xml); + + // Then + CollectionAssert.IsEmpty(roundtripResult); + } + } +} \ No newline at end of file Fisheye: Tag 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 refers to a dead (removed) revision in file `Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Serializers/Point2DXmlSerializerTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Serializers/Point3DCollectionXmlSerializerTest.cs =================================================================== diff -u --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Serializers/Point3DCollectionXmlSerializerTest.cs (revision 0) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Serializers/Point3DCollectionXmlSerializerTest.cs (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -0,0 +1,79 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using Application.Ringtoets.Storage.Serializers; +using Core.Common.Base.Geometry; +using NUnit.Framework; + +namespace Application.Ringtoets.Storage.Test.Serializers +{ + [TestFixture] + public class Point3DCollectionXmlSerializerTest + { + [Test] + public void Constructor_ExpectedValues() + { + // Call + var serializer = new Point3DCollectionXmlSerializer(); + + // Assert + Assert.IsInstanceOf>(serializer); + } + + [Test] + public void GivenArrayWithPoint3D_WhenConvertingRoundTrip_ThenEqualArrayOfPoints3D() + { + // Given + var original = new[] + { + new Point3D(-6.6, -5.5, -4.4), + new Point3D(-3.3, -2.2, -1.1), + new Point3D(0.0, 1.1, 2.2), + new Point3D(3.3, 4.4, 5.5), + new Point3D(6.6, 7.7, 8.8), + new Point3D(9.9, 10.10, 11.11) + }; + var serializer = new Point3DCollectionXmlSerializer(); + + // When + string xml = serializer.ToXml(original); + Point3D[] roundtripResult = serializer.FromXml(xml); + + // Then + CollectionAssert.AreEqual(original, roundtripResult); + } + + [Test] + public void GivenEmptyArray_WhenConvertingRoundTrip_ThenReturnEmptyArray() + { + // Given + var original = new Point3D[0]; + var serializer = new Point3DCollectionXmlSerializer(); + + // When + string xml = serializer.ToXml(original); + Point3D[] roundtripResult = serializer.FromXml(xml); + + // Then + CollectionAssert.IsEmpty(roundtripResult); + } + } +} \ No newline at end of file Fisheye: Tag 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 refers to a dead (removed) revision in file `Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Serializers/Point3DXmlSerializerTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Serializers/RingCollectionXmlSerializerTest.cs =================================================================== diff -u --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Serializers/RingCollectionXmlSerializerTest.cs (revision 0) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Serializers/RingCollectionXmlSerializerTest.cs (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -0,0 +1,90 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using Application.Ringtoets.Storage.Serializers; +using Core.Common.Base.Geometry; +using NUnit.Framework; +using Ringtoets.MacroStabilityInwards.Primitives; + +namespace Application.Ringtoets.Storage.Test.Serializers +{ + [TestFixture] + public class RingCollectionXmlSerializerTest + { + [Test] + public void Constructor_ExpectedValues() + { + // Call + var serializer = new RingCollectionXmlSerializer(); + + // Assert + Assert.IsInstanceOf>(serializer); + } + + [Test] + public void GivenArrayOfRings_WhenConvertingRoundTrip_ThenEqualRings() + { + // Given + var random = new Random(31); + var original = new[] + { + new Ring(new[] + { + new Point2D(random.NextDouble(), random.NextDouble()), + new Point2D(random.NextDouble(), random.NextDouble()), + new Point2D(random.NextDouble(), random.NextDouble()), + new Point2D(random.NextDouble(), random.NextDouble()), + new Point2D(random.NextDouble(), random.NextDouble()), + new Point2D(random.NextDouble(), random.NextDouble()) + }), + new Ring(new[] + { + new Point2D(random.NextDouble(), random.NextDouble()), + new Point2D(random.NextDouble(), random.NextDouble()) + }) + }; + var serializer = new RingCollectionXmlSerializer(); + + // When + string xml = serializer.ToXml(original); + Ring[] roundtripResult = serializer.FromXml(xml); + + // Then + CollectionAssert.AreEqual(original, roundtripResult); + } + + [Test] + public void GivenEmptyArray_WhenConvertingRoundTrip_ThenReturnEmptyArray() + { + // Given + var original = new Ring[0]; + var serializer = new RingCollectionXmlSerializer(); + + // When + string xml = serializer.ToXml(original); + Ring[] roundtripResult = serializer.FromXml(xml); + + // Then + CollectionAssert.IsEmpty(roundtripResult); + } + } +} \ No newline at end of file Fisheye: Tag 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 refers to a dead (removed) revision in file `Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Serializers/RingXmlSerializerTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Serializers/RoughnessPointCollectionXmlSerializerTest.cs =================================================================== diff -u --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Serializers/RoughnessPointCollectionXmlSerializerTest.cs (revision 0) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Serializers/RoughnessPointCollectionXmlSerializerTest.cs (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -0,0 +1,98 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System.Collections; +using Application.Ringtoets.Storage.Serializers; +using Core.Common.Base.Geometry; +using NUnit.Framework; +using Ringtoets.Common.Data.DikeProfiles; + +namespace Application.Ringtoets.Storage.Test.Serializers +{ + [TestFixture] + public class RoughnessPointCollectionXmlSerializerTest + { + [Test] + public void Constructor_ExpectedValues() + { + // Call + var serializer = new RoughnessPointCollectionXmlSerializer(); + + // Assert + Assert.IsInstanceOf>(serializer); + } + + [Test] + public void GivenArrayWithPoint2D_WhenConvertingRoundTrip_ThenEqualArrayOfPoints2D() + { + // Given + var original = new[] + { + new RoughnessPoint(new Point2D(-7.7, -6.6), 0.5), + new RoughnessPoint(new Point2D(-5.5, -4.4), 0.6), + new RoughnessPoint(new Point2D(-3.3, -2.2), 0.7), + new RoughnessPoint(new Point2D(-1.1, 0.0), 0.8), + new RoughnessPoint(new Point2D(1.1, 2.2), 0.9), + new RoughnessPoint(new Point2D(3.3, 4.4), 1.0), + new RoughnessPoint(new Point2D(5.5, 6.6), 0.9), + new RoughnessPoint(new Point2D(7.7, 8.8), 0.8), + new RoughnessPoint(new Point2D(9.9, 10.10), 0.7) + }; + var converter = new RoughnessPointCollectionXmlSerializer(); + + // When + string xml = converter.ToXml(original); + RoughnessPoint[] roundtripResult = converter.FromXml(xml); + + // Then + CollectionAssert.AreEqual(original, roundtripResult, new RoughnessPointComparer()); + } + + [Test] + public void GivenEmptyArray_WhenConvertingRoundTrip_ThenReturnEmptyArray() + { + // Given + var original = new RoughnessPoint[0]; + var converter = new RoughnessPointCollectionXmlSerializer(); + + // When + string xml = converter.ToXml(original); + RoughnessPoint[] roundtripResult = converter.FromXml(xml); + + // Then + CollectionAssert.IsEmpty(roundtripResult); + } + + private class RoughnessPointComparer : IComparer + { + public int Compare(object x, object y) + { + var x1 = (RoughnessPoint) x; + var y1 = (RoughnessPoint) y; + if (x1.Point.Equals(y1.Point) && x1.Roughness.Equals(y1.Roughness)) + { + return 0; + } + return 1; + } + } + } +} \ No newline at end of file Fisheye: Tag 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 refers to a dead (removed) revision in file `Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Serializers/RoughnessPointXmlSerializerTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil.Test/MacroStabilityInwardsSoilLayerTwoDEntityTestFactoryTest.cs =================================================================== diff -u -r88db4d493b026e3f5bb083d1bb33bc607ff0d63e -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil.Test/MacroStabilityInwardsSoilLayerTwoDEntityTestFactoryTest.cs (.../MacroStabilityInwardsSoilLayerTwoDEntityTestFactoryTest.cs) (revision 88db4d493b026e3f5bb083d1bb33bc607ff0d63e) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil.Test/MacroStabilityInwardsSoilLayerTwoDEntityTestFactoryTest.cs (.../MacroStabilityInwardsSoilLayerTwoDEntityTestFactoryTest.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -37,10 +37,10 @@ MacroStabilityInwardsSoilLayerTwoDEntity entity = MacroStabilityInwardsSoilLayerTwoDEntityTestFactory.CreateMacroStabilityInwardsSoilLayerTwoDEntity(); // Assert - Point2D[] outerRing = new Point2DXmlSerializer().FromXml(entity.OuterRingXml); + Point2D[] outerRing = new Point2DCollectionXmlSerializer().FromXml(entity.OuterRingXml); Assert.AreEqual(2, outerRing.Length); - Ring[] holes = new RingXmlSerializer().FromXml(entity.HolesXml); + Ring[] holes = new RingCollectionXmlSerializer().FromXml(entity.HolesXml); Assert.AreEqual(0, holes.Length); } } Index: Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/MacroStabilityInwardsSoilLayerTwoDEntityTestFactory.cs =================================================================== diff -u -r88db4d493b026e3f5bb083d1bb33bc607ff0d63e -r1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7 --- Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/MacroStabilityInwardsSoilLayerTwoDEntityTestFactory.cs (.../MacroStabilityInwardsSoilLayerTwoDEntityTestFactory.cs) (revision 88db4d493b026e3f5bb083d1bb33bc607ff0d63e) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/MacroStabilityInwardsSoilLayerTwoDEntityTestFactory.cs (.../MacroStabilityInwardsSoilLayerTwoDEntityTestFactory.cs) (revision 1c2f91dd3d03b28ce5e493b068bc34ca4dfc9db7) @@ -47,8 +47,8 @@ return new MacroStabilityInwardsSoilLayerTwoDEntity { - OuterRingXml = new Point2DXmlSerializer().ToXml(outerRing.Points), - HolesXml = new RingXmlSerializer().ToXml(new Ring[0]) + OuterRingXml = new Point2DCollectionXmlSerializer().ToXml(outerRing.Points), + HolesXml = new RingCollectionXmlSerializer().ToXml(new Ring[0]) }; } }