Exemplo n.º 1
0
        public void Can_Set_Place_Geography()
        {
            // Arrange
            var place = new Place
            {
                PlaceGeography =
                    SqlGeography.STGeomFromText(new SqlChars("POINT(10 10)"), 4326)
            };

            // Assert
            Assert.AreNotEqual(null, place.PlaceGeography);
            Assert.AreNotEqual(null, place.PlaceBin);
        }
Exemplo n.º 2
0
        public void Can_Get_Place_Geography()
        {
            // Arrange
            var place = new Place
                {
                    PlaceGeography =
                        SqlGeography.STGeomFromText(new SqlChars("POINT(10 10)"), 4326)
                };

            var anotherPlace = new Place
                { PlaceBin = SqlGeography.STPointFromText(place.PlaceGeography.STAsText(), 4326).STAsBinary().Buffer };

            // Assert
            Assert.AreNotEqual(null, place.PlaceGeography);
            Assert.AreNotEqual(null, anotherPlace.PlaceGeography);
        }