public void ParseLiteral_With_Invalid_Coordinates_Throws()
        {
            var type       = new GeoJSONPositionScalar();
            var coordinate = new StringValueNode("2.2");

            Assert.Throws <ScalarSerializationException>(() => type.ParseLiteral(coordinate));
        }
        public void ParseLiteral_Null_Throws()
        {
            var        type       = new GeoJSONPositionScalar();
            IValueNode coordinate = null;

            Assert.Throws <ArgumentNullException>(() => type.ParseLiteral(coordinate));
        }
        public void ParseLiteral_NullType_Null()
        {
            var type       = new GeoJSONPositionScalar();
            var coordinate = NullValueNode.Default;

            object result = type.ParseLiteral(coordinate);

            Assert.Null(result);
        }
        public void ParseLiteral_With_2Valid_Coordinates()
        {
            var type       = new GeoJSONPositionScalar();
            var coordinate = new ListValueNode(
                new FloatValueNode(1.0),
                new IntValueNode(2)
                );

            var result = type.ParseLiteral(coordinate);

            Assert.Equal(1.0, Assert.IsType <Coordinate>(result).X);
            Assert.Equal(2, Assert.IsType <Coordinate>(result).Y);
        }