private static bool TryReadRoute(RavenJObject geo, LineString lineString, out object result) { var route = new Route(); route.Coordinates.AddRange(lineString.Coordinates); ReadMetadata(geo, route.Metadata); result = route; return true; }
public void Route() { Func<Route> geometry = () => { var route = new Route(); route.Metadata.Attribute(x => x.Name, "test"); route.Coordinates.Add(new Coordinate(56.543, 32.657)); route.Coordinates.Add(new Coordinate(23.463, 23.343)); return route; }; Assertion(geometry, route => route.ToLineString()); Assertion(geometry, route => route.Coordinates.First()); Assertion(geometry, route => route.Coordinates.Last()); Assertion(geometry, route => route.Metadata.Attribute(x => x.Name)); }