Index: DamClients/DamUI/trunk/src/Dam/Deltares.Dam.Tests/PolyLineTest.cs =================================================================== diff -u -r4625 -r4638 --- DamClients/DamUI/trunk/src/Dam/Deltares.Dam.Tests/PolyLineTest.cs (.../PolyLineTest.cs) (revision 4625) +++ DamClients/DamUI/trunk/src/Dam/Deltares.Dam.Tests/PolyLineTest.cs (.../PolyLineTest.cs) (revision 4638) @@ -39,15 +39,15 @@ public void LineWithoutPointsShouldNotExist() { var polyLine = new PolyLine(); - Assert.IsFalse(polyLine.Exists()); + Assert.That(polyLine.Exists(), Is.False); } [Test] public void LineWithOnePointShouldNotExist() { var polyLine = new PolyLine(); polyLine.Points.Add(new GeometryPoint()); - Assert.IsFalse(polyLine.Exists()); + Assert.That(polyLine.Exists(), Is.False); } [Test] @@ -59,35 +59,35 @@ { X = 1.0 }); - Assert.IsTrue(polyLine.Exists()); + Assert.That(polyLine.Exists(), Is.True); } [Test] public void CheckIfLineWithAscendingXIsEvaluatedCorrectlyAsAscending() { PolyLine polyLine = CreateStrictAscendingPolyLine(); - Assert.IsTrue(polyLine.IsXAscending()); + Assert.That(polyLine.IsXAscending(), Is.True); } [Test] public void CheckIfLineWithNotStrictAscendingXIsEvaluatedCorrectlyAsAscending() { PolyLine polyLine = CreateNotStrictAscendingPolyLine(); - Assert.IsTrue(polyLine.IsXAscending()); + Assert.That(polyLine.IsXAscending(), Is.True); } [Test] public void CheckIfLineWithNotStrictAscendingXIsEvaluatedCorrectlyAsNotStrictAscending() { PolyLine polyLine = CreateNotStrictAscendingPolyLine(); - Assert.IsFalse(polyLine.IsXStrictAscending()); + Assert.That(polyLine.IsXStrictAscending(), Is.False); } [Test] public void CheckIfLineWithNotAscendingXIsEvaluatedCorrectlyAsNotAscending() { PolyLine polyLine = CreateNotAscendingPolyLine(); - Assert.IsFalse(polyLine.IsXAscending()); + Assert.That(polyLine.IsXAscending(), Is.False); } [Test] @@ -135,7 +135,7 @@ { PolyLine polyLine1 = CreateStrictAscendingPolyLine(); PolyLine polyLine2 = CreateNotStrictAscendingPolyLine(); - Assert.IsFalse(polyLine1.Equals(polyLine2)); + Assert.That(polyLine1.Equals(polyLine2), Is.False); } /// @@ -159,7 +159,7 @@ { PolyLine polyLine1 = CreateStrictAscendingPolyLine(); PolyLine polyLine2 = CreateStrictAscendingPolyLine(); - Assert.IsTrue(polyLine1.Equals(polyLine2)); + Assert.That(polyLine1.Equals(polyLine2), Is.True); } /// @@ -175,7 +175,7 @@ EndPoint = new GeometryPoint(5, 0, -1) }; IList intersectionPoints = polyLine1.IntersectionPointsXzWithLineXz(line); - Assert.IsTrue(intersectionPoints.Count == 1); + Assert.That(intersectionPoints, Has.Count.EqualTo(1)); Assert.That(intersectionPoints[0].X, Is.EqualTo(1.0).Within(GeometryPoint.Precision)); Assert.That(intersectionPoints[0].Z, Is.EqualTo(-1.0).Within(GeometryPoint.Precision)); } @@ -190,7 +190,7 @@ EndPoint = new GeometryPoint(-3, 0, -1) }; IList intersectionPoints = polyLine1.IntersectionPointsXzWithLineXz(line); - Assert.IsTrue(intersectionPoints.Count == 0); + Assert.That(intersectionPoints, Is.Empty); } [Test] @@ -203,7 +203,7 @@ EndPoint = new GeometryPoint(15, 0, -1) }; IList intersectionPoints = polyLine1.IntersectionPointsXzWithLineXz(line); - Assert.IsTrue(intersectionPoints.Count == 2); + Assert.That(intersectionPoints, Has.Count.EqualTo(2)); Assert.That(intersectionPoints[0].X, Is.EqualTo(1.0).Within(GeometryPoint.Precision)); Assert.That(intersectionPoints[0].Z, Is.EqualTo(-1.0).Within(GeometryPoint.Precision)); Assert.That(intersectionPoints[1].X, Is.EqualTo(11.0).Within(GeometryPoint.Precision));