Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Maps/Test/Domain/FeatureTest.cs =================================================================== diff -u -r3825 -r3828 --- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Maps/Test/Domain/FeatureTest.cs (.../FeatureTest.cs) (revision 3825) +++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Maps/Test/Domain/FeatureTest.cs (.../FeatureTest.cs) (revision 3828) @@ -71,19 +71,18 @@ } [Test] - //[ExpectedException(typeof(ArgumentException), ExpectedMessage = "There was an error parsing the WKT geometry string, maybe due to an incorrect culture format conversion")] // NB This test fails when you change the decimal separator to a point in Dutch regional settings on your computer - [Ignore("[ExpectedException(typeof(ArgumentException))]")] public void FeatueCreation_DutchCultureWktStringFormat_Throws() { Action test = () => { - string geometryWkt = string.Format("MULTIPOINT ({0} {1},{2} {3})", 0.1, 0.2, 0.3, 0.4); + string geometryWkt = $"MULTIPOINT ({0.1} {0.2},{0.3} {0.4})"; feature = Feature.Create(geometryWkt); }; - CultureHelper.InvokeWithDutchCulture(test); + Assert.That(() => CultureHelper.InvokeWithDutchCulture(test), + Throws.InstanceOf().With.Message.Contains("There was an error parsing the WKT geometry string, maybe due to an incorrect culture format conversion")); } [Test] Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Maps/Test/Domain/CoverageFunctionTest.cs =================================================================== diff -u -r3825 -r3828 --- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Maps/Test/Domain/CoverageFunctionTest.cs (.../CoverageFunctionTest.cs) (revision 3825) +++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Maps/Test/Domain/CoverageFunctionTest.cs (.../CoverageFunctionTest.cs) (revision 3828) @@ -140,7 +140,6 @@ } [Test] - [Ignore("[ExpectedException(typeof(FeatureCoverageException), ExpectedMessage = 'Multiple geometries found covering point (0 0)']")] public void UsingCoverageFunction_MoreThenOneGeometyFoundAtGivenLocation_Throws() { var square = new Polygon(new LinearRing(new[] @@ -166,11 +165,10 @@ Func func = repository.GetCoverageFunc(); - func(attribute, 0, 0); + Assert.That(() => func(attribute, 0, 0), Throws.InstanceOf().With.Message.EqualTo("Multiple geometries found covering point (0 0)")); } [Test] - [Ignore("[ExpectedException(typeof(FeatureCoverageException), ExpectedMessage = 'No geometries found covering point (10 10)')]")] public void UsingCoverageFunction_NoGeometyFoundAtGivenLocation_Throws() { var square = new Polygon(new LinearRing(new[] @@ -195,7 +193,7 @@ mocks.ReplayAll(); Func func = repository.GetCoverageFunc(); - func("SomeAttribute", 10, 10); + Assert.That(() => func("SomeAttribute", 10, 10), Throws.InstanceOf().With.Message.EqualTo("No geometries found covering point (10 10)")); } [Test] Index: DamClients/DamUI/trunk/src/Dam/Tests/CsvImporterTestsNew.cs =================================================================== diff -u -r3826 -r3828 --- DamClients/DamUI/trunk/src/Dam/Tests/CsvImporterTestsNew.cs (.../CsvImporterTestsNew.cs) (revision 3826) +++ DamClients/DamUI/trunk/src/Dam/Tests/CsvImporterTestsNew.cs (.../CsvImporterTestsNew.cs) (revision 3828) @@ -785,7 +785,7 @@ Assert.That(locationRecords[0].ForbiddenZoneFactor, Is.EqualTo(0.5).Within(tolerance)); Assert.That(locationRecords[1].ForbiddenZoneFactor, Is.EqualTo(0.9).Within(tolerance)); Assert.That(locationRecords[0].PlLineOffsetBelowDikeCrestMiddle, Is.EqualTo(1.0).Within(tolerance)); - Assert.That(locationRecords[1].PlLineOffsetBelowDikeCrestMiddle, Is.EqualTo(1.0).Within(tolerance)); + Assert.That(locationRecords[1].PlLineOffsetBelowDikeCrestMiddle, Is.EqualTo(1.1).Within(tolerance)); Assert.That(locationRecords[0].UsePlLineOffsetBelowDikeCrestMiddle, Is.Null); Assert.That(locationRecords[1].UsePlLineOffsetBelowDikeCrestMiddle, Is.Null); Assert.That(locationRecords[0].PlLineOffsetFactorBelowShoulderCrest, Is.EqualTo(0.1).Within(tolerance));