Beispiel #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldBeAbleToParseIncompletePointWithHeaderInformation()
        internal virtual void ShouldBeAbleToParseIncompletePointWithHeaderInformation()
        {
            string headerInformation = "{latitude: 40.7128}";
            string data = "{longitude: -74.0060, height: 567.8, crs:wgs-84-3D}";

            assertThrows(typeof(InvalidValuesArgumentException), () => PointValue.Parse(data));

            // this should work
            PointValue.Parse(data, PointValue.ParseHeaderInformation(headerInformation));
        }
Beispiel #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldBeAbleToParsePointThatOverridesHeaderInformation()
        internal virtual void ShouldBeAbleToParsePointThatOverridesHeaderInformation()
        {
            string headerInformation = "{crs:wgs-84}";
            string data = "{latitude: 40.7128, longitude: -74.0060, height: 567.8, crs:wgs-84-3D}";

            PointValue expected = PointValue.Parse(data);
            PointValue actual   = PointValue.Parse(data, PointValue.ParseHeaderInformation(headerInformation));

            assertEqual(expected, actual);
            assertEquals("wgs-84-3d", actual.CoordinateReferenceSystem.Name.ToLower());
        }