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 AsDms_IsAbleToProduceCorrectOutput_GivenParameterizedAs() { GeoPoint geoPoint = GeoPoint.Parse(46.414167, 6.927500); Assert.AreEqual(geoPoint.AsDms(), geoPoint.As(GeoPointFormat.DMS)); Assert.AreEqual(geoPoint.As(GeoPointFormat.DMS), geoPoint.As(GeoPointFormat.DegreesMinutesSeconds)); }
public void AsDms_IsAbleToProduceCorrectOutput_GivenParameterizedAsAndLocalization() { GeoPoint geoPoint = GeoPoint.Parse(46.414167, 6.927500); Assert.AreEqual(geoPoint.AsDms(CultureInfo.GetCultureInfo("de")), geoPoint.As(GeoPointFormat.DegreesMinutesSeconds, CultureInfo.GetCultureInfo("de"))); }