public void SimplePolylineDeserializesCorreclty() { var command = new ExtractGeometryCommand("polyline:[[1, 2],[2,3]]"); command.Run(); var result = command.Result; Assert.That(result, Is.Not.Null); Assert.That(result.Type, Is.EqualTo("POLYLINE")); Assert.That(result.Coordinates, Is.EquivalentTo(new[,] {{1d, 2d}, {2, 3}})); }
public void SimpleCoordinatesDeserializesCorrectly() { var command = new ExtractGeometryCommand("point:[1, 2]"); command.Run(); var result = command.Result; Assert.That(result, Is.Not.Null); Assert.That(result.Type, Is.EqualTo("POINT")); Assert.That(result.Coordinates.Single(), Is.EquivalentTo(new[] {1d, 2d})); }
public void FractionalCoordinatesDeserializesCorrectly() { var command = new ExtractGeometryCommand("point:[1.1231236, 2.321561]"); command.Run(); var result = command.Result; Assert.That(result, Is.Not.Null); Assert.That(result.Type, Is.EqualTo("POINT")); Assert.That(result.Coordinates.Single(), Is.EquivalentTo(new[] {1.1231236, 2.321561})); }
public void SimpleCoordinatesDeserializesCorrectly() { var command = new ExtractGeometryCommand("point:[1, 2]", wkid: 26912); command.Run(); var result = command.Result; Assert.That(result, Is.Not.Null); Assert.That(result.Type, Is.EqualTo("POINT")); Assert.That(result.Coordinates.Single(), Is.EquivalentTo(new[] { 1d, 2d })); }
public void SimplePolylineDeserializesCorreclty() { var command = new ExtractGeometryCommand("polyline:[[1, 2],[2,3]]", wkid: 26912); command.Run(); var result = command.Result; Assert.That(result, Is.Not.Null); Assert.That(result.Type, Is.EqualTo("POLYLINE")); Assert.That(result.Coordinates, Is.EquivalentTo(new[, ] { { 1d, 2d }, { 2, 3 } })); }
public void PolygonThrowsErrorUnlessThereAreThreeOrMorePoints() { var command = new ExtractGeometryCommand("polygon:[1, 2]", wkid: 26912); Assert.Throws <ArgumentException>(() => command.Run()); }
public void PolygonThrowsErrorUnlessThereAreThreeOrMorePoints() { var command = new ExtractGeometryCommand("polygon:[1, 2]"); command.Run(); }
public void LineThrowsErrorUnlessThereAreTwoOrMorePoints() { var command = new ExtractGeometryCommand("polyline:[1]"); command.Run(); }