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); }
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); }