private void TestRoundTrip(string expected, GeoJsonCoordinateReferenceSystem crs) { var json = crs.ToJson(); Assert.AreEqual(expected, json); var rehydrated = BsonSerializer.Deserialize<GeoJsonCoordinateReferenceSystem>(json); Assert.AreEqual(expected, rehydrated.ToJson()); }
// constructor /// <summary> /// Initializes a new instance of the <see cref="GeoJsonObject{TCoordinates}"/> class. /// </summary> /// <param name="args">The additional args.</param> protected GeoJsonObject(GeoJsonObjectArgs <TCoordinates> args) { if (args != null) { _boundingBox = args.BoundingBox; _coordinateReferenceSystem = args.CoordinateReferenceSystem; _extraMembers = args.ExtraMembers; } }