예제 #1
0
        public void Test_Encode_LineString()
        {
            var multiPoint = new LineString(new List <Position>()
            {
                new Position(38.5, -120.2),
                new Position(40.7, -120.95),
                new Position(43.252, -126.453),
            });

            var encoder = new PolyLineEncoder();

            Assert.Equal("_p~iF~ps|U_ulLnnqC_mqNvxq`@", encoder.Encode(multiPoint));
        }
예제 #2
0
        public void Test_Encode_Position()
        {
            var encoder = new PolyLineEncoder();

            Assert.Equal("_p~iF~ps|U", encoder.Encode(new Position(38.5, -120.2)));
        }
예제 #3
0
        public void Test_Encode_LineString_Error()
        {
            var encoder = new PolyLineEncoder();

            Assert.Throws <ArgumentNullException>(() => encoder.Encode((LineString)null));
        }