Beispiel #1
0
        public void MultiLineStringAsExtendedWellKnownBinaryCanBeWrittenAndRead()
        {
            var sut = _fixture.Create <MultiLineString>();

            var writer = new WellKnownBinaryWriter();

            var extendedWellKnownBinary = writer.Write(sut);

            var reader = new WellKnownBinaryReader();

            var result = reader.Read(extendedWellKnownBinary);

            Assert.NotNull(result);
            Assert.Equal(sut, Assert.IsType <MultiLineString>(result));
            Assert.Equal(sut.SRID, ((MultiLineString)result).SRID);
        }
Beispiel #2
0
        public void PointAsExtendedWellKnownBinaryCanBeWrittenAndRead()
        {
            var sut = _fixture.Create <Point>();

            var writer = new WellKnownBinaryWriter();

            var extendedWellKnownBinary = writer.Write(sut);

            var reader = new WellKnownBinaryReader();

            var result = reader.Read(extendedWellKnownBinary);

            Assert.NotNull(result);
            Assert.Equal(sut, Assert.IsType <Point>(result));
            Assert.Equal(sut.SRID, ((Point)result).SRID);
            Assert.Equal(sut.M, ((Point)result).M);
        }