Index: Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Kernels/UpliftVan/Input/StabilityPointComparerTest.cs =================================================================== diff -u -rac08d3630fab7772b99f905b59fd2bf0121c2a7f -rb7b4dd7ed383ae8d27dbc16a31863caf9e4153a8 --- Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Kernels/UpliftVan/Input/StabilityPointComparerTest.cs (.../StabilityPointComparerTest.cs) (revision ac08d3630fab7772b99f905b59fd2bf0121c2a7f) +++ Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Kernels/UpliftVan/Input/StabilityPointComparerTest.cs (.../StabilityPointComparerTest.cs) (revision b7b4dd7ed383ae8d27dbc16a31863caf9e4153a8) @@ -34,8 +34,6 @@ [Test] public void Constructor_ExpectedValues() { - // Setup - // Call var comparer = new StabilityPointComparer(); @@ -54,11 +52,11 @@ var comparer = new StabilityPointComparer(); // Call - TestDelegate call = () => comparer.Compare(firstObject, secondObject); + void Call() => comparer.Compare(firstObject, secondObject); // Assert - string message = Assert.Throws(call).Message; - Assert.AreEqual($"Cannot compare objects other than {typeof(Point2D)} with this comparer.", message); + var exception = Assert.Throws(Call); + Assert.AreEqual($"Cannot compare objects other than {typeof(Point2D)} with this comparer.", exception.Message); } [Test] @@ -71,11 +69,11 @@ var comparer = new StabilityPointComparer(); // Call - TestDelegate call = () => comparer.Compare(firstObject, secondObject); + void Call() => comparer.Compare(firstObject, secondObject); // Assert - string message = Assert.Throws(call).Message; - Assert.AreEqual($"Cannot compare objects other than {typeof(Point2D)} with this comparer.", message); + var exception = Assert.Throws(Call); + Assert.AreEqual($"Cannot compare objects other than {typeof(Point2D)} with this comparer.", exception.Message); } [Test]