Index: Core/Common/test/Core.Common.Base.Test/Data/RoundedDoubleTest.cs =================================================================== diff -u -r7f759fbabca9c41e75d229269f1b21581b373b5f -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Base.Test/Data/RoundedDoubleTest.cs (.../RoundedDoubleTest.cs) (revision 7f759fbabca9c41e75d229269f1b21581b373b5f) +++ Core/Common/test/Core.Common.Base.Test/Data/RoundedDoubleTest.cs (.../RoundedDoubleTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -23,11 +23,9 @@ using System.ComponentModel; using System.Globalization; using System.Linq; - using Core.Common.Base.Data; using Core.Common.Base.TypeConverters; using Core.Common.TestUtil; - using NUnit.Framework; namespace Core.Common.Base.Test.Data @@ -226,7 +224,7 @@ [TestCase("F7", double.NegativeInfinity, 2, "-Oneindig")] [TestCase("G3", double.PositiveInfinity, 2, "Oneindig")] public void ToString_WithFormatAndCurrentCultureVariousScenarios_ExpectedText(string format, - double value, int numberOfDecimals, string expectedText) + double value, int numberOfDecimals, string expectedText) { // Setup var roundedValue = new RoundedDouble(numberOfDecimals, value); @@ -262,7 +260,7 @@ [TestCase("F7", double.NegativeInfinity, 2, "-Oneindig")] [TestCase("G3", double.PositiveInfinity, 2, "Oneindig")] public void ToString_WithFormatAndDifferentCultureVariousScenarios_ExpectedText(string format, - double value, int numberOfDecimals, string expectedText) + double value, int numberOfDecimals, string expectedText) { // Setup var roundedValue = new RoundedDouble(numberOfDecimals, value); @@ -307,7 +305,7 @@ var roundedDouble = new RoundedDouble(5); // Call - bool isEqual = roundedDouble.Equals((object)roundedDouble); + bool isEqual = roundedDouble.Equals((object) roundedDouble); // Assert Assert.IsTrue(isEqual); @@ -499,7 +497,7 @@ // Precondition: Assert.IsTrue(otherValue.Equals(roundedDouble)); - + // Call var hash1 = roundedDouble.GetHashCode(); var hash2 = otherValue.GetHashCode(); @@ -589,7 +587,7 @@ { // Setup var roundedDouble = new RoundedDouble(4, 3.2154); - + // Call double convertedValue = roundedDouble; @@ -604,7 +602,7 @@ double doubleValue = 1.23456789; // Call - RoundedDouble roundedDoubleValue = (RoundedDouble)doubleValue; + RoundedDouble roundedDoubleValue = (RoundedDouble) doubleValue; // Assert Assert.AreEqual(doubleValue, roundedDoubleValue.Value); @@ -705,8 +703,8 @@ double doubleValue = 5.67891234; // Call - RoundedDouble result1 = roundedDouble * doubleValue; - RoundedDouble result2 = doubleValue * roundedDouble; + RoundedDouble result1 = roundedDouble*doubleValue; + RoundedDouble result2 = doubleValue*roundedDouble; // Assert Assert.AreEqual(roundedDouble.NumberOfDecimalPlaces, result1.NumberOfDecimalPlaces); @@ -724,7 +722,7 @@ var roundedDouble2 = new RoundedDouble(5, -3.45678); // Call - RoundedDouble result = roundedDouble1 * roundedDouble2; + RoundedDouble result = roundedDouble1*roundedDouble2; // Assert Assert.AreEqual(2, result.NumberOfDecimalPlaces); @@ -739,7 +737,7 @@ var roundedDouble2 = new RoundedDouble(3, -9.123); // Call - RoundedDouble result = roundedDouble1 * roundedDouble2; + RoundedDouble result = roundedDouble1*roundedDouble2; // Assert Assert.AreEqual(3, result.NumberOfDecimalPlaces); @@ -754,8 +752,8 @@ var roundedDouble2 = new RoundedDouble(2, 2.22); // Call - RoundedDouble result1 = roundedDouble1 * roundedDouble2; - RoundedDouble result2 = roundedDouble2 * roundedDouble1; + RoundedDouble result1 = roundedDouble1*roundedDouble2; + RoundedDouble result2 = roundedDouble2*roundedDouble1; // Assert Assert.AreEqual(result1.NumberOfDecimalPlaces, result2.NumberOfDecimalPlaces); Index: Core/Common/test/Core.Common.Base.Test/Data/RoundedPoint2DCollectionTest.cs =================================================================== diff -u -rce31448a066c084f755439f3e7d453bfb042b291 -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Base.Test/Data/RoundedPoint2DCollectionTest.cs (.../RoundedPoint2DCollectionTest.cs) (revision ce31448a066c084f755439f3e7d453bfb042b291) +++ Core/Common/test/Core.Common.Base.Test/Data/RoundedPoint2DCollectionTest.cs (.../RoundedPoint2DCollectionTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -91,7 +91,7 @@ RoundedPoint2DCollection collection = new RoundedPoint2DCollection(numberOfDecimals, points); // Assert - Point2D[] expectedPoints = + Point2D[] expectedPoints = { new Point2D(2.35, 3.85), new Point2D(4.63, 2.10), Index: Core/Common/test/Core.Common.Base.Test/Geometry/Math2DTest.cs =================================================================== diff -u -re2719484be4a10aecf59be5a999943bb01688ec0 -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Base.Test/Geometry/Math2DTest.cs (.../Math2DTest.cs) (revision e2719484be4a10aecf59be5a999943bb01688ec0) +++ Core/Common/test/Core.Common.Base.Test/Geometry/Math2DTest.cs (.../Math2DTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -240,10 +240,17 @@ } [Test] - [TestCase(2.5, new [] {3.3})] + [TestCase(2.5, new[] + { + 3.3 + })] [TestCase(1.1, new double[0])] [TestCase(5.5, new double[0])] - [TestCase(-1.5, new []{1.5, 3.75})] + [TestCase(-1.5, new[] + { + 1.5, + 3.75 + })] public void SegmentsIntersectionWithVerticalLine_SegmentsCollectionNotIntersecting_ReturnsEmptyCollection(double x, double[] intersectionHeights) { // Setup @@ -444,7 +451,6 @@ }, lineSplits[3], doubleToleranceComparer); } - [Test] [TestCase(0, "segment1")] [TestCase(1, "segment2")] @@ -453,8 +459,8 @@ // Setup var segments = new[] { - new Segment2D(new Point2D(0,0), new Point2D(0,1)), - new Segment2D(new Point2D(0,0), new Point2D(0,1)) + new Segment2D(new Point2D(0, 0), new Point2D(0, 1)), + new Segment2D(new Point2D(0, 0), new Point2D(0, 1)) }; segments[nullIndex] = null; @@ -477,7 +483,7 @@ { // Setup const double y1 = 2.2; - double y2 = y1+dy; + double y2 = y1 + dy; const double x1 = 1.1; const double x2 = 3.3; @@ -589,7 +595,7 @@ double dx) { // Setup - Func getY = x => 1.1 * x + 2.2; + Func getY = x => 1.1*x + 2.2; const double x1 = 1.1; const double x2 = 3.3; var segment1 = new Segment2D(new Point2D(x1, getY(x1)), new Point2D(x2, getY(x2))); @@ -644,7 +650,10 @@ // Assert Assert.AreEqual(Intersection2DType.Intersects, result.IntersectionType); - CollectionAssert.AreEqual(new[] { segmentCommonPoint }, result.IntersectionPoints); + CollectionAssert.AreEqual(new[] + { + segmentCommonPoint + }, result.IntersectionPoints); } [Test] @@ -685,8 +694,11 @@ // Assert Assert.AreEqual(Intersection2DType.Intersects, result.IntersectionType); - CollectionAssert.AreEqual(new[] { segmentCommonPoint }, result.IntersectionPoints, - new Point2DComparerWithTolerance(1e-6)); + CollectionAssert.AreEqual(new[] + { + segmentCommonPoint + }, result.IntersectionPoints, + new Point2DComparerWithTolerance(1e-6)); } [Test] @@ -698,7 +710,7 @@ int configurationNumber) { // Setup - Func getY = x => 3.3 * x + 4.4; + Func getY = x => 3.3*x + 4.4; const double x1 = 5.5; const double x2 = 6.6; @@ -725,13 +737,16 @@ { segment2 = new Segment2D(segmentCommonPoint, segment2UniquePoint); } - + // Call Segment2DIntersectSegment2DResult result = Math2D.GetIntersectionBetweenSegments(segment1, segment2); // Assert Assert.AreEqual(Intersection2DType.Intersects, result.IntersectionType); - CollectionAssert.AreEqual(new[]{segmentCommonPoint}, result.IntersectionPoints); + CollectionAssert.AreEqual(new[] + { + segmentCommonPoint + }, result.IntersectionPoints); } [Test] @@ -774,8 +789,10 @@ // Assert Assert.AreEqual(Intersection2DType.Intersects, result.IntersectionType); - CollectionAssert.AreEqual(new[] { pointOnSegment }, result.IntersectionPoints, - new Point2DComparerWithTolerance(1e-6)); + CollectionAssert.AreEqual(new[] + { + pointOnSegment + }, result.IntersectionPoints, new Point2DComparerWithTolerance(1e-6)); } [Test] @@ -802,9 +819,17 @@ // Assert Assert.AreEqual(Intersection2DType.Overlaps, result.IntersectionType); - var expectedOverlappingPoints = dy >= 0 ? - new[] { verticalSegment1.FirstPoint, verticalSegment2.SecondPoint }: - new[] { verticalSegment1.SecondPoint, verticalSegment2.FirstPoint }; + var expectedOverlappingPoints = dy >= 0 ? + new[] + { + verticalSegment1.FirstPoint, + verticalSegment2.SecondPoint + } : + new[] + { + verticalSegment1.SecondPoint, + verticalSegment2.FirstPoint + }; CollectionAssertAreEquivalent(expectedOverlappingPoints, result.IntersectionPoints); } @@ -833,8 +858,16 @@ // Assert Assert.AreEqual(Intersection2DType.Overlaps, result.IntersectionType); var expectedOverlappingPoints = dx >= 0 ? - new[] { horizontalSegment1.FirstPoint, horizontalSegment2.SecondPoint } : - new[] { horizontalSegment1.SecondPoint, horizontalSegment2.FirstPoint }; + new[] + { + horizontalSegment1.FirstPoint, + horizontalSegment2.SecondPoint + } : + new[] + { + horizontalSegment1.SecondPoint, + horizontalSegment2.FirstPoint + }; CollectionAssertAreEquivalent(expectedOverlappingPoints, result.IntersectionPoints); } @@ -851,15 +884,19 @@ // Assert Assert.AreEqual(Intersection2DType.Overlaps, result.IntersectionType); - var expectedOverlappingPoints = new[] { firstPoint, secondPoint }; + var expectedOverlappingPoints = new[] + { + firstPoint, + secondPoint + }; CollectionAssertAreEquivalent(expectedOverlappingPoints, result.IntersectionPoints); } [Test] public void GetIntersectionBetweenSegments_CollinearSegmentsWithFullOverlap_ReturnOverlap() { // Setup - Func getY = x => -12.34 * x + 45.67; + Func getY = x => -12.34*x + 45.67; const double x1 = 1.1; const double x2 = 2.2; const double x3 = -3.3; @@ -872,7 +909,11 @@ // Assert Assert.AreEqual(Intersection2DType.Overlaps, result.IntersectionType); - var expectedOverlappingPoints = new[] { segment1.FirstPoint, segment1.SecondPoint }; + var expectedOverlappingPoints = new[] + { + segment1.FirstPoint, + segment1.SecondPoint + }; CollectionAssertAreEquivalent(expectedOverlappingPoints, result.IntersectionPoints); } @@ -901,11 +942,11 @@ } [Test] - [TestCase(0,0)] - [TestCase(-6541.2354,5.25)] - [TestCase(-3.25,-12.55)] - [TestCase(6.154,-9684.514)] - [TestCase(6840.251,15.3251)] + [TestCase(0, 0)] + [TestCase(-6541.2354, 5.25)] + [TestCase(-3.25, -12.55)] + [TestCase(6.154, -9684.514)] + [TestCase(6840.251, 15.3251)] public void GetIntersectionBetweenSegments_SegmentsArePointsOnTopOfEachOther_ReturnIntersection(double x, double y) { // Setup @@ -917,7 +958,10 @@ // Assert Assert.AreEqual(Intersection2DType.Intersects, result.IntersectionType); - CollectionAssert.AreEqual(new[]{ new Point2D(x, y) }, result.IntersectionPoints); + CollectionAssert.AreEqual(new[] + { + new Point2D(x, y) + }, result.IntersectionPoints); } [Test] @@ -946,7 +990,7 @@ bool firstSegmentIsPointDegenerate) { // Setup - Func getY = x => 1.2 * x + 3.4; + Func getY = x => 1.2*x + 3.4; const double x1 = 1.1; const double x2 = 5.5; @@ -972,7 +1016,10 @@ // Assert Assert.AreEqual(Intersection2DType.Intersects, result.IntersectionType); - CollectionAssert.AreEqual(new[]{ point }, result.IntersectionPoints); + CollectionAssert.AreEqual(new[] + { + point + }, result.IntersectionPoints); } [Test] @@ -1004,7 +1051,10 @@ // Assert Assert.AreEqual(Intersection2DType.Intersects, result.IntersectionType); - CollectionAssert.AreEqual(new[] { point }, result.IntersectionPoints); + CollectionAssert.AreEqual(new[] + { + point + }, result.IntersectionPoints); } [Test] @@ -1014,7 +1064,7 @@ bool firstSegmentIsPointDegenerate) { // Setup - Func getY = x => -5.6 * x + 7.8; + Func getY = x => -5.6*x + 7.8; const double x1 = 1.1; const double x2 = 5.5; @@ -1113,9 +1163,9 @@ { // Setup var random = new Random(21); - var points = new [] + var points = new[] { - new Point2D(random.NextDouble(), random.NextDouble()), + new Point2D(random.NextDouble(), random.NextDouble()), }; // Call @@ -1201,7 +1251,7 @@ Point2D result = Math2D.GetInterpolatedPointAtFraction(segment, fraction); // Assert - Assert.AreEqual(new Point2D(2.8, (5.02 - 2.2) * fraction), result); + Assert.AreEqual(new Point2D(2.8, (5.02 - 2.2)*fraction), result); } [Test] @@ -1239,7 +1289,7 @@ [Test] [TestCase(double.NaN)] [TestCase(-1e-9)] - [TestCase(1+1e-9)] + [TestCase(1 + 1e-9)] [TestCase(3)] [TestCase(-2)] public void GetInterpolatedPoint_WithInvalidFraction_ThrowsArgumentOutOfRangeException(double fraction) @@ -1254,7 +1304,7 @@ // Assert TestHelper.AssertThrowsArgumentExceptionAndTestMessage( - test, + test, "Fraction needs to be defined in range [0.0, 1.0] in order to reliably interpolate."); } @@ -1270,7 +1320,7 @@ private double[] GetLengthsBasedOnReletative(double[] relativeLengths, IEnumerable lineGeometryPoints) { var lineLength = Math2D.ConvertLinePointsToLineSegments(lineGeometryPoints).Sum(s => s.Length); - return relativeLengths.Select(l => lineLength * l).ToArray(); + return relativeLengths.Select(l => lineLength*l).ToArray(); } } } \ No newline at end of file Index: Core/Common/test/Core.Common.Base.Test/Geometry/Point2DTest.cs =================================================================== diff -u -rce31448a066c084f755439f3e7d453bfb042b291 -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Base.Test/Geometry/Point2DTest.cs (.../Point2DTest.cs) (revision ce31448a066c084f755439f3e7d453bfb042b291) +++ Core/Common/test/Core.Common.Base.Test/Geometry/Point2DTest.cs (.../Point2DTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -20,13 +20,10 @@ // All rights reserved. using System; - using Core.Common.Base.Geometry; using Core.Common.TestUtil; - using MathNet.Numerics.LinearAlgebra; using MathNet.Numerics.LinearAlgebra.Double; - using NUnit.Framework; namespace Core.Common.Base.Test.Geometry @@ -184,7 +181,11 @@ { // Setup var originalPoint = new Point2D(x, y); - var zeroVector = new DenseVector(new []{ 0.0, 0.0 }); + var zeroVector = new DenseVector(new[] + { + 0.0, + 0.0 + }); // Call Point2D resultPoint = originalPoint + zeroVector; @@ -207,28 +208,34 @@ var originalPoint = new Point2D(x, y); const double dx = 1.1; const double dy = -2.2; - var vector = new DenseVector(new[] { dx, dy }); + var vector = new DenseVector(new[] + { + dx, + dy + }); // Call Point2D resultPoint = originalPoint + vector; // Assert - Assert.AreEqual(x+dx, resultPoint.X); - Assert.AreEqual(y+dy, resultPoint.Y); + Assert.AreEqual(x + dx, resultPoint.X); + Assert.AreEqual(y + dy, resultPoint.Y); } [Test] public void AddOperator_PointWithInvalidVector_ThrowArgumentException() { // Setup var originalPoint = new Point2D(0.0, 0.0); - var vector3D = new DenseVector(new []{1.1, 2.2, 3.3}); + var vector3D = new DenseVector(new[] + { + 1.1, + 2.2, + 3.3 + }); // Call - TestDelegate call = () => - { - Point2D result = originalPoint + vector3D; - }; + TestDelegate call = () => { Point2D result = originalPoint + vector3D; }; // Assert const string expectedMessage = "Vector moet 2 dimensies hebben, maar heeft er 3."; Index: Core/Common/test/Core.Common.Base.Test/Geometry/Point3DExtensionsTest.cs =================================================================== diff -u -r7f759fbabca9c41e75d229269f1b21581b373b5f -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Base.Test/Geometry/Point3DExtensionsTest.cs (.../Point3DExtensionsTest.cs) (revision 7f759fbabca9c41e75d229269f1b21581b373b5f) +++ Core/Common/test/Core.Common.Base.Test/Geometry/Point3DExtensionsTest.cs (.../Point3DExtensionsTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -131,9 +131,9 @@ Point2D convertedPoint = pointToConvert.ProjectIntoLocalCoordinates(startPoint, endPoint); // Assert - var length = Math.Sqrt(2 * 2 + 3 * 3); - const double pointToConvertCoordinateFactor = (2.0 * 1.0 + 3.0 * 2.0) / (2.0 * 2.0 + 3.0 * 3.0); - double expectedX = pointToConvertCoordinateFactor * length; + var length = Math.Sqrt(2*2 + 3*3); + const double pointToConvertCoordinateFactor = (2.0*1.0 + 3.0*2.0)/(2.0*2.0 + 3.0*3.0); + double expectedX = pointToConvertCoordinateFactor*length; Assert.AreEqual(new Point2D(expectedX, pointToConvert.Z), convertedPoint); } Index: Core/Common/test/Core.Common.Base.Test/Geometry/Point3DTest.cs =================================================================== diff -u -r7f759fbabca9c41e75d229269f1b21581b373b5f -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Base.Test/Geometry/Point3DTest.cs (.../Point3DTest.cs) (revision 7f759fbabca9c41e75d229269f1b21581b373b5f) +++ Core/Common/test/Core.Common.Base.Test/Geometry/Point3DTest.cs (.../Point3DTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -20,9 +20,7 @@ // All rights reserved. using System; - using Core.Common.Base.Geometry; - using NUnit.Framework; namespace Core.Common.Base.Test.Geometry @@ -51,7 +49,7 @@ public void Equals_ToNull_ReturnsFalse() { // Setup - var point = new Point3D(0,0,0); + var point = new Point3D(0, 0, 0); // Call var result = point.Equals(null); @@ -64,7 +62,7 @@ public void Equals_ToOtherType_ReturnsFalse() { // Setup - var point = new Point3D(0,0,0); + var point = new Point3D(0, 0, 0); // Call var result = point.Equals(new Point2D(0, 0)); @@ -77,7 +75,7 @@ public void Equals_ToItself_ReturnsTrue() { // Setup - var point = new Point3D(0,0,0); + var point = new Point3D(0, 0, 0); // Call var result = point.Equals(point); @@ -87,9 +85,9 @@ } [Test] - [TestCase(0,0,0)] - [TestCase(1,2,3)] - [TestCase(3.5,3.6,3.7)] + [TestCase(0, 0, 0)] + [TestCase(1, 2, 3)] + [TestCase(3.5, 3.6, 3.7)] public void Equals_OtherWithSameCoordinates_ReturnsTrue(double x, double y, double z) { // Setup @@ -120,7 +118,7 @@ x + deltaX, y + deltaY, z + deltaZ - ); + ); // Call var result = point.Equals(otherPoint); Index: Core/Common/test/Core.Common.Base.Test/Geometry/Segment2DIntersectSegment2DResultTest.cs =================================================================== diff -u -r151bab16a7ebc1bffc0621ab56c6dc219db1e90f -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Base.Test/Geometry/Segment2DIntersectSegment2DResultTest.cs (.../Segment2DIntersectSegment2DResultTest.cs) (revision 151bab16a7ebc1bffc0621ab56c6dc219db1e90f) +++ Core/Common/test/Core.Common.Base.Test/Geometry/Segment2DIntersectSegment2DResultTest.cs (.../Segment2DIntersectSegment2DResultTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -20,7 +20,6 @@ // All rights reserved. using Core.Common.Base.Geometry; - using NUnit.Framework; namespace Core.Common.Base.Test.Geometry @@ -50,7 +49,10 @@ // Assert Assert.AreEqual(Intersection2DType.Intersects, result.IntersectionType); - CollectionAssert.AreEqual(new[]{point}, result.IntersectionPoints); + CollectionAssert.AreEqual(new[] + { + point + }, result.IntersectionPoints); } [Test] @@ -65,7 +67,11 @@ // Assert Assert.AreEqual(Intersection2DType.Overlaps, result.IntersectionType); - CollectionAssert.AreEqual(new[] { point1, point2 }, result.IntersectionPoints); + CollectionAssert.AreEqual(new[] + { + point1, + point2 + }, result.IntersectionPoints); } } } \ No newline at end of file Index: Core/Common/test/Core.Common.Base.Test/Geometry/Segment2DTest.cs =================================================================== diff -u -r151bab16a7ebc1bffc0621ab56c6dc219db1e90f -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Base.Test/Geometry/Segment2DTest.cs (.../Segment2DTest.cs) (revision 151bab16a7ebc1bffc0621ab56c6dc219db1e90f) +++ Core/Common/test/Core.Common.Base.Test/Geometry/Segment2DTest.cs (.../Segment2DTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -20,9 +20,7 @@ // All rights reserved. using System; - using Core.Common.Base.Geometry; - using NUnit.Framework; namespace Core.Common.Base.Test.Geometry @@ -207,7 +205,7 @@ var segment = new Segment2D(new Point2D(random.NextDouble(), random.NextDouble()), new Point2D(random.NextDouble(), random.NextDouble())); // Call - var isEqual = segment.Equals(new Point2D(0.0,0.0)); + var isEqual = segment.Equals(new Point2D(0.0, 0.0)); // Assert Assert.IsFalse(isEqual); @@ -421,7 +419,7 @@ [TestCase(3.2, -1.2)] public void GetEuclideanDistanceToPoint_FirstPointIsClosest_ReturnExpectedDistance( double x, double y) - { + { // Setup var point = new Point2D(x, y); var segment = new Segment2D(new Point2D(1.1, 2.2), new Point2D(3.3, 4.4)); @@ -462,7 +460,7 @@ [TestCase(2.7, 12.6)] public void GetEuclideanDistanceToPoint_SecondPointIsClosest_ReturnExpectedDistance( double x, double y) - { + { // Setup var point = new Point2D(x, y); var segment = new Segment2D(new Point2D(1.1, 2.2), new Point2D(3.3, 4.4)); Index: Core/Common/test/Core.Common.Base.Test/IO/FileImporterBaseTest.cs =================================================================== diff -u -re2719484be4a10aecf59be5a999943bb01688ec0 -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Base.Test/IO/FileImporterBaseTest.cs (.../FileImporterBaseTest.cs) (revision e2719484be4a10aecf59be5a999943bb01688ec0) +++ Core/Common/test/Core.Common.Base.Test/IO/FileImporterBaseTest.cs (.../FileImporterBaseTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -22,11 +22,8 @@ using System; using System.Collections.Generic; using System.Drawing; - using Core.Common.Base.IO; - using NUnit.Framework; - using Rhino.Mocks; namespace Core.Common.Base.Test.IO @@ -250,33 +247,27 @@ public override ProgressChangedDelegate ProgressChanged { protected get; set; } public IObservable[] AffectedNonTargetObservableInstancesOverride { private get; set; } - protected override IEnumerable AffectedNonTargetObservableInstances + public void TestNotifyProgress(string currentStepName, int currentStep, int totalNumberOfSteps) { - get - { - return AffectedNonTargetObservableInstancesOverride ?? base.AffectedNonTargetObservableInstances; - } + NotifyProgress(currentStepName, currentStep, totalNumberOfSteps); } public override bool Import(object targetItem, string filePath) { throw new NotImplementedException(); } - public void TestNotifyProgress(string currentStepName, int currentStep, int totalNumberOfSteps) + protected override IEnumerable AffectedNonTargetObservableInstances { - NotifyProgress(currentStepName, currentStep, totalNumberOfSteps); + get + { + return AffectedNonTargetObservableInstancesOverride ?? base.AffectedNonTargetObservableInstances; + } } } - private class SimpleFileImporterTargetType - { - - } + private class SimpleFileImporterTargetType {} - private class InheritorOfImporterTargetType : SimpleFileImporterTargetType - { - - } + private class InheritorOfImporterTargetType : SimpleFileImporterTargetType {} } } \ No newline at end of file Index: Core/Common/test/Core.Common.Base.Test/ObservableListTest.cs =================================================================== diff -u -r151bab16a7ebc1bffc0621ab56c6dc219db1e90f -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Base.Test/ObservableListTest.cs (.../ObservableListTest.cs) (revision 151bab16a7ebc1bffc0621ab56c6dc219db1e90f) +++ Core/Common/test/Core.Common.Base.Test/ObservableListTest.cs (.../ObservableListTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -99,9 +99,9 @@ observableList.Attach(observer6); observer1.Expect(o => o.UpdateObserver()); - observer2.Expect(o => o.UpdateObserver()).Do((Action)(() => observableList.Detach(observer3))); + observer2.Expect(o => o.UpdateObserver()).Do((Action) (() => observableList.Detach(observer3))); observer3.Expect(o => o.UpdateObserver()).Repeat.Never(); // A detached observer should no longer be updated - observer4.Expect(o => o.UpdateObserver()).Do((Action)(() => observableList.Attach(observer5))); + observer4.Expect(o => o.UpdateObserver()).Do((Action) (() => observableList.Attach(observer5))); observer5.Expect(o => o.UpdateObserver()).Repeat.Never(); // An attached observer should not be updated too observer6.Expect(o => o.UpdateObserver()); Index: Core/Common/test/Core.Common.Base.Test/ObservableTest.cs =================================================================== diff -u -r151bab16a7ebc1bffc0621ab56c6dc219db1e90f -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Base.Test/ObservableTest.cs (.../ObservableTest.cs) (revision 151bab16a7ebc1bffc0621ab56c6dc219db1e90f) +++ Core/Common/test/Core.Common.Base.Test/ObservableTest.cs (.../ObservableTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -89,7 +89,7 @@ observer1.Expect(o => o.UpdateObserver()); observer2.Expect(o => o.UpdateObserver()).Do((Action) (() => testObservable.Detach(observer3))); observer3.Expect(o => o.UpdateObserver()).Repeat.Never(); // A detached observer should no longer be updated - observer4.Expect(o => o.UpdateObserver()).Do((Action)(() => testObservable.Attach(observer5))); + observer4.Expect(o => o.UpdateObserver()).Do((Action) (() => testObservable.Attach(observer5))); observer5.Expect(o => o.UpdateObserver()).Repeat.Never(); // An attached observer should not be updated too observer6.Expect(o => o.UpdateObserver()); @@ -102,9 +102,6 @@ mocks.VerifyAll(); } - private class TestObservable : Observable - { - - } + private class TestObservable : Observable {} } -} +} \ No newline at end of file Index: Core/Common/test/Core.Common.Base.Test/ObserverTest.cs =================================================================== diff -u -r07b0e83704b56684d617cd6e8b8570417654912a -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Base.Test/ObserverTest.cs (.../ObserverTest.cs) (revision 07b0e83704b56684d617cd6e8b8570417654912a) +++ Core/Common/test/Core.Common.Base.Test/ObserverTest.cs (.../ObserverTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -102,9 +102,6 @@ Assert.AreEqual(0, counter); } - private class TestObservable : Observable - { - - } + private class TestObservable : Observable {} } -} +} \ No newline at end of file Index: Core/Common/test/Core.Common.Base.Test/Properties/AssemblyInfo.cs =================================================================== diff -u -r3d84064b23186da3fb11f19ff0d07f41e1209bbb -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Base.Test/Properties/AssemblyInfo.cs (.../AssemblyInfo.cs) (revision 3d84064b23186da3fb11f19ff0d07f41e1209bbb) +++ Core/Common/test/Core.Common.Base.Test/Properties/AssemblyInfo.cs (.../AssemblyInfo.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -24,4 +24,4 @@ [assembly: AssemblyTitle("Core.Common.Base.Test")] [assembly: AssemblyProduct("Core.Common.Base.Test")] -[assembly: Guid("2eaa90e8-ad27-4130-919b-4a043f2526cb")] +[assembly: Guid("2eaa90e8-ad27-4130-919b-4a043f2526cb")] \ No newline at end of file Index: Core/Common/test/Core.Common.Base.Test/RecursiveObserverTest.cs =================================================================== diff -u -rf65694c90375dbbed8fea4db8e7d0873cc659669 -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Base.Test/RecursiveObserverTest.cs (.../RecursiveObserverTest.cs) (revision f65694c90375dbbed8fea4db8e7d0873cc659669) +++ Core/Common/test/Core.Common.Base.Test/RecursiveObserverTest.cs (.../RecursiveObserverTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -298,11 +298,11 @@ } } - private class TestObservable : Observable { } + private class TestObservable : Observable {} private IEnumerable GetChildren(TestContainer container) { return container.Children; } } -} +} \ No newline at end of file Index: Core/Common/test/Core.Common.Base.Test/Service/ActivityTest.cs =================================================================== diff -u -rf62076c7d8b6a65856fbab6a1b34b4234aa319e5 -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Base.Test/Service/ActivityTest.cs (.../ActivityTest.cs) (revision f62076c7d8b6a65856fbab6a1b34b4234aa319e5) +++ Core/Common/test/Core.Common.Base.Test/Service/ActivityTest.cs (.../ActivityTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -238,6 +238,11 @@ this.skipped = skipped; } + public void SetProgressText(string progressText) + { + ProgressText = progressText; + } + protected override void OnRun() { if (skipped) @@ -267,11 +272,6 @@ throw new Exception("Error during finish"); } } - - public void SetProgressText(string progressText) - { - ProgressText = progressText; - } } } } \ No newline at end of file Index: Core/Common/test/Core.Common.Base.Test/Service/FileImportActivityTest.cs =================================================================== diff -u -r0abf371c5f6f450232d49f3c1a031476063ce04b -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Base.Test/Service/FileImportActivityTest.cs (.../FileImportActivityTest.cs) (revision 0abf371c5f6f450232d49f3c1a031476063ce04b) +++ Core/Common/test/Core.Common.Base.Test/Service/FileImportActivityTest.cs (.../FileImportActivityTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -230,4 +230,4 @@ } } } -} +} \ No newline at end of file Index: Core/Common/test/Core.Common.Base.Test/TypeConverters/RoundedDoubleConverterTest.cs =================================================================== diff -u -r151bab16a7ebc1bffc0621ab56c6dc219db1e90f -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Base.Test/TypeConverters/RoundedDoubleConverterTest.cs (.../RoundedDoubleConverterTest.cs) (revision 151bab16a7ebc1bffc0621ab56c6dc219db1e90f) +++ Core/Common/test/Core.Common.Base.Test/TypeConverters/RoundedDoubleConverterTest.cs (.../RoundedDoubleConverterTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -22,10 +22,8 @@ using System; using System.ComponentModel; using System.Globalization; - using Core.Common.Base.Data; using Core.Common.Base.TypeConverters; - using NUnit.Framework; namespace Core.Common.Base.Test.TypeConverters @@ -143,7 +141,7 @@ var converter = new RoundedDoubleConverter(); // Call - RoundedDouble conversionResult = (RoundedDouble)converter.ConvertFrom(null, CultureInfo.CurrentCulture, text); + RoundedDouble conversionResult = (RoundedDouble) converter.ConvertFrom(null, CultureInfo.CurrentCulture, text); // Assert Assert.IsNotNull(conversionResult); Index: Core/Common/test/Core.Common.Controls.Test/DataGrid/DataGridViewComboBoxItemWrapperTest.cs =================================================================== diff -u -r050043cae5f4544e895e577a8a0f42c0271b80b0 -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Controls.Test/DataGrid/DataGridViewComboBoxItemWrapperTest.cs (.../DataGridViewComboBoxItemWrapperTest.cs) (revision 050043cae5f4544e895e577a8a0f42c0271b80b0) +++ Core/Common/test/Core.Common.Controls.Test/DataGrid/DataGridViewComboBoxItemWrapperTest.cs (.../DataGridViewComboBoxItemWrapperTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -180,4 +180,4 @@ } } } -} +} \ No newline at end of file Index: Core/Common/test/Core.Common.Controls.Test/Dialogs/DialogBaseTest.cs =================================================================== diff -u -r0abf371c5f6f450232d49f3c1a031476063ce04b -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Controls.Test/Dialogs/DialogBaseTest.cs (.../DialogBaseTest.cs) (revision 0abf371c5f6f450232d49f3c1a031476063ce04b) +++ Core/Common/test/Core.Common.Controls.Test/Dialogs/DialogBaseTest.cs (.../DialogBaseTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -81,6 +81,7 @@ StringAssert.EndsWith("icon", message); } + [Test] [TestCase(-1)] [TestCase(0)] public void Constructor_IncorrectMinWidth_ArgumentExceptionIsThrown(int minWidth) @@ -97,6 +98,7 @@ TestHelper.AssertThrowsArgumentExceptionAndTestMessage(test, expectedMessage); } + [Test] [TestCase(-1)] [TestCase(0)] public void Constructor_IncorrectMinHeight_ArgumentExceptionIsThrown(int minHeight) @@ -212,7 +214,7 @@ private class TestDialog : DialogBase { public TestDialog(IWin32Window dialogParent, Bitmap icon, int minWidth, int minHeight) - : base(dialogParent, icon, minWidth, minHeight) { } + : base(dialogParent, icon, minWidth, minHeight) {} public TestDialog(IWin32Window dialogParent, Icon icon, int minWidth, int minHeight) : base(dialogParent, icon, minWidth, minHeight) {} Index: Core/Common/test/Core.Common.Controls.Test/PresentationObjects/ObservableWrappedObjectContextBaseTest.cs =================================================================== diff -u -rb954fb6f2dd56ffb96be7b61ab129f19d879d2ab -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Controls.Test/PresentationObjects/ObservableWrappedObjectContextBaseTest.cs (.../ObservableWrappedObjectContextBaseTest.cs) (revision b954fb6f2dd56ffb96be7b61ab129f19d879d2ab) +++ Core/Common/test/Core.Common.Controls.Test/PresentationObjects/ObservableWrappedObjectContextBaseTest.cs (.../ObservableWrappedObjectContextBaseTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -138,7 +138,7 @@ private class SimpleObservableWrappedObjectContext : ObservableWrappedObjectContextBase { - public SimpleObservableWrappedObjectContext(IObservable wrappedData) : base(wrappedData) { } + public SimpleObservableWrappedObjectContext(IObservable wrappedData) : base(wrappedData) {} } private class SimpleObservable : Observable, IEquatable Index: Core/Common/test/Core.Common.Controls.Test/PresentationObjects/WrappedObjectContextBaseTest.cs =================================================================== diff -u -re775448bfb8290e43d62340a53a08723bbc035c6 -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Controls.Test/PresentationObjects/WrappedObjectContextBaseTest.cs (.../WrappedObjectContextBaseTest.cs) (revision e775448bfb8290e43d62340a53a08723bbc035c6) +++ Core/Common/test/Core.Common.Controls.Test/PresentationObjects/WrappedObjectContextBaseTest.cs (.../WrappedObjectContextBaseTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -198,7 +198,7 @@ private class AnotherSimpleWrappedObjectContext : WrappedObjectContextBase { - public AnotherSimpleWrappedObjectContext(T wrappedData) : base(wrappedData) { } + public AnotherSimpleWrappedObjectContext(T wrappedData) : base(wrappedData) {} } private class SimpleEquatable : IEquatable Index: Core/Common/test/Core.Common.Controls.Test/TextEditor/RichTextBoxControlTest.cs =================================================================== diff -u -rf1be6965092b5dc1b0e2e145d59e718493351fb8 -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Controls.Test/TextEditor/RichTextBoxControlTest.cs (.../RichTextBoxControlTest.cs) (revision f1be6965092b5dc1b0e2e145d59e718493351fb8) +++ Core/Common/test/Core.Common.Controls.Test/TextEditor/RichTextBoxControlTest.cs (.../RichTextBoxControlTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -92,12 +92,12 @@ { // Show the view var control = new RichTextBoxControl(); - + var data = ""; control.Rtf = GetValidRtfString(data); form.Controls.Add(control); - + // Call form.Show(); @@ -182,7 +182,7 @@ } [Test] - [TestCase(Keys.B, true, false ,false)] + [TestCase(Keys.B, true, false, false)] [TestCase(Keys.I, false, true, false)] [TestCase(Keys.U, false, false, true)] public void RichTextBoxControl_TextDoesNotHaveStyleOnStyleKeyDown_SelectionFontStyleApplied(Keys key, bool bold, bool italic, bool underline) @@ -194,7 +194,7 @@ form.Controls.Add(control); form.Show(); - var richTextBox = (RichTextBox)new ControlTester("richTextBox").TheObject; + var richTextBox = (RichTextBox) new ControlTester("richTextBox").TheObject; richTextBox.AppendText(text); richTextBox.SelectionStart = 5; @@ -230,7 +230,7 @@ form.Controls.Add(control); form.Show(); - var richTextBox = (RichTextBox)new ControlTester("richTextBox").TheObject; + var richTextBox = (RichTextBox) new ControlTester("richTextBox").TheObject; richTextBox.AppendText(text); richTextBox.SelectionStart = 5; @@ -256,10 +256,27 @@ } [Test] - [TestCase(new[] { Keys.U, Keys.B }, true, true, false)] - [TestCase(new[] { Keys.U, Keys.I }, true, false, true)] - [TestCase(new[] { Keys.B, Keys.I }, false, true, true)] - [TestCase(new[] { Keys.B, Keys.I, Keys.U }, true, true, true)] + [TestCase(new[] + { + Keys.U, + Keys.B + }, true, true, false)] + [TestCase(new[] + { + Keys.U, + Keys.I + }, true, false, true)] + [TestCase(new[] + { + Keys.B, + Keys.I + }, false, true, true)] + [TestCase(new[] + { + Keys.B, + Keys.I, + Keys.U + }, true, true, true)] public void RichTextBoxControl_SetDifferentStyles_SelectedTextHasDifferentStyles(IEnumerable keys, bool underline, bool bold, bool italic) { // Setup @@ -269,7 +286,7 @@ form.Controls.Add(control); form.Show(); - var richTextBox = (RichTextBox)new ControlTester("richTextBox").TheObject; + var richTextBox = (RichTextBox) new ControlTester("richTextBox").TheObject; richTextBox.AppendText(text); richTextBox.SelectionStart = 5; @@ -281,7 +298,7 @@ // Call foreach (var key in keys) { - EventHelper.RaiseEvent(richTextBox, "KeyDown", new KeyEventArgs(key| Keys.Control)); + EventHelper.RaiseEvent(richTextBox, "KeyDown", new KeyEventArgs(key | Keys.Control)); } // Assert @@ -305,7 +322,7 @@ form.Controls.Add(control); form.Show(); - var richTextBox = (RichTextBox)new ControlTester("richTextBox").TheObject; + var richTextBox = (RichTextBox) new ControlTester("richTextBox").TheObject; EventHelper.RaiseEvent(richTextBox, "KeyDown", new KeyEventArgs(key | Keys.Control)); @@ -373,7 +390,7 @@ form.Controls.Add(control); form.Show(); - var richTextBox = (RichTextBox)new ControlTester("richTextBox").TheObject; + var richTextBox = (RichTextBox) new ControlTester("richTextBox").TheObject; richTextBox.AppendText("A"); Index: Core/Common/test/Core.Common.Controls.TreeView.Test/DragDropHandlerTest.cs =================================================================== diff -u -r151bab16a7ebc1bffc0621ab56c6dc219db1e90f -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Controls.TreeView.Test/DragDropHandlerTest.cs (.../DragDropHandlerTest.cs) (revision 151bab16a7ebc1bffc0621ab56c6dc219db1e90f) +++ Core/Common/test/Core.Common.Controls.TreeView.Test/DragDropHandlerTest.cs (.../DragDropHandlerTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -118,7 +118,7 @@ // Call ddh.HandleDragOver(treeView, dragEvent, action); - + // Assert Assert.AreEqual(dragEvent.Effect, dropEffect); mocks.VerifyAll(); @@ -156,7 +156,7 @@ // Call ddh.HandleDragOver(treeView, dragEvent, action); - + // Assert Assert.AreEqual(dragEvent.Effect, DragDropEffects.None); mocks.VerifyAll(); @@ -193,7 +193,7 @@ // Call ddh.HandleDragOver(treeView, dragEvent, action); - + // Assert Assert.AreEqual(dragEvent.Effect, DragDropEffects.None); mocks.VerifyAll(); Index: Core/Common/test/Core.Common.Controls.TreeView.Test/TreeViewControlTest.cs =================================================================== diff -u -rf8f60a1f81812c31026cdb2bcda40e70cfc3d434 -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Controls.TreeView.Test/TreeViewControlTest.cs (.../TreeViewControlTest.cs) (revision f8f60a1f81812c31026cdb2bcda40e70cfc3d434) +++ Core/Common/test/Core.Common.Controls.TreeView.Test/TreeViewControlTest.cs (.../TreeViewControlTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -22,6 +22,7 @@ using System; using System.Windows.Forms; using Core.Common.Base; +using Core.Common.Controls.TreeView.Properties; using Core.Common.TestUtil; using NUnit.Extensions.Forms; using NUnit.Framework; @@ -102,7 +103,7 @@ Assert.DoesNotThrow(test); } } - + [Test] public void RegisterTreeNodeInfo_NodeInfoForTagTypeAlreadySet_OverridesNodeInfo() { @@ -282,7 +283,7 @@ treeViewControl.TryRenameNodeForData(dataObject); // Assert - Assert.AreEqual(Properties.Resources.TreeViewControl_The_selected_item_cannot_be_renamed, messageBoxText); + Assert.AreEqual(Resources.TreeViewControl_The_selected_item_cannot_be_renamed, messageBoxText); } } @@ -431,7 +432,7 @@ Assert.AreEqual(0, onNodeRemovedHit); Assert.AreEqual(0, onDataDeletedHit); - Assert.AreEqual(Properties.Resources.TreeViewControl_The_selected_item_cannot_be_removed, messageBoxText); + Assert.AreEqual(Resources.TreeViewControl_The_selected_item_cannot_be_removed, messageBoxText); } } @@ -476,7 +477,7 @@ Assert.AreEqual(1, onNodeRemovedHit); Assert.AreEqual(1, onDataDeletedHit); - Assert.AreEqual(Properties.Resources.TreeViewControl_Are_you_sure_you_want_to_remove_the_selected_item, messageBoxText); + Assert.AreEqual(Resources.TreeViewControl_Are_you_sure_you_want_to_remove_the_selected_item, messageBoxText); } finally { @@ -523,7 +524,7 @@ // Assert Assert.AreEqual(0, hit); - Assert.AreEqual(Properties.Resources.TreeViewControl_Are_you_sure_you_want_to_remove_the_selected_item, messageBoxText); + Assert.AreEqual(Resources.TreeViewControl_Are_you_sure_you_want_to_remove_the_selected_item, messageBoxText); } finally { @@ -1295,10 +1296,7 @@ var treeNodeInfo = new TreeNodeInfo { TagType = typeof(object), - OnNodeChecked = (o, p) => - { - hit++; - } + OnNodeChecked = (o, p) => { hit++; } }; treeViewControl.RegisterTreeNodeInfo(treeNodeInfo); treeViewControl.Data = new object(); @@ -1392,7 +1390,7 @@ Assert.AreSame(data, treeViewControl.SelectedData); var identifier = "identifier"; - var treeView = (System.Windows.Forms.TreeView)treeViewControl.Controls[0]; + var treeView = (System.Windows.Forms.TreeView) treeViewControl.Controls[0]; treeView.Name = identifier; try @@ -1414,7 +1412,6 @@ } } - [Test] [RequiresSTA] [TestCase(true)] @@ -1433,7 +1430,7 @@ { selectionTarget }, - CanRename = (d,p) => canRenameNode + CanRename = (d, p) => canRenameNode }; var childTreeNodeInfo = new TreeNodeInfo { @@ -1450,7 +1447,7 @@ Assert.AreSame(data, treeViewControl.SelectedData); var identifier = "identifier"; - var treeView = (System.Windows.Forms.TreeView)treeViewControl.Controls[0]; + var treeView = (System.Windows.Forms.TreeView) treeViewControl.Controls[0]; treeView.Name = identifier; var childNode = treeView.Nodes[0].Nodes[0]; Index: Core/Common/test/Core.Common.Geometry.Test/AdvancedMath2DTest.cs =================================================================== diff -u -r125d62f85cd30cc39cad0d49105484ee63b6060e -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Geometry.Test/AdvancedMath2DTest.cs (.../AdvancedMath2DTest.cs) (revision 125d62f85cd30cc39cad0d49105484ee63b6060e) +++ Core/Common/test/Core.Common.Geometry.Test/AdvancedMath2DTest.cs (.../AdvancedMath2DTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -60,7 +60,7 @@ { new Point2D(4, 0), new Point2D(4, 4), - new Point2D(6, 0), + new Point2D(6, 0), new Point2D(8, 4), new Point2D(8, 0) }; @@ -134,7 +134,7 @@ IEnumerable> intersections = AdvancedMath2D.PolygonIntersectionWithPolygon(polyA, polyB).ToArray(); // Assert - Assert.AreEqual(new [] + Assert.AreEqual(new[] { new[] { @@ -195,19 +195,19 @@ // Assert Assert.AreEqual(2, intersections.Count()); - CollectionAssert.AreEqual(new [] + CollectionAssert.AreEqual(new[] { - new Point2D(2,4), - new Point2D(4,4), - new Point2D(4,3), - new Point2D(2,3) + new Point2D(2, 4), + new Point2D(4, 4), + new Point2D(4, 3), + new Point2D(2, 3) }, intersections.ElementAt(0)); - CollectionAssert.AreEqual(new [] + CollectionAssert.AreEqual(new[] { - new Point2D(4,1), - new Point2D(4,0), - new Point2D(2,0), - new Point2D(2,1) + new Point2D(4, 1), + new Point2D(4, 0), + new Point2D(2, 0), + new Point2D(2, 1) }, intersections.ElementAt(1)); } @@ -237,14 +237,14 @@ Assert.AreEqual(3, intersections.Count()); CollectionAssert.AreEqual(new[] { - new Point2D(3.0,0.0) + new Point2D(3.0, 0.0) }, intersections.ElementAt(0)); CollectionAssert.AreEqual(new[] { new Point2D(1.5, 0.0), new Point2D(1.0, 0.0) }, intersections.ElementAt(1)); - CollectionAssert.AreEqual(new [] + CollectionAssert.AreEqual(new[] { new Point2D(0.0, 0.0), new Point2D(0.0, 4.0), Index: Core/Common/test/Core.Common.Gui.Test/Appenders/RenderedMessageLogAppenderTest.cs =================================================================== diff -u -r151bab16a7ebc1bffc0621ab56c6dc219db1e90f -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Gui.Test/Appenders/RenderedMessageLogAppenderTest.cs (.../RenderedMessageLogAppenderTest.cs) (revision 151bab16a7ebc1bffc0621ab56c6dc219db1e90f) +++ Core/Common/test/Core.Common.Gui.Test/Appenders/RenderedMessageLogAppenderTest.cs (.../RenderedMessageLogAppenderTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -20,13 +20,10 @@ // All rights reserved. using System; - using Core.Common.Gui.Appenders; - using log4net.Appender; using log4net.Core; using log4net.Util; - using NUnit.Framework; namespace Core.Common.Gui.Test.Appenders @@ -62,7 +59,7 @@ Assert.IsInstanceOf(appender); Assert.IsNull(appender.AppendMessageLineAction); Assert.IsInstanceOf(appender.ErrorHandler, - "Appender has default Log4Net error handler."); + "Appender has default Log4Net error handler."); Assert.IsNull(appender.FilterHead); Assert.IsNull(appender.Layout); Assert.IsNull(appender.Name); Index: Core/Common/test/Core.Common.Gui.Test/Attributes/DynamicReadOnlyAttributeTest.cs =================================================================== diff -u -r151bab16a7ebc1bffc0621ab56c6dc219db1e90f -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Gui.Test/Attributes/DynamicReadOnlyAttributeTest.cs (.../DynamicReadOnlyAttributeTest.cs) (revision 151bab16a7ebc1bffc0621ab56c6dc219db1e90f) +++ Core/Common/test/Core.Common.Gui.Test/Attributes/DynamicReadOnlyAttributeTest.cs (.../DynamicReadOnlyAttributeTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -20,10 +20,8 @@ // All rights reserved. using System; - using Core.Common.Gui.Attributes; using Core.Common.Gui.Test.Attributes.TestCaseClasses; - using NUnit.Framework; namespace Core.Common.Gui.Test.Attributes Index: Core/Common/test/Core.Common.Gui.Test/Attributes/DynamicReadOnlyValidationMethodAttributeTest.cs =================================================================== diff -u -r151bab16a7ebc1bffc0621ab56c6dc219db1e90f -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Gui.Test/Attributes/DynamicReadOnlyValidationMethodAttributeTest.cs (.../DynamicReadOnlyValidationMethodAttributeTest.cs) (revision 151bab16a7ebc1bffc0621ab56c6dc219db1e90f) +++ Core/Common/test/Core.Common.Gui.Test/Attributes/DynamicReadOnlyValidationMethodAttributeTest.cs (.../DynamicReadOnlyValidationMethodAttributeTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -20,10 +20,8 @@ // All rights reserved. using System; - using Core.Common.Gui.Attributes; using Core.Common.Gui.Test.Attributes.TestCaseClasses; - using NUnit.Framework; namespace Core.Common.Gui.Test.Attributes Index: Core/Common/test/Core.Common.Gui.Test/Attributes/DynamicVisibleAttributeTest.cs =================================================================== diff -u -r151bab16a7ebc1bffc0621ab56c6dc219db1e90f -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Gui.Test/Attributes/DynamicVisibleAttributeTest.cs (.../DynamicVisibleAttributeTest.cs) (revision 151bab16a7ebc1bffc0621ab56c6dc219db1e90f) +++ Core/Common/test/Core.Common.Gui.Test/Attributes/DynamicVisibleAttributeTest.cs (.../DynamicVisibleAttributeTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -20,10 +20,8 @@ // All rights reserved. using System; - using Core.Common.Gui.Attributes; using Core.Common.Gui.Test.Attributes.TestCaseClasses; - using NUnit.Framework; namespace Core.Common.Gui.Test.Attributes Index: Core/Common/test/Core.Common.Gui.Test/Attributes/DynamicVisibleValidationMethodAttributeTest.cs =================================================================== diff -u -r151bab16a7ebc1bffc0621ab56c6dc219db1e90f -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Gui.Test/Attributes/DynamicVisibleValidationMethodAttributeTest.cs (.../DynamicVisibleValidationMethodAttributeTest.cs) (revision 151bab16a7ebc1bffc0621ab56c6dc219db1e90f) +++ Core/Common/test/Core.Common.Gui.Test/Attributes/DynamicVisibleValidationMethodAttributeTest.cs (.../DynamicVisibleValidationMethodAttributeTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -20,10 +20,8 @@ // All rights reserved. using System; - using Core.Common.Gui.Attributes; using Core.Common.Gui.Test.Attributes.TestCaseClasses; - using NUnit.Framework; namespace Core.Common.Gui.Test.Attributes Index: Core/Common/test/Core.Common.Gui.Test/Attributes/PropertyOrderAttributeTest.cs =================================================================== diff -u -r3ce8a0c103af363c8e00798d95588ebe4d1e04a5 -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Gui.Test/Attributes/PropertyOrderAttributeTest.cs (.../PropertyOrderAttributeTest.cs) (revision 3ce8a0c103af363c8e00798d95588ebe4d1e04a5) +++ Core/Common/test/Core.Common.Gui.Test/Attributes/PropertyOrderAttributeTest.cs (.../PropertyOrderAttributeTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -20,9 +20,7 @@ // All rights reserved. using System; - using Core.Common.Gui.Attributes; - using NUnit.Framework; namespace Core.Common.Gui.Test.Attributes Index: Core/Common/test/Core.Common.Gui.Test/Commands/GuiImportHandlerTest.cs =================================================================== diff -u -r8a2cbeb8a9c5b0c8d5062af1a2a825d2b9134bf3 -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Gui.Test/Commands/GuiImportHandlerTest.cs (.../GuiImportHandlerTest.cs) (revision 8a2cbeb8a9c5b0c8d5062af1a2a825d2b9134bf3) +++ Core/Common/test/Core.Common.Gui.Test/Commands/GuiImportHandlerTest.cs (.../GuiImportHandlerTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -19,7 +19,6 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. -using System; using System.Collections.Generic; using System.Drawing; using System.Linq; Index: Core/Common/test/Core.Common.Gui.Test/ContextMenu/StrictContextMenuItemTest.cs =================================================================== diff -u -r151bab16a7ebc1bffc0621ab56c6dc219db1e90f -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Gui.Test/ContextMenu/StrictContextMenuItemTest.cs (.../StrictContextMenuItemTest.cs) (revision 151bab16a7ebc1bffc0621ab56c6dc219db1e90f) +++ Core/Common/test/Core.Common.Gui.Test/ContextMenu/StrictContextMenuItemTest.cs (.../StrictContextMenuItemTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -47,7 +47,7 @@ EventHandler handler = (s, e) => counter++; // Call - var result = new StrictContextMenuItem(text,toolTip,image,handler); + var result = new StrictContextMenuItem(text, toolTip, image, handler); result.PerformClick(); // Assert Index: Core/Common/test/Core.Common.Gui.Test/ContextMenu/TreeViewContextMenuItemFactoryTest.cs =================================================================== diff -u -r0abf371c5f6f450232d49f3c1a031476063ce04b -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Gui.Test/ContextMenu/TreeViewContextMenuItemFactoryTest.cs (.../TreeViewContextMenuItemFactoryTest.cs) (revision 0abf371c5f6f450232d49f3c1a031476063ce04b) +++ Core/Common/test/Core.Common.Gui.Test/ContextMenu/TreeViewContextMenuItemFactoryTest.cs (.../TreeViewContextMenuItemFactoryTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -75,7 +75,6 @@ // Setup using (var treeViewControl = new TreeViewControl()) { - // Call TestDelegate test = () => new TreeViewContextMenuItemFactory(new object(), treeViewControl); Index: Core/Common/test/Core.Common.Gui.Test/Converters/ExpandableArrayConverterTest.cs =================================================================== diff -u -r3ce8a0c103af363c8e00798d95588ebe4d1e04a5 -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Gui.Test/Converters/ExpandableArrayConverterTest.cs (.../ExpandableArrayConverterTest.cs) (revision 3ce8a0c103af363c8e00798d95588ebe4d1e04a5) +++ Core/Common/test/Core.Common.Gui.Test/Converters/ExpandableArrayConverterTest.cs (.../ExpandableArrayConverterTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -22,9 +22,7 @@ using System; using System.ComponentModel; using System.Linq; - using Core.Common.Gui.Converters; - using NUnit.Framework; namespace Core.Common.Gui.Test.Converters @@ -93,7 +91,7 @@ var converter = new ExpandableArrayConverter(); // Call - TestDelegate call =() => converter.ConvertTo(sourceArray, null); + TestDelegate call = () => converter.ConvertTo(sourceArray, null); // Assert Assert.Throws(call); @@ -128,7 +126,6 @@ } } - [Test] public void GetProperties_FromArray_SettingValuesShouldUpdateArray() { @@ -147,7 +144,6 @@ // Assert CollectionAssert.AreEqual(Enumerable.Range(0, elementCount), array); - } } } \ No newline at end of file Index: Core/Common/test/Core.Common.Gui.Test/Converters/PngToIconConverterTest.cs =================================================================== diff -u -r151bab16a7ebc1bffc0621ab56c6dc219db1e90f -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Gui.Test/Converters/PngToIconConverterTest.cs (.../PngToIconConverterTest.cs) (revision 151bab16a7ebc1bffc0621ab56c6dc219db1e90f) +++ Core/Common/test/Core.Common.Gui.Test/Converters/PngToIconConverterTest.cs (.../PngToIconConverterTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -24,10 +24,8 @@ using System.Globalization; using System.Windows.Data; using System.Windows.Media.Imaging; - using Core.Common.Gui.Converters; using Core.Common.Gui.Test.Properties; - using NUnit.Framework; namespace Core.Common.Gui.Test.Converters @@ -56,7 +54,7 @@ // Assert Assert.IsInstanceOf(bitmap); - var bitmapInstance = (BitmapImage)bitmap; + var bitmapInstance = (BitmapImage) bitmap; Assert.AreEqual(16, bitmapInstance.Height); Assert.AreEqual(16, bitmapInstance.Width); } Index: Core/Common/test/Core.Common.Gui.Test/Forms/MessageWindow/MessageWindowTest.cs =================================================================== diff -u -r151bab16a7ebc1bffc0621ab56c6dc219db1e90f -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Gui.Test/Forms/MessageWindow/MessageWindowTest.cs (.../MessageWindowTest.cs) (revision 151bab16a7ebc1bffc0621ab56c6dc219db1e90f) +++ Core/Common/test/Core.Common.Gui.Test/Forms/MessageWindow/MessageWindowTest.cs (.../MessageWindowTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -22,12 +22,10 @@ using System; using System.Data; using System.Windows.Forms; - using Core.Common.Gui.Forms.MessageWindow; using log4net.Core; using NUnit.Extensions.Forms; using NUnit.Framework; - using Rhino.Mocks; namespace Core.Common.Gui.Test.Forms.MessageWindow @@ -129,7 +127,7 @@ DialogBoxHandler = (name, wnd) => { var dialogTester = new FormTester(name); - dialogTitle = ((Form)dialogTester.TheObject).Text; + dialogTitle = ((Form) dialogTester.TheObject).Text; var testBoxTester = new TextBoxTester("textBox"); dialogText = testBoxTester.Text; Index: Core/Common/test/Core.Common.Gui.Test/Forms/PropertyGridView/PropertyResolverTest.cs =================================================================== diff -u -r151bab16a7ebc1bffc0621ab56c6dc219db1e90f -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Gui.Test/Forms/PropertyGridView/PropertyResolverTest.cs (.../PropertyResolverTest.cs) (revision 151bab16a7ebc1bffc0621ab56c6dc219db1e90f) +++ Core/Common/test/Core.Common.Gui.Test/Forms/PropertyGridView/PropertyResolverTest.cs (.../PropertyResolverTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -21,12 +21,10 @@ using System; using System.Linq; - using Core.Common.Gui.Forms.PropertyGridView; using Core.Common.Gui.Plugin; using Core.Common.Gui.PropertyBag; using Core.Common.TestUtil; - using NUnit.Framework; namespace Core.Common.Gui.Test.Forms.PropertyGridView @@ -59,7 +57,10 @@ public void GetObjectProperties_DataIsNull_ReturnNull() { // Setup - var propertyInfos = new PropertyInfo[] { new PropertyInfo() }; + var propertyInfos = new PropertyInfo[] + { + new PropertyInfo() + }; var resolver = new PropertyResolver(propertyInfos); @@ -74,7 +75,10 @@ public void GetObjectProperties_DataMatchesSinglePropertyInfoDataTypeDirectly_ReturnNewInstanceOfCorrespondingObjectProperties() { // Setup - var propertyInfos = new PropertyInfo[] { new PropertyInfo() }; + var propertyInfos = new PropertyInfo[] + { + new PropertyInfo() + }; var resolver = new PropertyResolver(propertyInfos); @@ -85,8 +89,8 @@ // Assert Assert.IsInstanceOf(result); - Assert.IsInstanceOf(((DynamicPropertyBag)result).WrappedObject); - Assert.AreSame(source, ((IObjectProperties)((DynamicPropertyBag)result).WrappedObject).Data); + Assert.IsInstanceOf(((DynamicPropertyBag) result).WrappedObject); + Assert.AreSame(source, ((IObjectProperties) ((DynamicPropertyBag) result).WrappedObject).Data); } [Test] @@ -113,8 +117,8 @@ var result = resolver.GetObjectProperties(source); // Assert - var bag = (DynamicPropertyBag)result; - var properties = (PropertiesForA)bag.WrappedObject; + var bag = (DynamicPropertyBag) result; + var properties = (PropertiesForA) bag.WrappedObject; Assert.AreSame(otherObject, properties.Data); } @@ -135,7 +139,7 @@ AfterCreate = p => { Assert.AreSame(source, p.Data, - "properties object should have been initialized with 'source'."); + "properties object should have been initialized with 'source'."); p.Data = otherObject; } } @@ -147,8 +151,8 @@ var result = resolver.GetObjectProperties(source); // Assert - var bag = (DynamicPropertyBag)result; - var properties = (PropertiesForA)bag.WrappedObject; + var bag = (DynamicPropertyBag) result; + var properties = (PropertiesForA) bag.WrappedObject; Assert.AreSame(otherObject, properties.Data); } @@ -177,8 +181,8 @@ // Assert Assert.IsInstanceOf(result); - Assert.IsInstanceOf(((DynamicPropertyBag)result).WrappedObject); - Assert.AreSame(source, ((IObjectProperties)((DynamicPropertyBag)result).WrappedObject).Data); + Assert.IsInstanceOf(((DynamicPropertyBag) result).WrappedObject); + Assert.AreSame(source, ((IObjectProperties) ((DynamicPropertyBag) result).WrappedObject).Data); } [Test] @@ -203,8 +207,8 @@ // Assert Assert.IsInstanceOf(result); - Assert.IsInstanceOf(((DynamicPropertyBag)result).WrappedObject); - Assert.AreSame(source, ((IObjectProperties)((DynamicPropertyBag)result).WrappedObject).Data); + Assert.IsInstanceOf(((DynamicPropertyBag) result).WrappedObject); + Assert.AreSame(source, ((IObjectProperties) ((DynamicPropertyBag) result).WrappedObject).Data); } [Test] @@ -250,8 +254,8 @@ // Assert Assert.IsInstanceOf(result); - Assert.IsInstanceOf(((DynamicPropertyBag)result).WrappedObject); - Assert.AreSame(source, ((IObjectProperties)((DynamicPropertyBag)result).WrappedObject).Data); + Assert.IsInstanceOf(((DynamicPropertyBag) result).WrappedObject); + Assert.AreSame(source, ((IObjectProperties) ((DynamicPropertyBag) result).WrappedObject).Data); } [Test] @@ -273,8 +277,8 @@ // Assert Assert.IsInstanceOf(result); - Assert.IsInstanceOf(((DynamicPropertyBag)result).WrappedObject); - Assert.AreSame(source, ((IObjectProperties)((DynamicPropertyBag)result).WrappedObject).Data); + Assert.IsInstanceOf(((DynamicPropertyBag) result).WrappedObject); + Assert.AreSame(source, ((IObjectProperties) ((DynamicPropertyBag) result).WrappedObject).Data); } [Test] @@ -298,8 +302,8 @@ // Assert Assert.IsInstanceOf(result); - Assert.IsInstanceOf(((DynamicPropertyBag)result).WrappedObject); - Assert.AreSame(source, ((IObjectProperties)((DynamicPropertyBag)result).WrappedObject).Data); + Assert.IsInstanceOf(((DynamicPropertyBag) result).WrappedObject); + Assert.AreSame(source, ((IObjectProperties) ((DynamicPropertyBag) result).WrappedObject).Data); } [Test] @@ -320,8 +324,8 @@ // Assert Assert.IsInstanceOf(result); - Assert.IsInstanceOf(((DynamicPropertyBag)result).WrappedObject); - Assert.AreSame(source, ((IObjectProperties)((DynamicPropertyBag)result).WrappedObject).Data); + Assert.IsInstanceOf(((DynamicPropertyBag) result).WrappedObject); + Assert.AreSame(source, ((IObjectProperties) ((DynamicPropertyBag) result).WrappedObject).Data); } [Test] @@ -347,10 +351,7 @@ #region Nested Types: various test-case classes - private class A - { - - } + private class A {} private class PropertiesForA : IObjectProperties { Index: Core/Common/test/Core.Common.Gui.Test/Forms/RichTextFileTest.cs =================================================================== diff -u -r151bab16a7ebc1bffc0621ab56c6dc219db1e90f -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Gui.Test/Forms/RichTextFileTest.cs (.../RichTextFileTest.cs) (revision 151bab16a7ebc1bffc0621ab56c6dc219db1e90f) +++ Core/Common/test/Core.Common.Gui.Test/Forms/RichTextFileTest.cs (.../RichTextFileTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -20,7 +20,6 @@ // All rights reserved. using Core.Common.Gui.Forms; - using NUnit.Framework; namespace Core.Common.Gui.Test.Forms Index: Core/Common/test/Core.Common.Gui.Test/Forms/RichTextViewTest.cs =================================================================== diff -u -r151bab16a7ebc1bffc0621ab56c6dc219db1e90f -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Gui.Test/Forms/RichTextViewTest.cs (.../RichTextViewTest.cs) (revision 151bab16a7ebc1bffc0621ab56c6dc219db1e90f) +++ Core/Common/test/Core.Common.Gui.Test/Forms/RichTextViewTest.cs (.../RichTextViewTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -20,10 +20,8 @@ // All rights reserved. using System.Windows.Forms; - using Core.Common.Controls.Views; using Core.Common.Gui.Forms; - using NUnit.Framework; namespace Core.Common.Gui.Test.Forms Index: Core/Common/test/Core.Common.Gui.Test/Forms/ViewHost/AvalonDockViewHostTest.cs =================================================================== diff -u -r1d6c97c937ef21a949a7ba41832c4b2a9707cbb8 -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Gui.Test/Forms/ViewHost/AvalonDockViewHostTest.cs (.../AvalonDockViewHostTest.cs) (revision 1d6c97c937ef21a949a7ba41832c4b2a9707cbb8) +++ Core/Common/test/Core.Common.Gui.Test/Forms/ViewHost/AvalonDockViewHostTest.cs (.../AvalonDockViewHostTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -593,16 +593,16 @@ // Setup var invalidLocation = 4; - using(var avalonDockViewHost = new AvalonDockViewHost()) - using(var testView = new TestView()) + using (var avalonDockViewHost = new AvalonDockViewHost()) + using (var testView = new TestView()) { // Call - TestDelegate test = () => avalonDockViewHost.AddToolView(testView, (ToolViewLocation)invalidLocation); + TestDelegate test = () => avalonDockViewHost.AddToolView(testView, (ToolViewLocation) invalidLocation); // Assert string expectedMessage = string.Format("The value of argument 'toolViewLocation' ({0}) is invalid for Enum type 'ToolViewLocation'.", invalidLocation); string parameter = TestHelper.AssertThrowsArgumentExceptionAndTestMessage( - test, + test, expectedMessage).ParamName; Assert.AreEqual("toolViewLocation", parameter); } Index: Core/Common/test/Core.Common.Gui.Test/Forms/ViewHost/ViewChangeEventArgsTest.cs =================================================================== diff -u -re25d2b8b5045ee7549f406cfb8a4ea0f81ec7a7d -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Gui.Test/Forms/ViewHost/ViewChangeEventArgsTest.cs (.../ViewChangeEventArgsTest.cs) (revision e25d2b8b5045ee7549f406cfb8a4ea0f81ec7a7d) +++ Core/Common/test/Core.Common.Gui.Test/Forms/ViewHost/ViewChangeEventArgsTest.cs (.../ViewChangeEventArgsTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -37,7 +37,7 @@ // Assert Assert.IsNull(args.View); - } + } [Test] public void Constructor_WithView_ViewSet() @@ -50,6 +50,6 @@ // Assert Assert.AreSame(view, args.View); - } + } } } \ No newline at end of file Index: Core/Common/test/Core.Common.Gui.Test/GuiCoreTest.cs =================================================================== diff -u -r0abf371c5f6f450232d49f3c1a031476063ce04b -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Gui.Test/GuiCoreTest.cs (.../GuiCoreTest.cs) (revision 0abf371c5f6f450232d49f3c1a031476063ce04b) +++ Core/Common/test/Core.Common.Gui.Test/GuiCoreTest.cs (.../GuiCoreTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -169,10 +169,11 @@ using (var mainWindow = new MainWindow()) using (new GuiCore(mainWindow, projectStore, projectFactory, guiCoreSettings)) + { + // Call + using (new GuiCore(mainWindow, projectStore, projectFactory, guiCoreSettings)) {} + } - // Call - using (new GuiCore(mainWindow, projectStore, projectFactory, guiCoreSettings)) - // Assert mocks.VerifyAll(); Assert.Fail("Expected an InvalidOperationException to be thrown."); Index: Core/Common/test/Core.Common.Gui.Test/Plugin/PluginBaseTest.cs =================================================================== diff -u -r0d22462e91eb69208ab2aee6ed2c621d31006b02 -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Gui.Test/Plugin/PluginBaseTest.cs (.../PluginBaseTest.cs) (revision 0d22462e91eb69208ab2aee6ed2c621d31006b02) +++ Core/Common/test/Core.Common.Gui.Test/Plugin/PluginBaseTest.cs (.../PluginBaseTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -247,7 +247,7 @@ { Gui = gui }; - + // Call plugin.Dispose(); Index: Core/Common/test/Core.Common.Gui.Test/Plugin/PropertyInfoExtensionsTest.cs =================================================================== diff -u -r151bab16a7ebc1bffc0621ab56c6dc219db1e90f -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Gui.Test/Plugin/PropertyInfoExtensionsTest.cs (.../PropertyInfoExtensionsTest.cs) (revision 151bab16a7ebc1bffc0621ab56c6dc219db1e90f) +++ Core/Common/test/Core.Common.Gui.Test/Plugin/PropertyInfoExtensionsTest.cs (.../PropertyInfoExtensionsTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -21,7 +21,6 @@ using Core.Common.Gui.Plugin; using Core.Common.Gui.PropertyBag; - using NUnit.Framework; namespace Core.Common.Gui.Test.Plugin Index: Core/Common/test/Core.Common.Gui.Test/Plugin/PropertyInfoTest.cs =================================================================== diff -u -r151bab16a7ebc1bffc0621ab56c6dc219db1e90f -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Gui.Test/Plugin/PropertyInfoTest.cs (.../PropertyInfoTest.cs) (revision 151bab16a7ebc1bffc0621ab56c6dc219db1e90f) +++ Core/Common/test/Core.Common.Gui.Test/Plugin/PropertyInfoTest.cs (.../PropertyInfoTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -20,10 +20,8 @@ // All rights reserved. using System; - using Core.Common.Gui.Plugin; using Core.Common.Gui.PropertyBag; - using NUnit.Framework; namespace Core.Common.Gui.Test.Plugin @@ -194,9 +192,6 @@ Assert.IsNull(convertedInfo.AfterCreate); } - private class TestObjectProperties : ObjectProperties - { - - } + private class TestObjectProperties : ObjectProperties {} } } \ No newline at end of file Index: Core/Common/test/Core.Common.Gui.Test/Plugin/ViewInfoTest.cs =================================================================== diff -u -r223b2a4edc4ac816051c7eeecb735c34a6246574 -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Gui.Test/Plugin/ViewInfoTest.cs (.../ViewInfoTest.cs) (revision 223b2a4edc4ac816051c7eeecb735c34a6246574) +++ Core/Common/test/Core.Common.Gui.Test/Plugin/ViewInfoTest.cs (.../ViewInfoTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -21,11 +21,9 @@ using System; using System.Drawing; - using Core.Common.Controls.Views; using Core.Common.Gui.Plugin; using Core.Common.Gui.Test.Properties; - using NUnit.Framework; namespace Core.Common.Gui.Test.Plugin @@ -256,18 +254,17 @@ viewInfo.AfterCreate(stringView, dataObject); Assert.IsTrue(afterCreateDelegateCalled); - } private class StringView : IView { + public object Data { get; set; } + public string Text { get; set; } + public void Dispose() { throw new NotImplementedException(); } - - public object Data { get; set; } - public string Text { get; set; } } } } \ No newline at end of file Index: Core/Common/test/Core.Common.Gui.Test/PropertyBag/DynamicPropertyBagTest.cs =================================================================== diff -u -rb954fb6f2dd56ffb96be7b61ab129f19d879d2ab -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Gui.Test/PropertyBag/DynamicPropertyBagTest.cs (.../DynamicPropertyBagTest.cs) (revision b954fb6f2dd56ffb96be7b61ab129f19d879d2ab) +++ Core/Common/test/Core.Common.Gui.Test/PropertyBag/DynamicPropertyBagTest.cs (.../DynamicPropertyBagTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -23,12 +23,11 @@ using System.ComponentModel; using System.Drawing.Design; using System.Linq; - using Core.Common.Gui.Attributes; using Core.Common.Gui.PropertyBag; using Core.Common.Utils.Reflection; - using NUnit.Framework; +using CategoryAttribute = System.ComponentModel.CategoryAttribute; namespace Core.Common.Gui.Test.PropertyBag { @@ -46,7 +45,7 @@ // Assert CollectionAssert.IsEmpty(dynamicPropertyBag.Properties, - "Object has no properties, therefore bag should have none too."); + "Object has no properties, therefore bag should have none too."); Assert.AreSame(propertyObject, dynamicPropertyBag.WrappedObject); } @@ -74,12 +73,12 @@ // Assert var namePropertySpec = dynamicPropertyBag.Properties.First(ps => ps.Name == "Name"); - CollectionAssert.Contains(namePropertySpec.Attributes, new System.ComponentModel.CategoryAttribute("General"), - "Should have initialized Attributes of the property spec with declared Category(\"General\")."); + CollectionAssert.Contains(namePropertySpec.Attributes, new CategoryAttribute("General"), + "Should have initialized Attributes of the property spec with declared Category(\"General\")."); var descriptionPropertySpec = dynamicPropertyBag.Properties.First(ps => ps.Name == "Description"); - CollectionAssert.Contains(descriptionPropertySpec.Attributes, ReadOnlyAttribute.Yes, - "Should have initialized Attributes of the property spec with declared ReadOnlyAttribute."); + CollectionAssert.Contains(descriptionPropertySpec.Attributes, ReadOnlyAttribute.Yes, + "Should have initialized Attributes of the property spec with declared ReadOnlyAttribute."); } [Test] @@ -269,7 +268,7 @@ }; var dynamicPropertyBag = new DynamicPropertyBag(propertyObject); - var propertyDescriptorCollection = ((ICustomTypeDescriptor)dynamicPropertyBag).GetProperties(new Attribute[] + var propertyDescriptorCollection = ((ICustomTypeDescriptor) dynamicPropertyBag).GetProperties(new Attribute[] { new BrowsableAttribute(true) }); @@ -301,10 +300,10 @@ var propThreeDescriptor = propertyDescriptorCollection.Find("PropThree", false); Assert.GreaterOrEqual(propertyDescriptorCollection.IndexOf(propThreeDescriptor), index, - "PropThree is not decorated with PropertyOrderAttribute, therefore should come after those that are."); + "PropThree is not decorated with PropertyOrderAttribute, therefore should come after those that are."); var propFourDescriptor = propertyDescriptorCollection.Find("PropFour", false); Assert.GreaterOrEqual(propertyDescriptorCollection.IndexOf(propFourDescriptor), index, - "PropFour is not decorated with PropertyOrderAttribute, therefore should come after those that are."); + "PropFour is not decorated with PropertyOrderAttribute, therefore should come after those that are."); } [Test] @@ -323,10 +322,10 @@ // Call var propertiesCollection = dynamicPropertyBag.GetProperties(); - + // Assert var wrappedValue = propertiesCollection[0].GetValue(dynamicPropertyBag.WrappedObject); - var bag = (DynamicPropertyBag)wrappedValue; + var bag = (DynamicPropertyBag) wrappedValue; Assert.AreSame(subProperties, bag.WrappedObject); } @@ -420,11 +419,11 @@ // Assert Assert.Less(properties.Count, dynamicPropertyBag.Properties.Count); Assert.IsNull(properties.Find("Name", false), - "Name is dynamically not browsable, therefore should not be returned."); + "Name is dynamically not browsable, therefore should not be returned."); Assert.IsNotNull(properties.Find("Description", false)); Assert.IsNotNull(properties.Find("IsNameReadOnly", false)); Assert.IsNull(properties.Find("Visible", false), - "Visible is statically not browsable, therefore should not be returned."); + "Visible is statically not browsable, therefore should not be returned."); } [Test] @@ -446,11 +445,11 @@ // Assert Assert.Less(properties.Count, dynamicPropertyBag.Properties.Count); Assert.IsNotNull(properties.Find("Name", false), - "Name is dynamically not browsable, therefore should be returned."); + "Name is dynamically not browsable, therefore should be returned."); Assert.IsNull(properties.Find("Description", false)); Assert.IsNull(properties.Find("IsNameReadOnly", false)); Assert.IsNotNull(properties.Find("Visible", false), - "Visible is statically not browsable, therefore should be returned."); + "Visible is statically not browsable, therefore should be returned."); } [Test] @@ -509,7 +508,7 @@ /// [DynamicReadOnly] [DynamicVisible] - [System.ComponentModel.Category("General")] + [Category("General")] public string Name { get; set; } [Browsable(true)] Index: Core/Common/test/Core.Common.Gui.Test/PropertyBag/ObjectPropertiesTest.cs =================================================================== diff -u -r151bab16a7ebc1bffc0621ab56c6dc219db1e90f -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Gui.Test/PropertyBag/ObjectPropertiesTest.cs (.../ObjectPropertiesTest.cs) (revision 151bab16a7ebc1bffc0621ab56c6dc219db1e90f) +++ Core/Common/test/Core.Common.Gui.Test/PropertyBag/ObjectPropertiesTest.cs (.../ObjectPropertiesTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -21,10 +21,8 @@ using System.ComponentModel; using System.Reflection; - using Core.Common.Gui.PropertyBag; using Core.Common.Utils.Reflection; - using NUnit.Framework; namespace Core.Common.Gui.Test.PropertyBag Index: Core/Common/test/Core.Common.Gui.Test/PropertyBag/PropertySpecDescriptorTest.cs =================================================================== diff -u -r151bab16a7ebc1bffc0621ab56c6dc219db1e90f -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Gui.Test/PropertyBag/PropertySpecDescriptorTest.cs (.../PropertySpecDescriptorTest.cs) (revision 151bab16a7ebc1bffc0621ab56c6dc219db1e90f) +++ Core/Common/test/Core.Common.Gui.Test/PropertyBag/PropertySpecDescriptorTest.cs (.../PropertySpecDescriptorTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -21,10 +21,8 @@ using System; using System.ComponentModel; - using Core.Common.Gui.Attributes; using Core.Common.Gui.PropertyBag; - using NUnit.Framework; namespace Core.Common.Gui.Test.PropertyBag @@ -56,7 +54,10 @@ public void IsReadOnly_PropertyHasDynamicReadOnlyProperty_ReturnExpectedValue(bool isPropertyReadOnly) { // Setup - var instance = new ClassWithProperties{ IsPropertyReadOnly = isPropertyReadOnly }; + var instance = new ClassWithProperties + { + IsPropertyReadOnly = isPropertyReadOnly + }; var propertySpec = new PropertySpec(instance.GetType().GetProperty("IntegerPropertyWithDynamicReadOnly")); var descriptor = new PropertySpecDescriptor(propertySpec, instance); @@ -118,7 +119,10 @@ public void IsBrowsable_PropertyHasDynamicBrowsableProperty_ReturnExpectedValue(bool isPropertyVisible) { // Setup - var instance = new ClassWithProperties { IsPropertyBrowsable = isPropertyVisible }; + var instance = new ClassWithProperties + { + IsPropertyBrowsable = isPropertyVisible + }; var propertySpec = new PropertySpec(instance.GetType().GetProperty("IntegerPropertyWithDynamicVisibility")); var descriptor = new PropertySpecDescriptor(propertySpec, instance); @@ -249,7 +253,7 @@ var value = propertyDescriptor.GetValue(instance); // Assert - var dynamicPropertyBag = (DynamicPropertyBag)value; + var dynamicPropertyBag = (DynamicPropertyBag) value; Assert.IsNotNull(dynamicPropertyBag); Assert.AreSame(instance.ComplexSubPropertyWithExandableObjectConverter, dynamicPropertyBag.WrappedObject); } @@ -270,6 +274,11 @@ }; } + [TypeConverter(typeof(ExpandableObjectConverter))] + public AnotherClassWithProperties ComplexSubPropertyWithExandableObjectConverter { get; set; } + + public AnotherClassWithProperties ComplexSubProperty { get; set; } + #region IsReadOnly state influencing testing members public string PropertyWithOnlyGetter @@ -327,11 +336,6 @@ } #endregion - - [TypeConverter(typeof(ExpandableObjectConverter))] - public AnotherClassWithProperties ComplexSubPropertyWithExandableObjectConverter { get; set; } - - public AnotherClassWithProperties ComplexSubProperty { get; set; } } private class AnotherClassWithProperties Index: Core/Common/test/Core.Common.Gui.Test/Selection/SelectedItemChangedEventArgsTest.cs =================================================================== diff -u -r151bab16a7ebc1bffc0621ab56c6dc219db1e90f -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Gui.Test/Selection/SelectedItemChangedEventArgsTest.cs (.../SelectedItemChangedEventArgsTest.cs) (revision 151bab16a7ebc1bffc0621ab56c6dc219db1e90f) +++ Core/Common/test/Core.Common.Gui.Test/Selection/SelectedItemChangedEventArgsTest.cs (.../SelectedItemChangedEventArgsTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -20,9 +20,7 @@ // All rights reserved. using System; - using Core.Common.Gui.Selection; - using NUnit.Framework; namespace Core.Common.Gui.Test.Selection Index: Core/Common/test/Core.Common.Gui.Test/ViewPropertyEditorTest.cs =================================================================== diff -u -r151bab16a7ebc1bffc0621ab56c6dc219db1e90f -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Gui.Test/ViewPropertyEditorTest.cs (.../ViewPropertyEditorTest.cs) (revision 151bab16a7ebc1bffc0621ab56c6dc219db1e90f) +++ Core/Common/test/Core.Common.Gui.Test/ViewPropertyEditorTest.cs (.../ViewPropertyEditorTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -20,11 +20,8 @@ // All rights reserved. using System.Drawing.Design; - using Core.Common.Gui.Commands; - using NUnit.Framework; - using Rhino.Mocks; namespace Core.Common.Gui.Test Index: Core/Common/test/Core.Common.IO.Test/Properties/AssemblyInfo.cs =================================================================== diff -u -r2c6171c45fe80090abcff004a03b8023196a7fe7 -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.IO.Test/Properties/AssemblyInfo.cs (.../AssemblyInfo.cs) (revision 2c6171c45fe80090abcff004a03b8023196a7fe7) +++ Core/Common/test/Core.Common.IO.Test/Properties/AssemblyInfo.cs (.../AssemblyInfo.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -24,4 +24,4 @@ [assembly: AssemblyTitle("Core.Common.IO.Test")] [assembly: AssemblyProduct("Core.Common.IO.Test")] -[assembly: Guid("06EAFA1E-707B-488A-B360-ECE0F870CACF")] +[assembly: Guid("06EAFA1E-707B-488A-B360-ECE0F870CACF")] \ No newline at end of file Index: Core/Common/test/Core.Common.IO.Test/Readers/StreamReaderHelperTest.cs =================================================================== diff -u -r9a4c74a9d2cc49987adf0049919baafa6e12a618 -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.IO.Test/Readers/StreamReaderHelperTest.cs (.../StreamReaderHelperTest.cs) (revision 9a4c74a9d2cc49987adf0049919baafa6e12a618) +++ Core/Common/test/Core.Common.IO.Test/Readers/StreamReaderHelperTest.cs (.../StreamReaderHelperTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -79,4 +79,4 @@ Assert.IsInstanceOf(exception.InnerException); } } -} +} \ No newline at end of file Index: Core/Common/test/Core.Common.TestUtil.Test/DirectoryPermissionsRevokerTest.cs =================================================================== diff -u -rbc09a26012ecfad188f43e91b1e596198f784614 -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.TestUtil.Test/DirectoryPermissionsRevokerTest.cs (.../DirectoryPermissionsRevokerTest.cs) (revision bc09a26012ecfad188f43e91b1e596198f784614) +++ Core/Common/test/Core.Common.TestUtil.Test/DirectoryPermissionsRevokerTest.cs (.../DirectoryPermissionsRevokerTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -230,7 +230,7 @@ fs.AccessControlType == AccessControlType.Deny); return fileSystemAccessRule; } - + #endregion #region Apply access rules Index: Core/Common/test/Core.Common.TestUtil.Test/DoubleWithToleranceComparerTest.cs =================================================================== diff -u -rde4477561032a5d95d5e65e50b719724466648ed -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.TestUtil.Test/DoubleWithToleranceComparerTest.cs (.../DoubleWithToleranceComparerTest.cs) (revision de4477561032a5d95d5e65e50b719724466648ed) +++ Core/Common/test/Core.Common.TestUtil.Test/DoubleWithToleranceComparerTest.cs (.../DoubleWithToleranceComparerTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -22,7 +22,6 @@ using System; using System.Collections; using System.Collections.Generic; - using NUnit.Framework; namespace Core.Common.TestUtil.Test @@ -97,16 +96,16 @@ [Test] [Combinatorial] public void Compare_FirstLessThanSecond_ReturnLessThanZero( - [Values(1.1)]double first, - [Values(2.2 + 1e-6, 6.8)]double second, - [Values(true, false)]bool castToObject) + [Values(1.1)] double first, + [Values(2.2 + 1e-6, 6.8)] double second, + [Values(true, false)] bool castToObject) { // Setup var comparer = new DoubleWithToleranceComparer(1.1); // Call var result = castToObject ? - comparer.Compare((object)first, second) : + comparer.Compare((object) first, second) : comparer.Compare(first, second); // Assert @@ -116,16 +115,16 @@ [Test] [Combinatorial] public void Compare_FirstGreaterThanSecond_ReturnGreaterThanZero( - [Values(1.1)]double first, - [Values(0.6 - 1e-6, -9.65)]double second, - [Values(true, false)]bool castToObject) + [Values(1.1)] double first, + [Values(0.6 - 1e-6, -9.65)] double second, + [Values(true, false)] bool castToObject) { // Setup var comparer = new DoubleWithToleranceComparer(0.5); // Call var result = castToObject ? - comparer.Compare((object)first, second) : + comparer.Compare((object) first, second) : comparer.Compare(first, second); // Assert Index: Core/Common/test/Core.Common.TestUtil.Test/FileDisposeHelperTest.cs =================================================================== diff -u -rce31448a066c084f755439f3e7d453bfb042b291 -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.TestUtil.Test/FileDisposeHelperTest.cs (.../FileDisposeHelperTest.cs) (revision ce31448a066c084f755439f3e7d453bfb042b291) +++ Core/Common/test/Core.Common.TestUtil.Test/FileDisposeHelperTest.cs (.../FileDisposeHelperTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -81,14 +81,14 @@ { // Setup string filePath = "willExist.tmp"; - + try { // Precondition Assert.IsFalse(File.Exists(filePath)); // Call - using (new FileDisposeHelper(filePath)) + using (new FileDisposeHelper(filePath)) { // Assert Assert.IsTrue(File.Exists(filePath)); @@ -128,7 +128,7 @@ try { // Call - using (new FileDisposeHelper(filePaths)) + using (new FileDisposeHelper(filePaths)) { // Assert foreach (var filePath in filePaths) Index: Core/Common/test/Core.Common.TestUtil.Test/Point2DComparerWithToleranceTest.cs =================================================================== diff -u -rde4477561032a5d95d5e65e50b719724466648ed -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.TestUtil.Test/Point2DComparerWithToleranceTest.cs (.../Point2DComparerWithToleranceTest.cs) (revision de4477561032a5d95d5e65e50b719724466648ed) +++ Core/Common/test/Core.Common.TestUtil.Test/Point2DComparerWithToleranceTest.cs (.../Point2DComparerWithToleranceTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -20,7 +20,6 @@ // All rights reserved. using Core.Common.Base.Geometry; - using NUnit.Framework; namespace Core.Common.TestUtil.Test @@ -81,7 +80,7 @@ var point2 = new Point2D(1.1, 3.3); // Call - int result = new Point2DComparerWithTolerance(1.1-1e-6).Compare(point1, point2); + int result = new Point2DComparerWithTolerance(1.1 - 1e-6).Compare(point1, point2); // Assert Assert.AreEqual(1, result); Index: Core/Common/test/Core.Common.TestUtil.Test/TestHelperTest.cs =================================================================== diff -u -rb075dd9f097d669fc99c4783fed9192abe77fcc1 -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.TestUtil.Test/TestHelperTest.cs (.../TestHelperTest.cs) (revision b075dd9f097d669fc99c4783fed9192abe77fcc1) +++ Core/Common/test/Core.Common.TestUtil.Test/TestHelperTest.cs (.../TestHelperTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -23,11 +23,8 @@ using System.Drawing; using System.IO; using System.Windows.Forms; - using Core.Common.TestUtil.Test.Properties; - using log4net; - using NUnit.Framework; namespace Core.Common.TestUtil.Test @@ -59,7 +56,7 @@ { // Call TestDelegate call = () => TestHelper.CanOpenFileForWrite(invalidPath); - + // Assert Assert.Catch(call); } @@ -87,7 +84,7 @@ { string path = TestHelper.GetTestDataPath(TestDataPath.Application.Ringtoets.Storage); Assert.IsTrue(Directory.Exists(path)); - + path = TestHelper.GetTestDataPath(TestDataPath.Core.Common.Gui); Assert.IsTrue(Directory.Exists(path)); path = TestHelper.GetTestDataPath(TestDataPath.Core.Common.Utils); @@ -159,7 +156,8 @@ log.Error("test 1"); log.Warn("test 2"); log.Info("test 3"); - }, new [] { + }, new[] + { Tuple.Create("test 1", LogLevelConstant.Error), Tuple.Create("test 2", LogLevelConstant.Warn), Tuple.Create("test 3", LogLevelConstant.Info) @@ -464,10 +462,7 @@ const string someMessage = "Exception"; var argumentException = new ArgumentException(someMessage); - TestDelegate t = () => - { - throw argumentException; - }; + TestDelegate t = () => { throw argumentException; }; // Call var exception = TestHelper.AssertThrowsArgumentExceptionAndTestMessage(t, someMessage); @@ -487,6 +482,6 @@ }; } - private class TestToolStripDropDownItem : ToolStripDropDownItem { } + private class TestToolStripDropDownItem : ToolStripDropDownItem {} } } \ No newline at end of file Index: Core/Common/test/Core.Common.TestUtil.Test/WindowsFormsTestHelperTest.cs =================================================================== diff -u -rde4477561032a5d95d5e65e50b719724466648ed -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.TestUtil.Test/WindowsFormsTestHelperTest.cs (.../WindowsFormsTestHelperTest.cs) (revision de4477561032a5d95d5e65e50b719724466648ed) +++ Core/Common/test/Core.Common.TestUtil.Test/WindowsFormsTestHelperTest.cs (.../WindowsFormsTestHelperTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -68,11 +68,11 @@ WindowsFormsTestHelper.CloseAll(); } - [Test] + [Test] public void Action_ThrowsException_StackTraceCorrectly() { TestDelegate testDelegate = () => WindowsFormsTestHelper.Show(new Label(), MethodWithException); - + var exception = Assert.Throws(testDelegate); Assert.AreEqual("my message", exception.Message); Assert.IsTrue(exception.StackTrace.Contains("MethodWithException")); @@ -91,7 +91,7 @@ thread.Start(); thread.Join(); }); - + var exception = Assert.Throws(testDelegate); Assert.IsTrue(exception.Message.Contains("Throwing this exception is intended and part of a test.")); Index: Core/Common/test/Core.Common.TestUtil/DoubleWithToleranceComparer.cs =================================================================== diff -u -r8a2cbeb8a9c5b0c8d5062af1a2a825d2b9134bf3 -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.TestUtil/DoubleWithToleranceComparer.cs (.../DoubleWithToleranceComparer.cs) (revision 8a2cbeb8a9c5b0c8d5062af1a2a825d2b9134bf3) +++ Core/Common/test/Core.Common.TestUtil/DoubleWithToleranceComparer.cs (.../DoubleWithToleranceComparer.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -38,6 +38,15 @@ this.tolerance = tolerance; } + public int Compare(object x, object y) + { + if (!(x is double) || !(y is double)) + { + throw new ArgumentException(string.Format("Cannot compare objects other than {0} with this comparer.", typeof(double))); + } + return Compare((double) x, (double) y); + } + public int Compare(double firstDouble, double secondDouble) { var diff = firstDouble - secondDouble; @@ -48,14 +57,5 @@ return tolerable ? 0 : nonTolerableDiff; } - - public int Compare(object x, object y) - { - if (!(x is double) || !(y is double)) - { - throw new ArgumentException(string.Format("Cannot compare objects other than {0} with this comparer.", typeof(double))); - } - return Compare((double)x, (double)y); - } } } \ No newline at end of file Index: Core/Common/test/Core.Common.TestUtil/FileDisposeHelper.cs =================================================================== diff -u -r16d6d5ad38a45e4e0e8b3a9b41b3383d31595a36 -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.TestUtil/FileDisposeHelper.cs (.../FileDisposeHelper.cs) (revision 16d6d5ad38a45e4e0e8b3a9b41b3383d31595a36) +++ Core/Common/test/Core.Common.TestUtil/FileDisposeHelper.cs (.../FileDisposeHelper.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -59,9 +59,10 @@ /// /// Path of the file that will be created, if valid. /// Thrown when the file could not be created by the system. - public FileDisposeHelper(string filePath) : this(new [] { filePath }) + public FileDisposeHelper(string filePath) : this(new[] { - } + filePath + }) {} public void Dispose() { @@ -109,7 +110,7 @@ { if (FileUtils.IsValidFilePath(filePath)) { - try + try { using (File.Create(filePath)) {} } Index: Core/Common/test/Core.Common.TestUtil/GuiTestHelper.cs =================================================================== diff -u -r8a2cbeb8a9c5b0c8d5062af1a2a825d2b9134bf3 -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.TestUtil/GuiTestHelper.cs (.../GuiTestHelper.cs) (revision 8a2cbeb8a9c5b0c8d5062af1a2a825d2b9134bf3) +++ Core/Common/test/Core.Common.TestUtil/GuiTestHelper.cs (.../GuiTestHelper.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -39,8 +39,6 @@ private static Form synchronizationForm; - private static Exception exception; - private static bool unhandledThreadExceptionOccured; private static bool appDomainExceptionOccured; @@ -83,43 +81,37 @@ } } - public static Exception Exception - { - get - { - return exception; - } - } + public static Exception Exception { get; private set; } public static void RethrowUnhandledException() { - if (exception == null) + if (Exception == null) { return; } if (unhandledThreadExceptionOccured) { - throw new UnhandledException("Unhandled thread exception: " + exception.Message, exception, exception.StackTrace); + throw new UnhandledException("Unhandled thread exception: " + Exception.Message, Exception, Exception.StackTrace); } if (appDomainExceptionOccured) { - throw new UnhandledException("Unhandled app domain exception: " + exception.Message, exception, exception.StackTrace); + throw new UnhandledException("Unhandled app domain exception: " + Exception.Message, Exception, Exception.StackTrace); } } public static void Initialize() { - exception = null; + Exception = null; unhandledThreadExceptionOccured = false; appDomainExceptionOccured = false; } private static void CurrentDispatcher_UnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e) { unhandledThreadExceptionOccured = true; - exception = e.Exception; + Exception = e.Exception; RethrowUnhandledException(); } @@ -140,15 +132,15 @@ private static void AppDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) { appDomainExceptionOccured = true; - exception = e.ExceptionObject as Exception; + Exception = e.ExceptionObject as Exception; RethrowUnhandledException(); } private static void Application_ThreadException(object sender, ThreadExceptionEventArgs e) { unhandledThreadExceptionOccured = true; - exception = e.Exception; + Exception = e.Exception; RethrowUnhandledException(); } Index: Core/Common/test/Core.Common.TestUtil/Point2DComparerWithTolerance.cs =================================================================== diff -u -rde4477561032a5d95d5e65e50b719724466648ed -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.TestUtil/Point2DComparerWithTolerance.cs (.../Point2DComparerWithTolerance.cs) (revision de4477561032a5d95d5e65e50b719724466648ed) +++ Core/Common/test/Core.Common.TestUtil/Point2DComparerWithTolerance.cs (.../Point2DComparerWithTolerance.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -21,7 +21,6 @@ using System.Collections; using System.Collections.Generic; - using Core.Common.Base.Geometry; namespace Core.Common.TestUtil Index: Core/Common/test/Core.Common.TestUtil/WindowsFormsTestHelper.cs =================================================================== diff -u -r050043cae5f4544e895e577a8a0f42c0271b80b0 -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.TestUtil/WindowsFormsTestHelper.cs (.../WindowsFormsTestHelper.cs) (revision 050043cae5f4544e895e577a8a0f42c0271b80b0) +++ Core/Common/test/Core.Common.TestUtil/WindowsFormsTestHelper.cs (.../WindowsFormsTestHelper.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -34,8 +34,8 @@ { private static string nonModalControlsTestName; // current unit test name private static readonly IList nonModalControls = new List(); - private Action
formShown; private readonly GuiTestHelper guiTestHelper; + private Action formShown; private bool wasShown; public WindowsFormsTestHelper() Index: Core/Common/test/Core.Common.TestUtil/WpfTestHelper.xaml.cs =================================================================== diff -u -rde4477561032a5d95d5e65e50b719724466648ed -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.TestUtil/WpfTestHelper.xaml.cs (.../WpfTestHelper.xaml.cs) (revision de4477561032a5d95d5e65e50b719724466648ed) +++ Core/Common/test/Core.Common.TestUtil/WpfTestHelper.xaml.cs (.../WpfTestHelper.xaml.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -21,9 +21,9 @@ using System; using System.Windows; +using System.Windows.Controls; using log4net; using Application = System.Windows.Forms.Application; -using Control = System.Windows.Controls.Control; namespace Core.Common.TestUtil { @@ -36,10 +36,10 @@ private static Window window; - private Action shownAction; - private readonly GuiTestHelper guiTestHelper; + private Action shownAction; + private bool wasShown; public WpfTestHelper() Index: Core/Common/test/Core.Common.Utils.Test/Attributes/ResourcesCategoryAttributeTest.cs =================================================================== diff -u -r151bab16a7ebc1bffc0621ab56c6dc219db1e90f -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Utils.Test/Attributes/ResourcesCategoryAttributeTest.cs (.../ResourcesCategoryAttributeTest.cs) (revision 151bab16a7ebc1bffc0621ab56c6dc219db1e90f) +++ Core/Common/test/Core.Common.Utils.Test/Attributes/ResourcesCategoryAttributeTest.cs (.../ResourcesCategoryAttributeTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -20,10 +20,8 @@ // All rights reserved. using System; - using Core.Common.Utils.Attributes; using Core.Common.Utils.Test.Properties; - using NUnit.Framework; namespace Core.Common.Utils.Test.Attributes Index: Core/Common/test/Core.Common.Utils.Test/Attributes/ResourcesDescriptionAttributeTest.cs =================================================================== diff -u -r151bab16a7ebc1bffc0621ab56c6dc219db1e90f -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Utils.Test/Attributes/ResourcesDescriptionAttributeTest.cs (.../ResourcesDescriptionAttributeTest.cs) (revision 151bab16a7ebc1bffc0621ab56c6dc219db1e90f) +++ Core/Common/test/Core.Common.Utils.Test/Attributes/ResourcesDescriptionAttributeTest.cs (.../ResourcesDescriptionAttributeTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -20,10 +20,8 @@ // All rights reserved. using System; - using Core.Common.Utils.Attributes; using Core.Common.Utils.Test.Properties; - using NUnit.Framework; namespace Core.Common.Utils.Test.Attributes Index: Core/Common/test/Core.Common.Utils.Test/Drawing/GraphicsExtensionsTest.cs =================================================================== diff -u -re3f9dffa91a0def0b6e6bc7dfabef74cc64745c5 -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Utils.Test/Drawing/GraphicsExtensionsTest.cs (.../GraphicsExtensionsTest.cs) (revision e3f9dffa91a0def0b6e6bc7dfabef74cc64745c5) +++ Core/Common/test/Core.Common.Utils.Test/Drawing/GraphicsExtensionsTest.cs (.../GraphicsExtensionsTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -21,11 +21,9 @@ using System.Drawing; using System.Drawing.Imaging; - using Core.Common.TestUtil; using Core.Common.Utils.Drawing; using Core.Common.Utils.Test.Properties; - using NUnit.Framework; namespace Core.Common.Utils.Test.Drawing Index: Core/Common/test/Core.Common.Utils.Test/Drawing/ImageExtensionsTest.cs =================================================================== diff -u -re3f9dffa91a0def0b6e6bc7dfabef74cc64745c5 -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Utils.Test/Drawing/ImageExtensionsTest.cs (.../ImageExtensionsTest.cs) (revision e3f9dffa91a0def0b6e6bc7dfabef74cc64745c5) +++ Core/Common/test/Core.Common.Utils.Test/Drawing/ImageExtensionsTest.cs (.../ImageExtensionsTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -26,7 +26,6 @@ using Core.Common.TestUtil; using Core.Common.Utils.Drawing; using Core.Common.Utils.Test.Properties; - using NUnit.Framework; namespace Core.Common.Utils.Test.Drawing Index: Core/Common/test/Core.Common.Utils.Test/EnumDisplayWrapperTest.cs =================================================================== diff -u -r151bab16a7ebc1bffc0621ab56c6dc219db1e90f -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Utils.Test/EnumDisplayWrapperTest.cs (.../EnumDisplayWrapperTest.cs) (revision 151bab16a7ebc1bffc0621ab56c6dc219db1e90f) +++ Core/Common/test/Core.Common.Utils.Test/EnumDisplayWrapperTest.cs (.../EnumDisplayWrapperTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -35,11 +35,11 @@ { // Call TestDelegate test = () => new EnumDisplayWrapper(null); - + // Assert var paramName = Assert.Throws(test).ParamName; Assert.AreEqual("value", paramName); - } + } [Test] public void Constructor_WithTypeParameterNotOfEnumType_ThrowsArgumentException() @@ -79,7 +79,7 @@ Assert.AreEqual(Resources.EnumDisplayWrapperTest_DisplayNameValueDisplayName, displayName); } - enum TestEnum + private enum TestEnum { NoDisplayName, Index: Core/Common/test/Core.Common.Utils.Test/Events/EventArgsTest.cs =================================================================== diff -u -r151bab16a7ebc1bffc0621ab56c6dc219db1e90f -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Utils.Test/Events/EventArgsTest.cs (.../EventArgsTest.cs) (revision 151bab16a7ebc1bffc0621ab56c6dc219db1e90f) +++ Core/Common/test/Core.Common.Utils.Test/Events/EventArgsTest.cs (.../EventArgsTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -20,7 +20,6 @@ // All rights reserved. using Core.Common.Utils.Events; - using NUnit.Framework; namespace Core.Common.Utils.Test.Events Index: Core/Common/test/Core.Common.Utils.Test/Extensions/CollectionExtensionsTest.cs =================================================================== diff -u -r151bab16a7ebc1bffc0621ab56c6dc219db1e90f -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Utils.Test/Extensions/CollectionExtensionsTest.cs (.../CollectionExtensionsTest.cs) (revision 151bab16a7ebc1bffc0621ab56c6dc219db1e90f) +++ Core/Common/test/Core.Common.Utils.Test/Extensions/CollectionExtensionsTest.cs (.../CollectionExtensionsTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -20,9 +20,7 @@ // All rights reserved. using System.Collections.Generic; - using Core.Common.Utils.Extensions; - using NUnit.Framework; namespace Core.Common.Utils.Test.Extensions @@ -93,7 +91,10 @@ }); // Assert - CollectionAssert.AreEqual(new[] { expectedElementToKeep }, collection); + CollectionAssert.AreEqual(new[] + { + expectedElementToKeep + }, collection); } } } \ No newline at end of file Index: Core/Common/test/Core.Common.Utils.Test/Extensions/ComparableExtensionsTest.cs =================================================================== diff -u -r151bab16a7ebc1bffc0621ab56c6dc219db1e90f -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Utils.Test/Extensions/ComparableExtensionsTest.cs (.../ComparableExtensionsTest.cs) (revision 151bab16a7ebc1bffc0621ab56c6dc219db1e90f) +++ Core/Common/test/Core.Common.Utils.Test/Extensions/ComparableExtensionsTest.cs (.../ComparableExtensionsTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -20,9 +20,7 @@ // All rights reserved. using System; - using Core.Common.Utils.Extensions; - using NUnit.Framework; namespace Core.Common.Utils.Test.Extensions Index: Core/Common/test/Core.Common.Utils.Test/Extensions/EnumerableExtensionsTest.cs =================================================================== diff -u -r151bab16a7ebc1bffc0621ab56c6dc219db1e90f -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Utils.Test/Extensions/EnumerableExtensionsTest.cs (.../EnumerableExtensionsTest.cs) (revision 151bab16a7ebc1bffc0621ab56c6dc219db1e90f) +++ Core/Common/test/Core.Common.Utils.Test/Extensions/EnumerableExtensionsTest.cs (.../EnumerableExtensionsTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -21,9 +21,7 @@ using System; using System.Collections.Generic; - using Core.Common.Utils.Extensions; - using NUnit.Framework; namespace Core.Common.Utils.Test.Extensions Index: Core/Common/test/Core.Common.Utils.Test/FileUtilsTest.cs =================================================================== diff -u -r1c4e27d7463922b9baff2c5886a21735bf24b59e -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Utils.Test/FileUtilsTest.cs (.../FileUtilsTest.cs) (revision 1c4e27d7463922b9baff2c5886a21735bf24b59e) +++ Core/Common/test/Core.Common.Utils.Test/FileUtilsTest.cs (.../FileUtilsTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -152,7 +152,7 @@ public void DeleteOldFiles_InvalidEmptyPath_ThrowsArgumentException(string invalidPath) { // Call - TestDelegate call = () => FileUtils.DeleteOldFiles(invalidPath,"",0); + TestDelegate call = () => FileUtils.DeleteOldFiles(invalidPath, "", 0); // Assert string invalidParameterName = Assert.Throws(call).ParamName; @@ -175,7 +175,7 @@ string invalidParameterName = Assert.Throws(call).ParamName; Assert.AreEqual("searchPattern", invalidParameterName); } - + [Test] public void DeleteOldFiles_PathDoesNotExist_ThrowsIOException() { Index: Core/Common/test/Core.Common.Utils.Test/IO/EmbeddedResourceFileWriterTest.cs =================================================================== diff -u -r151bab16a7ebc1bffc0621ab56c6dc219db1e90f -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Utils.Test/IO/EmbeddedResourceFileWriterTest.cs (.../EmbeddedResourceFileWriterTest.cs) (revision 151bab16a7ebc1bffc0621ab56c6dc219db1e90f) +++ Core/Common/test/Core.Common.Utils.Test/IO/EmbeddedResourceFileWriterTest.cs (.../EmbeddedResourceFileWriterTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -118,4 +118,4 @@ Assert.IsTrue(exception.Message.Contains("Cannot find embedded resource file 'NonExistingResource.txt'")); } } -} +} \ No newline at end of file Index: Core/Common/test/Core.Common.Utils.Test/ReferenceEqualityComparerTest.cs =================================================================== diff -u -r151bab16a7ebc1bffc0621ab56c6dc219db1e90f -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Utils.Test/ReferenceEqualityComparerTest.cs (.../ReferenceEqualityComparerTest.cs) (revision 151bab16a7ebc1bffc0621ab56c6dc219db1e90f) +++ Core/Common/test/Core.Common.Utils.Test/ReferenceEqualityComparerTest.cs (.../ReferenceEqualityComparerTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -70,7 +70,8 @@ } [Test] - public void Equals_SameInstance_ReturnTrue() { + public void Equals_SameInstance_ReturnTrue() + { // Setup var comparer = new ReferenceEqualityComparer(); var obj = new object(); @@ -90,15 +91,20 @@ // Call var equals = comparer.Equals(objectFirst, objectSecond); - + // Assert Assert.IsFalse(equals); Assert.IsTrue(objectFirst.Equals(objectSecond)); Assert.AreNotEqual(comparer.GetHashCode(objectFirst), comparer.GetHashCode(objectSecond)); } - class TestObject + private class TestObject { + public int GetBaseHashCode() + { + return base.GetHashCode(); + } + public override bool Equals(object obj) { return true; @@ -108,11 +114,6 @@ { return 1; } - - public int GetBaseHashCode() - { - return base.GetHashCode(); - } } } } \ No newline at end of file Index: Core/Common/test/Core.Common.Utils.Test/Reflection/TypeUtilsTest.cs =================================================================== diff -u -r151bab16a7ebc1bffc0621ab56c6dc219db1e90f -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Core/Common/test/Core.Common.Utils.Test/Reflection/TypeUtilsTest.cs (.../TypeUtilsTest.cs) (revision 151bab16a7ebc1bffc0621ab56c6dc219db1e90f) +++ Core/Common/test/Core.Common.Utils.Test/Reflection/TypeUtilsTest.cs (.../TypeUtilsTest.cs) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -22,7 +22,6 @@ using System; using System.ComponentModel; using System.Reflection; - using Core.Common.Utils.Reflection; using NUnit.Framework; @@ -459,18 +458,18 @@ [TypeConverter(typeof(DoubleConverter))] public double PropertyWithTypeConverter { get; private set; } + public object PublicMethod() + { + return this; + } + /// /// Method used in reflection for tests above /// private int PrivateMethod(int i) { - return i * 2; + return i*2; } - - public object PublicMethod() - { - return this; - } } private class DerivedTestClass : TestClass Index: Ringtoets.DotSettings =================================================================== diff -u -r890e0dbb7d3989a8dfdfb64be99c2031b46bccf2 -rc0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c --- Ringtoets.DotSettings (.../Ringtoets.DotSettings) (revision 890e0dbb7d3989a8dfdfb64be99c2031b46bccf2) +++ Ringtoets.DotSettings (.../Ringtoets.DotSettings) (revision c0f6e8b0f9c81a6fe8e8929d7d97325dfd84a87c) @@ -64,6 +64,11 @@ <Access /> </Entry.SortBy> </Entry> + <Entry DisplayName="Constants"> + <Entry.Match> + <Kind Is="Constant" /> + </Entry.Match> + </Entry> <Entry DisplayName="Properties"> <Entry.Match> <Kind Is="Property" />