Esempio n. 1
0
        public void GEOMETRY_Data_ScriptsCorrectly()
        {
            SqlGeometry baseData = SqlGeometry.STGeomFromText(new SqlChars("LINESTRING (100 100, 20 180, 180 180)"), 0);
            object      data     = baseData;

            var fieldInfo = SchemaScriptingTests.FakeColumn("test", "test", 64, "sys.junk.geometry", false, 0, 0);

            Assert.AreEqual("geometry::STGeomFromText('LINESTRING (100 100, 20 180, 180 180)',0)", FieldScripting.valueAsTSQLLiteral(data, fieldInfo), "geometry");
            Assert.AreEqual("LINESTRING (100 100, 20 180, 180 180) 0", FieldScripting.formatGeometry(data, false), "geometry");
        }