public void TrySerialize_With_Invalid_Object() { var type = new GeoJSONPositionScalar(); var input = "not a coordinate"; var result = type.TrySerialize(input, out var value); Assert.False(result); Assert.Null(value); }
public void TrySerialize_With_Nan_3dCoordinate() { var type = new GeoJSONPositionScalar(); var input = new CoordinateZ(1, 2, double.NaN); var result = type.TrySerialize(input, out var value); Assert.True(result); Assert.Equal(2, Assert.IsType <double[]>(value).Length); Assert.Equal(new [] { 1D, 2D }, Assert.IsType <double[]>(value)); }