public void DmsCoordinate_CorrectlyParsesFormatString(string format, string expected, double degrees, double minutes, double seconds, Hemisphere hemisphere)
        {
            var sut = new DmsCoordinate
            {
                Degrees    = degrees,
                Minutes    = minutes,
                Seconds    = seconds,
                Hemisphere = hemisphere
            };

            var result = sut.ToString(format);

            Assert.Equal(expected, result);
        }
        public void DmsCoordinate_CorrectlyParsesDefaultFormatString()
        {
            const string expected = "09° 02' 39\"S";

            var sut = new DmsCoordinate
            {
                Degrees    = 9.0,
                Minutes    = 2.0,
                Seconds    = 38.94503637783,
                Hemisphere = Hemisphere.South
            };

            var result = sut.ToString();

            Assert.Equal(expected, result);
        }
        public void Latitude_CanConvertToDms(double angle, double degrees, double minutes, double seconds)
        {
            var expectedHemisphere = angle >= 0 ? Hemisphere.North : Hemisphere.South;
            var expected           = new DmsCoordinate()
            {
                Degrees    = degrees,
                Minutes    = minutes,
                Seconds    = seconds,
                Hemisphere = expectedHemisphere
            };

            var sut    = new Latitude(angle);
            var result = sut.DmsCoordinate;

            Assert.Equal(expected, result);
        }