Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/PipingSoilProfileReaderTest.cs =================================================================== diff -u -r15d2770669092ea9574682421c755fc9b6c2e16f -r41d06d91a2ef710ad07b3f474f190400751e09b8 --- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/PipingSoilProfileReaderTest.cs (.../PipingSoilProfileReaderTest.cs) (revision 15d2770669092ea9574682421c755fc9b6c2e16f) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/PipingSoilProfileReaderTest.cs (.../PipingSoilProfileReaderTest.cs) (revision 41d06d91a2ef710ad07b3f474f190400751e09b8) @@ -6,7 +6,6 @@ using System.Linq; using Core.Common.TestUtils; using NUnit.Framework; -using NUnit.Framework.Constraints; using Ringtoets.Piping.Data; using Ringtoets.Piping.IO.Exceptions; using Ringtoets.Piping.IO.Properties; @@ -154,6 +153,32 @@ } [Test] + public void ReadProfile_DatabaseProfileWithVerticalSegmentAtX_SkipsTheProfile() + { + // Setup + var testFile = "vertical2dGeometry.soil"; + using (var pipingSoilProfilesReader = new PipingSoilProfileReader(Path.Combine(testDataPath, testFile))) + { + // Call + TestDelegate profile = () => pipingSoilProfilesReader.ReadProfile(); + + // Assert + var exception = Assert.Throws(profile); + var message = String.Format(Resources.PipingSoilProfileReader_CouldNotParseGeometryOfLayer_0_InProfile_1_, 1, "Profile"); + Assert.AreEqual(message, exception.Message); + + // Call + var pipingSoilProfile = pipingSoilProfilesReader.ReadProfile(); + + // Assert + Assert.AreEqual("Profile2", pipingSoilProfile.Name); + Assert.AreEqual(3, pipingSoilProfile.Layers.Count()); + + Assert.IsTrue(FileHelper.CanOpenFileForWrite(testFile)); + } + } + + [Test] public void ReadProfile_DatabaseProfileWithoutValuesForLayerProperties_ReturnsProfileWithAllLayers() { // Setup