Ejemplo n.º 1
0
        public void TestSTGeometryType()
        {
            const string Wkt = "LINESTRING(77.29 29.07,77.42 29.26,77.27 29.31,77.29 29.07)";

            using (var db = new PostGisTestDataConnection(TestDatabaseConnectionString))
            {
                Assert.AreEqual(
                    "ST_LineString",
                    db.Select(() => GeometryInput.STGeomFromText(Wkt)
                              .STGeometryType()));

                Assert.AreEqual(
                    "ST_LineString",
                    db.Select(() => GeometryAccessors.STGeometryType(Wkt)));

                Assert.IsNull(db.Select(() => GeometryAccessors.STGeometryType((NTSG)null)));
            }
        }