         let expectedSet = JulianDay(year: 1988, month: 03, day: 20, hour: 2, minute: 55)
         AssertEqual(details.setTime!, expectedSet, accuracy: accuracy)
     }
-
+    
     func testVenusAtBoston2017() { // See http://aa.usno.navy.mil/data/docs/mrst.php
         let sexagesimalLongitude = boston.longitude.inHours.sexagesimal
         let venus = Venus(julianDay: JulianDay(year: 2017, month: 3, day: 20, hour: 0 + sexagesimalLongitude.radical, minute: sexagesimalLongitude.minute, second: sexagesimalLongitude.second))

        let expectedSet = JulianDay(year: 2016, month: 12, day: 27, hour: 13, minute: 1, second: 6)
        AssertEqual(details.setTime!, expectedSet, accuracy: accuracy)
    }

// Not sure we can trust data from SkySafari
//    func testMoonAtMoscow2016() { // Data from SkySafari
//        let moon = Moon(julianDay: JulianDay(year: 2016, month: 12, day: 27, hour: 23, minute: 10, second: 14))
//        let details = RiseTransitSetTimes(celestialBody: moon, geographicCoordinates: moscow)
//        let accuracy = Minute(10.0).inJulianDays
//        let expectedRise = JulianDay(year: 2016, month: 12, day: 27, hour: 3, minute: 38, second: 32)+1
//        AssertEqual(details.riseTime!, expectedRise, accuracy: accuracy)
//        let expectedTransit = JulianDay(year: 2016, month: 12, day: 27, hour: 7, minute: 57, second: 43)+1
//        AssertEqual(details.transitTime!, expectedTransit, accuracy: accuracy)
//        let expectedSet = JulianDay(year: 2016, month: 12, day: 27, hour: 12, minute: 12, second: 46)+1
//        AssertEqual(details.setTime!, expectedSet, accuracy: accuracy)
//    }
    
    // See https://github.com/onekiloparsec/SwiftAA/issues/95 for the problem
    // See https://github.com/codebox/star-rise-and-set-times/blob/master/test/spec/calc-spec.js for the test

        XCTAssertNotNil(results2.riseTime)
        XCTAssertNotNil(results2.transitTime)
        XCTAssertNotNil(results2.setTime)

        XCTAssertNil(results2.transitError)

        //        AssertEqual(results1.riseTime!.date.fractionalHour, Double(22.151388), accuracy: Double(0.001), "")
    }
    
    func testPolarisTtransitErrorAlwaysAbove() {
        let coords = EquatorialCoordinates(rightAscension: Hour(.plus, 2, 31, 47.08), declination: Degree(.plus, 89, 15, 50.9))
        let polaris = AstronomicalObject(name: "Polaris", coordinates: coords, julianDay: JulianDay(year: 2020, month: 9, day: 6))
        let us_coords = GeographicCoordinates(positivelyWestwardLongitude: Degree(.plus, 7, 46, 42), latitude: Degree(.plus, 49, 9, 3), altitude: 210)
        let results = polaris.riseTransitSetTimes(for: us_coords)
        XCTAssertEqual(results.transitError!, CelestialBodyTransitError.alwaysAboveAltitude)
    }
    
    func testPolarisTtransitErrorAlwaysBelow() {
        let coords = EquatorialCoordinates(rightAscension: Hour(.plus, 2, 31, 47.08), declination: Degree(.plus, 89, 15, 50.9))
        let polaris = AstronomicalObject(name: "Polaris", coordinates: coords, julianDay: JulianDay(year: 2020, month: 9, day: 6))
        let paranal = GeographicCoordinates(positivelyWestwardLongitude: Degree(24.627222),latitude: Degree(-70.404167), altitude: 2400)
        let results = polaris.riseTransitSetTimes(for: paranal)
        XCTAssertEqual(results.transitError!, CelestialBodyTransitError.alwaysBelowAltitude)
    }

}


