public void GeographicCoordinate_CorrectlyParsesDefaultFormatStringWithFormat(string format, string expected) { ISphericalCoordinate latitude = new Latitude(-37.6885966980243); ISphericalCoordinate longitude = new Longitude(144.999637777534); IDistance elevation = new Distance(118.663, DistanceMeasurement.Meters); IGeographicCoordinate sut = new GeographicCoordinate(latitude, longitude, elevation); var result = sut.ToString(format, CultureInfo.InvariantCulture); Assert.Equal(expected, result); }
public void GeographicCoordinate_CorrectlyParsesDefaultFormatStringNoFormat() { const string expected = "37° 41' 19\"S 144° 59' 59\"E"; ISphericalCoordinate latitude = new Latitude(-37.6885966980243); ISphericalCoordinate longitude = new Longitude(144.999637777534); IGeographicCoordinate sut = new GeographicCoordinate(latitude, longitude); var result = sut.ToString(null, null); Assert.Equal(expected, result); }