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"))); }
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)); }
public void GeoPoint_IsAbleToProduceLocalizedOutput() { GeoPoint geoPoint = GeoPoint.Parse(-33.855270, 151.209725); Assert.AreEqual("-33,85527, 151,209725", geoPoint.AsDd(CultureInfo.GetCultureInfo("de"))); }
public void GeoPoint_HasMaximumPrecisionOf6DecimalPlaces_GivenAnyInput() { GeoPoint geoPoint = GeoPoint.Parse(46.414167123, 6.927500123); Assert.AreEqual("46.414167, 6.9275", geoPoint.AsDd()); }
public void Parse_TruncatesTrailingZeros() { GeoPoint geoPoint = GeoPoint.Parse(46.41400, 6.927500); Assert.AreEqual("46.414, 6.9275", geoPoint.AsDd()); }
public void Parse_DoesNotAlter_GivenInput() { GeoPoint geoPoint = GeoPoint.Parse(46.414167, 6.927500); Assert.AreEqual("46.414167, 6.9275", geoPoint.AsDd()); }