public void GeographyMarkupConverterToGeometryFromXElementTest()
 {
     for (Int32 index = 0; index < this.geometries.Length; index++)
     {
         IGeometry geometry = GeographyMarkupConverter.ToGeometry(XElement.Parse(this.geometriesMarkup[index]), this.factory);
         this.geometryComparer.Compare(geometry, this.geometries[index]).ShouldBe(0);
     }
 }
 public void GeographyMarkupConverterToMarkupWithReferenceTest()
 {
     for (Int32 index = 0; index < this.geometries.Length; index++)
     {
         String actual = GeographyMarkupConverter.ToMarkup(this.geometriesWithReference[index]);
         actual.ShouldBe(this.geometriesMarkupWithReference[index]);
     }
 }
 public void GeographyMarkupConverterToMarkupWithIdentifierTest()
 {
     for (Int32 index = 0; index < this.geometries.Length; index++)
     {
         String actual = GeographyMarkupConverter.ToMarkup(this.geometries[index], this.identifier);
         actual.ShouldBe(this.geometriesMarkupWithIdentifier[index]);
     }
 }
 public void GeographyMarkupConverterToGeometryWithReferenceSystemTest()
 {
     for (Int32 index = 0; index < this.geometries.Length; index++)
     {
         IGeometry geometry = GeographyMarkupConverter.ToGeometry(XElement.Parse(this.geometriesMarkupWithReference[index]), this.factory, this.mockReferenceSystemFactory.Object);
         this.geometryComparer.Compare(geometry, this.geometries[index]).ShouldBe(0);
         geometry.ReferenceSystem.ShouldBe(this.mockReferenceSystem.Object);
     }
 }
Exemple #5
0
        public void GeometryConverterStringTest()
        {
            foreach (IGeometry geometry in _geometries)
            {
                String    gml       = GeographyMarkupConverter.ToGeographyMarkupInString(geometry);
                IGeometry converted = GeographyMarkupConverter.ToGeometry(gml, _factory);

                Assert.AreEqual(0, new GeometryComparer().Compare(geometry, converted));
            }
        }
        public void GeographyMarkupConverterToMarkupElementWithIdentifierTest()
        {
            for (Int32 index = 0; index < this.geometries.Length; index++)
            {
                XElement element = GeographyMarkupConverter.ToMarkupElement(this.geometries[index], this.identifier);
                element.Add(new XAttribute(XNamespace.Xmlns + "gml", "http://www.opengis.net/gml/"));
                String elementString = element.ToString(SaveOptions.DisableFormatting);

                elementString.ShouldBe(this.geometriesMarkupWithIdentifier[index]);
            }
        }