public void MultiPolygon_IsCoordinateValid_Should_Fail_When_Point(string typeName)
        {
            // arrange
            INamedInputType type   = CreateInputType(typeName);
            var             coords = new ListValueNode(
                new IntValueNode(30),
                new IntValueNode(10));
            var typeField  = new ObjectFieldNode(WellKnownFields.TypeFieldName, _geometryType);
            var coordField = new ObjectFieldNode(WellKnownFields.CoordinatesFieldName, coords);
            var valueNode  = new ObjectValueNode(typeField, coordField);

            // act
            // assert
            Assert.Throws <SerializationException>(() => type.ParseLiteral(valueNode));
        }
Example #2
0
        public void ParseLiteral_Should_Pass_When_NoCrs(string typeName)
        {
            // arrange
            INamedInputType type       = CreateInputType(typeName);
            var             typeField  = new ObjectFieldNode(WellKnownFields.TypeFieldName, _geometryType);
            var             coordField = new ObjectFieldNode(
                WellKnownFields.CoordinatesFieldName,
                _coordinatesSyntaxNode);
            var valueNode = new ObjectValueNode(typeField, coordField);

            // act
            object?parsedResult = type.ParseLiteral(valueNode);

            // assert
            AssertGeometry(parsedResult);
        }