Index: test/Common/SharpMap.UI.Tests/Tools/CurvePointToolTest.cs =================================================================== diff -u -r8f6ae890fed8e8eae3a32f9c0498a10f82e0ddf9 -r5fc71a385897af92ccb092f2f969b5709afab85a --- test/Common/SharpMap.UI.Tests/Tools/CurvePointToolTest.cs (.../CurvePointToolTest.cs) (revision 8f6ae890fed8e8eae3a32f9c0498a10f82e0ddf9) +++ test/Common/SharpMap.UI.Tests/Tools/CurvePointToolTest.cs (.../CurvePointToolTest.cs) (revision 5fc71a385897af92ccb092f2f969b5709afab85a) @@ -11,11 +11,14 @@ namespace SharpMap.UI.Tests.Tools { - public class CloneableFeature: Feature + public class CloneableFeature : Feature { public override object Clone() { - return new CloneableFeature {Attributes = Attributes, Geometry = (IGeometry) Geometry.Clone()}; + return new CloneableFeature + { + Attributes = Attributes, Geometry = (IGeometry) Geometry.Clone() + }; } } @@ -30,9 +33,13 @@ var vectorLayer = new VectorLayer(); var layerData = new FeatureCollection(); vectorLayer.DataSource = layerData; - layerData.FeatureType = typeof (CloneableFeature); + layerData.FeatureType = typeof(CloneableFeature); - layerData.Add(new LineString(new[] {new Coordinate(0, 0), new Coordinate(100, 0)})); + layerData.Add(new LineString(new[] + { + new Coordinate(0, 0), + new Coordinate(100, 0) + })); mapControl.Map.Layers.Add(vectorLayer); @@ -61,11 +68,16 @@ vectorLayer.DataSource = layerData; layerData.FeatureType = typeof(CloneableFeature); - layerData.Add(new LineString(new[] { new Coordinate(0, 0), new Coordinate(50, 0), new Coordinate(100, 0) })); + layerData.Add(new LineString(new[] + { + new Coordinate(0, 0), + new Coordinate(50, 0), + new Coordinate(100, 0) + })); mapControl.Map.Layers.Add(vectorLayer); - var firstFeature = (IFeature)layerData.Features[0]; + var firstFeature = (IFeature) layerData.Features[0]; mapControl.SelectTool.Select(firstFeature); var curveTool = mapControl.GetToolByType(); @@ -91,18 +103,18 @@ layerData.FeatureType = typeof(CloneableFeature); layerData.Add(new Polygon(new LinearRing( - new[] - { - new Coordinate(0, 0), - new Coordinate(100, 0), - new Coordinate(100, 100), - new Coordinate(0, 100), - new Coordinate(0, 0), - }))); + new[] + { + new Coordinate(0, 0), + new Coordinate(100, 0), + new Coordinate(100, 100), + new Coordinate(0, 100), + new Coordinate(0, 0), + }))); mapControl.Map.Layers.Add(vectorLayer); - var firstFeature = (IFeature)layerData.Features[0]; + var firstFeature = (IFeature) layerData.Features[0]; mapControl.SelectTool.Select(firstFeature); var curveTool = mapControl.GetToolByType(); @@ -128,18 +140,18 @@ layerData.FeatureType = typeof(CloneableFeature); layerData.Add(new Polygon(new LinearRing( - new[] - { - new Coordinate(0, 0), - new Coordinate(100, 0), - new Coordinate(100, 100), - new Coordinate(0, 100), - new Coordinate(0, 0), - }))); + new[] + { + new Coordinate(0, 0), + new Coordinate(100, 0), + new Coordinate(100, 100), + new Coordinate(0, 100), + new Coordinate(0, 0), + }))); mapControl.Map.Layers.Add(vectorLayer); - var firstFeature = (IFeature)layerData.Features[0]; + var firstFeature = (IFeature) layerData.Features[0]; mapControl.SelectTool.Select(firstFeature); var curveTool = mapControl.GetToolByType(); @@ -149,7 +161,7 @@ var args = new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0); curveTool.OnMouseMove(new Coordinate(100, 0), new MouseEventArgs(MouseButtons.None, 1, 0, 0, 0)); curveTool.OnMouseDown(new Coordinate(100, 0), args); // delete tracker - + Assert.AreEqual(4, firstFeature.Geometry.Coordinates.Length); Assert.AreEqual(100.0, firstFeature.Geometry.Coordinates[1].X); Assert.AreEqual(100.0, firstFeature.Geometry.Coordinates[1].Y); @@ -166,18 +178,18 @@ layerData.FeatureType = typeof(CloneableFeature); layerData.Add(new Polygon(new LinearRing( - new[] - { - new Coordinate(0, 0), - new Coordinate(100, 0), - new Coordinate(100, 100), - new Coordinate(0, 100), - new Coordinate(0, 0), - }))); + new[] + { + new Coordinate(0, 0), + new Coordinate(100, 0), + new Coordinate(100, 100), + new Coordinate(0, 100), + new Coordinate(0, 0), + }))); mapControl.Map.Layers.Add(vectorLayer); - var firstFeature = (IFeature)layerData.Features[0]; + var firstFeature = (IFeature) layerData.Features[0]; mapControl.SelectTool.Select(firstFeature); var curveTool = mapControl.GetToolByType(); @@ -187,7 +199,7 @@ var args = new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0); curveTool.OnMouseMove(new Coordinate(0, 0), new MouseEventArgs(MouseButtons.None, 1, 0, 0, 0)); curveTool.OnMouseDown(new Coordinate(0, 0), args); // delete tracker - + Assert.AreEqual(4, firstFeature.Geometry.Coordinates.Length); Assert.AreEqual(100.0, firstFeature.Geometry.Coordinates[1].X); Assert.AreEqual(100.0, firstFeature.Geometry.Coordinates[1].Y);