Beispiel #1
0
        public void As_IsAbleToProduceCorrectOutput_GivenParameterAndLocalization()
        {
            GeoPoint geoPoint = GeoPoint.Parse(-14.170074, -141.236336);

            Assert.AreEqual(geoPoint.As(GeoPointFormat.DD), geoPoint.AsDd());
            Assert.AreEqual("-14,170074, -141,236336", geoPoint.As(GeoPointFormat.DecimalDegrees, CultureInfo.GetCultureInfo("de")));
        }
Beispiel #2
0
        public void As_IsAbleToProduceCorrectOutput_GivenParameter()
        {
            GeoPoint geoPoint = GeoPoint.Parse(46.414167, 6.927500);

            Assert.AreEqual(geoPoint.As(GeoPointFormat.DD), geoPoint.AsDd());
            Assert.AreEqual(geoPoint.As(GeoPointFormat.DD), geoPoint.As(GeoPointFormat.DecimalDegrees));
        }
Beispiel #3
0
        public void GeoPoint_IsAbleToProduceLocalizedOutput()
        {
            GeoPoint geoPoint = GeoPoint.Parse(-33.855270, 151.209725);

            Assert.AreEqual("-33,85527, 151,209725", geoPoint.AsDd(CultureInfo.GetCultureInfo("de")));
        }
Beispiel #4
0
        public void GeoPoint_HasMaximumPrecisionOf6DecimalPlaces_GivenAnyInput()
        {
            GeoPoint geoPoint = GeoPoint.Parse(46.414167123, 6.927500123);

            Assert.AreEqual("46.414167, 6.9275", geoPoint.AsDd());
        }
Beispiel #5
0
        public void Parse_TruncatesTrailingZeros()
        {
            GeoPoint geoPoint = GeoPoint.Parse(46.41400, 6.927500);

            Assert.AreEqual("46.414, 6.9275", geoPoint.AsDd());
        }
Beispiel #6
0
        public void Parse_DoesNotAlter_GivenInput()
        {
            GeoPoint geoPoint = GeoPoint.Parse(46.414167, 6.927500);

            Assert.AreEqual("46.414167, 6.9275", geoPoint.AsDd());
        }