Esempio n. 1
0
        public void GEOGRAPHY_Data_ScriptsCorrectly()
        {
            SqlGeography baseData = SqlGeography.STGeomFromText(new SqlChars("LINESTRING(-122.360 47.656, -122.343 47.656 )"), 4326);
            object       data     = baseData;

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

            Assert.AreEqual("geography::STGeomFromText('LINESTRING (-122.36 47.656, -122.343 47.656)',4326)", FieldScripting.valueAsTSQLLiteral(data, fieldInfo), "geography");
            Assert.AreEqual("LINESTRING (-122.36 47.656, -122.343 47.656) 4326", FieldScripting.formatGeography(data, false), "geography");
        }