Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/DikesDesign/SurfaceLineAdapterTest.cs =================================================================== diff -u -r3520 -r3875 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/DikesDesign/SurfaceLineAdapterTest.cs (.../SurfaceLineAdapterTest.cs) (revision 3520) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/DikesDesign/SurfaceLineAdapterTest.cs (.../SurfaceLineAdapterTest.cs) (revision 3875) @@ -33,20 +33,18 @@ { private readonly Location location = new Location(); - [TestFixtureTearDown] + [TearDown] public void TestFixtureTearDown() { } [Test] - [ExpectedException(typeof(ArgumentNullException))] public void ThrowsAnExceptionWhenSurfaceLineIsNull() { - new StubSurfaceLineAdapter(null, location, 0); + Assert.That(() => new StubSurfaceLineAdapter(null, location, 0), Throws.InstanceOf()); } [Test] - [ExpectedException(typeof(SurfaceLineAdapterException))] public void ThrowsAnExceptionWhenSurfaceLineHasNoDike() { var surfaceLine = new SurfaceLine2 @@ -61,11 +59,10 @@ surfaceLine.EnsurePoint(1, 0); surfaceLine.EnsurePoint(2, 0); surfaceLine.EnsurePoint(3, 0); - new StubSurfaceLineAdapter(surfaceLine, location, 0); + Assert.That(() => new StubSurfaceLineAdapter(surfaceLine, location, 0), Throws.InstanceOf()); } [Test] - [ExpectedException(typeof(SurfaceLineAdapterException))] public void ThrowsAnExceptionWhenSurfaceLineDoesNotComplyToSpecificationUsingZeroCoordValues() { var surfaceLine1 = new SurfaceLine2 @@ -80,11 +77,10 @@ surfaceLine1.EnsurePointOfType(0, 0, CharacteristicPointType.DikeTopAtRiver); surfaceLine1.EnsurePointOfType(0, 0, CharacteristicPointType.DikeTopAtPolder); surfaceLine1.EnsurePointOfType(0, 0, CharacteristicPointType.DikeToeAtPolder); - new StubSurfaceLineAdapter(surfaceLine1, location, 0); + Assert.That(() => new StubSurfaceLineAdapter(surfaceLine1, location, 0), Throws.InstanceOf()); } [Test] - [ExpectedException(typeof(SurfaceLineAdapterException))] public void ThrowsAnExceptionWhenSurfaceLineDoesNotComplyToSpecificationUsingAskewDikeTop() { var surfaceLine1 = new SurfaceLine2 @@ -102,11 +98,10 @@ surfaceLine1.EnsurePointOfType(p2.X, p2.Z, CharacteristicPointType.DikeTopAtRiver); surfaceLine1.EnsurePointOfType(p3.X, p3.Z, CharacteristicPointType.DikeTopAtPolder); surfaceLine1.EnsurePointOfType(p1.X, p1.Z, CharacteristicPointType.DikeToeAtPolder); - new StubSurfaceLineAdapter(surfaceLine1, location, 0); + Assert.That(() => new StubSurfaceLineAdapter(surfaceLine1, location, 0), Throws.InstanceOf()); } [Test] - [ExpectedException(typeof(SurfaceLineAdapterException))] public void ThrowsAnExceptionWhenSurfaceLineDoesNotComplyToSpecificationUsingAskewTopShoulderInside() { var surfaceLine1 = new SurfaceLine2 @@ -128,7 +123,7 @@ surfaceLine1.EnsurePointOfType(p4.X, p4.Z, CharacteristicPointType.ShoulderBaseInside); surfaceLine1.EnsurePointOfType(p5.X, p5.Z, CharacteristicPointType.ShoulderTopInside); surfaceLine1.EnsurePointOfType(p1.X, p1.Z, CharacteristicPointType.DikeToeAtPolder); - new StubSurfaceLineAdapter(surfaceLine1, location, 0); + Assert.That(() => new StubSurfaceLineAdapter(surfaceLine1, location, 0), Throws.InstanceOf()); } class StubSurfaceLineAdapter : SurfaceLineAdapter