コード例 #1
0
        public void VerifyGmlContent(XElement property)
        {
            XElement point = property.Element(UnitTestsUtil.GmlNamespace + "Point");

            Assert.IsNotNull(point, "Payload does not contain the GML point element.");
            XElement pos = point.Element(UnitTestsUtil.GmlNamespace + "pos");

            Assert.IsNotNull(pos, "Payload does not contain the GML pos element");
            Assert.AreEqual(SpatialTestUtil.ToPointString(this), pos.Value, "Incorrect GML Content");
        }
コード例 #2
0
        public void VerifyGmlContent(XElement property)
        {
            XElement linestring = property.Element(UnitTestsUtil.GmlNamespace + "LineString");

            Assert.IsNotNull(linestring, "Payload does not contain the GML line element.");

            var pos = linestring.Elements(UnitTestsUtil.GmlNamespace + "pos");

            Assert.IsNotNull(pos, "Payload does not contain the GML pos element");
            Assert.AreEqual(this.Points.Count(), pos.Count(), "Number of pos elements does not equal to number of points in the linestring");

            string pointString = pos.Select(p => p.Value).Concatenate(" ");

            Assert.AreEqual(SpatialTestUtil.ToPointString(this.Points), pointString, "Incorrect GML Content");
        }
コード例 #3
0
 public string AsGml()
 {
     return(SpatialTestUtil.ToPointString(this.Points));
 }