Example #1
0
        public void TestWGS84PolarGeoToGridref()
        {
            StringBuilder sb = new StringBuilder();

            foreach (GeoTestDataSet item in testData)
            {
                GridReference converted = PolarGeoCoordinate.ChangeToGridReference(item.WGS84);

                if (!item.NE.IsTheSameAs(converted, true))
                {
                    sb.AppendLine(item.City);
                }
            }

            if (sb.Length > 0)
            {
                sb.AppendLine("failed out of" + testData.Count.ToString());
                Assert.Fail(sb.ToString());
            }
        }
Example #2
0
        public void TestOSGB36PolarGeoToGridref()
        {
            var sb = new StringBuilder();

            foreach (GeoTestDataSet item in TestData)
            {
                GridReference converted = PolarGeoCoordinate.ChangeToGridReference(item.OSGB36);

                if (!item.NE.IsTheSameAs(converted, true))
                {
                    sb.AppendLine(item.City);
                }
            }

            if (sb.Length > 0)
            {
                sb.AppendLine("failed out of" + TestData.Count.ToString(CultureInfo.InvariantCulture));
                Assert.Fail(sb.ToString());
            }
        }