private void Local_Time_Checker(Celestial cCel, Celestial lCel, Celestial sCel, Celestial bCel, double offset) { //LUNAR (PORT TO LUNAR) Time_Compare(cCel.MoonRise, lCel.MoonRise, sCel.MoonRise, offset); Time_Compare(cCel.MoonSet, lCel.MoonSet, sCel.MoonSet, offset); Time_Compare(cCel.LunarEclipse.LastEclipse.MidEclipse, lCel.LunarEclipse.LastEclipse.MidEclipse, sCel.LunarEclipse.LastEclipse.MidEclipse, offset); Time_Compare(cCel.LunarEclipse.NextEclipse.MidEclipse, lCel.LunarEclipse.NextEclipse.MidEclipse, sCel.LunarEclipse.NextEclipse.MidEclipse, offset); Time_Compare(cCel.Perigee.LastPerigee.Date, lCel.Perigee.LastPerigee.Date, sCel.Perigee.LastPerigee.Date, offset); Time_Compare(cCel.Perigee.NextPerigee.Date, lCel.Perigee.NextPerigee.Date, sCel.Perigee.NextPerigee.Date, offset); Time_Compare(cCel.Apogee.LastApogee.Date, lCel.Apogee.LastApogee.Date, sCel.Apogee.LastApogee.Date, offset); Time_Compare(cCel.Apogee.NextApogee.Date, lCel.Apogee.NextApogee.Date, sCel.Apogee.NextApogee.Date, offset); Assert.AreEqual(lCel.MoonAltitude, bCel.MoonAltitude, .00001); Assert.AreEqual(lCel.MoonAzimuth, bCel.MoonAzimuth, .00001); Assert.AreEqual(lCel.Perigee.LastPerigee.Distance.Meters, bCel.Perigee.LastPerigee.Distance.Meters, .00001); Assert.AreEqual(lCel.Perigee.NextPerigee.Distance.Meters, bCel.Perigee.NextPerigee.Distance.Meters, .00001); Assert.AreEqual(lCel.Apogee.LastApogee.Distance.Meters, bCel.Apogee.LastApogee.Distance.Meters, .00001); Assert.AreEqual(lCel.Apogee.NextApogee.Distance.Meters, bCel.Apogee.NextApogee.Distance.Meters, .00001); Assert.AreEqual(lCel.Apogee.LastApogee.HorizontalParallax, bCel.Apogee.LastApogee.HorizontalParallax, .00001); Assert.AreEqual(lCel.Apogee.NextApogee.HorizontalParallax, bCel.Apogee.NextApogee.HorizontalParallax, .00001); Assert.AreEqual(lCel.MoonDistance.Meters, bCel.MoonDistance.Meters, .2); Assert.AreEqual(lCel.MoonIllum.Angle, bCel.MoonIllum.Angle, .00001); Assert.AreEqual(lCel.MoonIllum.Fraction, bCel.MoonIllum.Fraction, .00001); Assert.AreEqual(lCel.MoonIllum.Phase, bCel.MoonIllum.Phase, .00001); //if (lCel.MoonIllum.PhaseName != bCel.MoonIllum.PhaseName) { return false; } Test omitted as time's can changes phases between days. Documentation reflects. Issues will be captured at Phase. Assert.AreEqual(lCel.IsMoonUp, bCel.IsMoonUp); Assert.AreEqual(lCel.MoonCondition, bCel.MoonCondition); }
public void Time_at_Altitude_Tests() { //Expected values based off suncalc data Coordinate c = new Coordinate(47.40615, -122.24517, new DateTime(2020, 8, 11, 11, 29, 0)); c.Offset = -7; var t = Celestial.Get_Time_at_Solar_Altitude(c, 50.94); var ts = c.GeoDate - t.Rising; Assert.AreEqual(0, Math.Abs(ts.Value.TotalSeconds), 60, $"Time: {t.Rising}"); Assert.AreEqual(CelestialStatus.RiseAndSet, t.Condition); t = Celestial.Get_Time_at_Solar_Altitude(c.Latitude.ToDouble(), c.Longitude.ToDouble(), c.GeoDate.AddHours(7), 50.94); ts = c.GeoDate.AddHours(7) - t.Rising; Assert.AreEqual(0, Math.Abs(ts.Value.TotalSeconds), 60, $"Time: {t.Rising}"); Assert.AreEqual(CelestialStatus.RiseAndSet, t.Condition); t = Celestial.Get_Time_at_Solar_Altitude(c.Latitude.ToDouble(), c.Longitude.ToDouble(), c.GeoDate, 50.94, c.Offset); ts = c.GeoDate - t.Rising; Assert.AreEqual(0, Math.Abs(ts.Value.TotalSeconds), 60, $"Time: {t.Rising}"); Assert.AreEqual(CelestialStatus.RiseAndSet, t.Condition); //Expected values based on NOAA data c.GeoDate = new DateTime(2020, 8, 11, 18, 02, 10); t = Celestial.Get_Time_at_Solar_Altitude(c, 23.09); ts = c.GeoDate - t.Setting; Assert.AreEqual(0, Math.Abs(ts.Value.TotalSeconds), 240, $"Time: {t.Setting}"); Assert.AreEqual(CelestialStatus.RiseAndSet, t.Condition); }
public void Lunar_Coordinate_Accuracy_Local_Time_Check() { var lcZ = Celestial.Get_Lunar_Coordinate(new DateTime(2020, 11, 19, 0, 0, 0)); var lcL = Celestial.Get_Lunar_Coordinate(new DateTime(2020, 11, 18, 13, 0, 0), -11); //Local float precision loss will occur Assert.AreEqual(lcZ.SublunarLatitude, lcL.SublunarLatitude, .0001, "Sublunar Latitude"); Assert.AreEqual(lcZ.SublunarLongitude, lcL.SublunarLongitude, .0001, "Sublunar Longitude"); Assert.AreEqual(lcZ.RightAscension, lcL.RightAscension, .00001, "Right Ascension"); }
public void Static_Checks() { DateTime d = new DateTime(2019, 2, 6); Coordinate c = new Coordinate(40.0352, -74.5844, d); DateTime val; //Method 1 UTC val = Celestial.Get_Next_MoonRise(c); Assert.AreEqual(val.ToString(), "2/6/2019 1:10:32 PM"); val = Celestial.Get_Last_MoonRise(c); Assert.AreEqual(val.ToString(), "2/5/2019 12:39:02 PM"); val = Celestial.Get_Next_MoonSet(c); Assert.AreEqual(val.ToString(), "2/7/2019 12:08:33 AM"); val = Celestial.Get_Last_MoonSet(c); Assert.AreEqual(val.ToString(), "2/5/2019 11:11:09 PM"); //Method 2 UTC val = Celestial.Get_Next_MoonRise(40.0352, -74.5844, d); Assert.AreEqual(val.ToString(), "2/6/2019 1:10:32 PM"); val = Celestial.Get_Last_MoonRise(40.0352, -74.5844, d); Assert.AreEqual(val.ToString(), "2/5/2019 12:39:02 PM"); val = Celestial.Get_Next_MoonSet(40.0352, -74.5844, d); Assert.AreEqual(val.ToString(), "2/7/2019 12:08:33 AM"); val = Celestial.Get_Last_MoonSet(40.0352, -74.5844, d); Assert.AreEqual(val.ToString(), "2/5/2019 11:11:09 PM"); //Method 3 LOCAL TIMES val = Celestial.Get_Next_MoonRise(40.0352, -74.5844, d, -4); Assert.AreEqual(val.ToString(), "2/6/2019 9:10:32 AM"); val = Celestial.Get_Last_MoonRise(40.0352, -74.5844, d, -4); Assert.AreEqual(val.ToString(), "2/5/2019 8:39:02 AM"); val = Celestial.Get_Next_MoonSet(40.0352, -74.5844, d, -4); Assert.AreEqual(val.ToString(), "2/6/2019 8:08:33 PM"); val = Celestial.Get_Last_MoonSet(40.0352, -74.5844, d, -4); Assert.AreEqual(val.ToString(), "2/5/2019 7:11:09 PM"); }
public void Static_Checks() { DateTime d = new DateTime(2019, 2, 6); Coordinate c = new Coordinate(40.0352, -74.5844, d); DateTime val; //Method 1 UTC val = Celestial.Get_Next_SunRise(c); Assert.AreEqual(val.ToString(), "2/6/2019 12:03:33 PM"); val = Celestial.Get_Last_SunRise(c); Assert.AreEqual(val.ToString(), "2/5/2019 12:04:35 PM"); val = Celestial.Get_Next_SunSet(c); Assert.AreEqual(val.ToString(), "2/6/2019 10:23:54 PM"); val = Celestial.Get_Last_SunSet(c); Assert.AreEqual(val.ToString(), "2/5/2019 10:22:41 PM"); //Method 2 UTC val = Celestial.Get_Next_SunRise(40.0352, -74.5844, d); Assert.AreEqual(val.ToString(), "2/6/2019 12:03:33 PM"); val = Celestial.Get_Last_SunRise(40.0352, -74.5844, d); Assert.AreEqual(val.ToString(), "2/5/2019 12:04:35 PM"); val = Celestial.Get_Next_SunSet(40.0352, -74.5844, d); Assert.AreEqual(val.ToString(), "2/6/2019 10:23:54 PM"); val = Celestial.Get_Last_SunSet(40.0352, -74.5844, d); Assert.AreEqual(val.ToString(), "2/5/2019 10:22:41 PM"); //Method 3 LOCAL TIMES val = Celestial.Get_Next_SunRise(40.0352, -74.5844, d, -4); Assert.AreEqual(val.ToString(), "2/6/2019 8:03:33 AM"); val = Celestial.Get_Last_SunRise(40.0352, -74.5844, d, -4); Assert.AreEqual(val.ToString(), "2/5/2019 8:04:35 AM"); val = Celestial.Get_Next_SunSet(40.0352, -74.5844, d, -4); Assert.AreEqual(val.ToString(), "2/6/2019 6:23:54 PM"); val = Celestial.Get_Last_SunSet(40.0352, -74.5844, d, -4); Assert.AreEqual(val.ToString(), "2/5/2019 6:22:41 PM"); }
public void Solar_Coordinate_Accuracy_Check() { var sc1 = Celestial.Get_Solar_Coordinate(new DateTime(2020, 11, 19, 0, 0, 0)); var sc2 = Celestial.Get_Solar_Coordinate(new DateTime(2020, 11, 19, 0, 26, 0)); var sc3 = Celestial.Get_Solar_Coordinate(new DateTime(2020, 11, 19, 12, 26, 0)); var sc4 = Celestial.Get_Solar_Coordinate(new DateTime(1992, 10, 13, 1, 0, 0)); var sc5 = Celestial.Get_Solar_Coordinate(new DateTime(2020, 9, 1, 11, 24, 0)); //Normalization subsolar check Assert.AreEqual(0.988293, sc1.RadiusVector, .000001, "Radius vector for sc1 exceeds delta."); Assert.AreEqual(237.122, sc1.Longitude, .8, "Longitude for sc1 exceeds delta."); Assert.AreEqual(0, sc1.Latitude, .001, "Latitude for sc1 exceeds delta."); Assert.AreEqual(234.835, sc1.RightAscension, .1, "Right Ascension for sc1 exceeds delta."); Assert.AreEqual(-19.514, sc1.Declination, .1, "Declination for sc1 exceeds delta."); Assert.AreEqual(238.491, sc1.GeometricMeanLongitude, .001, "Geometric Mean Longitude for sc1 exceeds delta."); Assert.AreEqual(-19.514, sc1.SubsolarLatitude, .01, "Subsolar Latitude for sc1 exceeds delta."); Assert.AreEqual(176.344, sc1.SubsolarLongitude, .03, "Subsolar Longitude for sc1 exceeds delta."); Assert.AreEqual(0.988289, sc2.RadiusVector, .000001, "Radius vector for sc2 exceeds delta."); Assert.AreEqual(237.141, sc2.Longitude, .8, "Longitude for sc2 exceeds delta."); Assert.AreEqual(0, sc2.Latitude, .001, "Latitude for sc2 exceeds delta."); Assert.AreEqual(234.854, sc2.RightAscension, .1, "Right Ascension for sc2 exceeds delta."); Assert.AreEqual(-19.518, sc2.Declination, .1, "Declination for sc2 exceeds delta."); Assert.AreEqual(238.509, sc2.GeometricMeanLongitude, .001, "Geometric Mean Longitude for sc2 exceeds delta."); Assert.AreEqual(-19.518, sc2.SubsolarLatitude, .01, "Subsolar Latitude for sc2 exceeds delta."); Assert.AreEqual(169.845, sc2.SubsolarLongitude, .03, "Subsolar Longitude for sc2 exceeds delta."); Assert.AreEqual(0.988186, sc3.RadiusVector, .000001, "Radius vector for sc3 exceeds delta."); Assert.AreEqual(237.141, sc3.Longitude, .8, "Longitude for sc3 exceeds delta."); Assert.AreEqual(0, sc3.Latitude, .001, "Latitude for sc3 exceeds delta."); Assert.AreEqual(235.376, sc3.RightAscension, .1, "Right Ascension for sc3 exceeds delta."); Assert.AreEqual(-19.632, sc3.Declination, .1, "Declination for sc3 exceeds delta."); Assert.AreEqual(239.002, sc3.GeometricMeanLongitude, .001, "Geometric Mean Longitude for sc3 exceeds delta."); Assert.AreEqual(-19.632, sc3.SubsolarLatitude, .01, "Subsolar Latitude for sc3 exceeds delta."); Assert.AreEqual(-10.126, sc3.SubsolarLongitude, .03, "Subsolar Longitude for sc3 exceeds delta."); Assert.AreEqual(0.997650, sc4.RadiusVector, .000001, "Radius vector for sc4 exceeds delta."); Assert.AreEqual(199.950, sc4.Longitude, .8, "Longitude for sc4 exceeds delta."); Assert.AreEqual(0, sc4.Latitude, .001, "Latitude for sc4 exceeds delta."); Assert.AreEqual(198.420, sc4.RightAscension, .1, "Right Ascension for sc4 exceeds delta."); Assert.AreEqual(-7.801, sc4.Declination, .1, "Declination for sc4 exceeds delta."); Assert.AreEqual(201.848, sc4.GeometricMeanLongitude, .001, "Geometric Mean Longitude for sc4 exceeds delta."); Assert.AreEqual(-7.801, sc4.SubsolarLatitude, .01, "Subsolar Latitude for sc4 exceeds delta."); Assert.AreEqual(161.572, sc4.SubsolarLongitude, .03, "Subsolar Longitude for sc4 exceeds delta."); Assert.AreEqual(8.016, sc5.SubsolarLatitude, .01, "Subsolar Latitude for sc5 exceeds delta."); Assert.AreEqual(8.966, sc5.SubsolarLongitude, .03, "Subsolar Longitude for sc5 exceeds delta."); }
public void Lunar_Coordinate_Accuracy_Check() { //https://www.timeanddate.com/worldclock/sunearth.html var lc1 = Celestial.Get_Lunar_Coordinate(new DateTime(2020, 11, 19, 0, 0, 0)); var lc2 = Celestial.Get_Lunar_Coordinate(new DateTime(2020, 11, 19, 0, 26, 0)); var lc3 = Celestial.Get_Lunar_Coordinate(new DateTime(2020, 11, 19, 12, 26, 0)); var lc4 = Celestial.Get_Lunar_Coordinate(new DateTime(1992, 10, 13, 1, 0, 0)); Assert.AreEqual(288.404, lc1.Longitude, .8, "Longitude for lc1 exceeds delta."); Assert.AreEqual(-2.490, lc1.Latitude, .1, "Latitude for lc1 exceeds delta."); Assert.AreEqual(290.305, lc1.RightAscension, .1, "Right Ascension for lc1 exceeds delta."); Assert.AreEqual(-24.639, lc1.Declination, .1, "Declination for lc1 exceeds delta."); Assert.AreEqual(281.280, lc1.GeometricMeanLongitude, .001, "Geometric Mean Longitude for lc1 exceeds delta."); Assert.AreEqual(-24.39, lc1.SublunarLatitude, .4, "Sublunar Latitude for lc1 exceeds delta."); Assert.AreEqual(-128.09, lc1.SublunarLongitude, .4, "Sublunar Longitude for lc1 exceeds delta."); Assert.AreEqual(288.653, lc2.Longitude, .8, "Longitude for lc2 exceeds delta."); Assert.AreEqual(-2.511, lc2.Latitude, .1, "Latitude for lc2 exceeds delta."); Assert.AreEqual(290.579, lc2.RightAscension, .1, "Right Ascension for lc2 exceeds delta."); Assert.AreEqual(-24.624, lc2.Declination, .1, "Declination for lc2 exceeds delta."); Assert.AreEqual(281.518, lc2.GeometricMeanLongitude, .001, "Geometric Mean Longitude for lc2 exceeds delta."); Assert.AreEqual(-24.38, lc2.SublunarLatitude, .4, "Sublunar Latitude for lc2 exceeds delta."); Assert.AreEqual(-134.24, lc2.SublunarLongitude, .4, "Sublunar Longitude for lc2 exceeds delta."); Assert.AreEqual(295.493, lc3.Longitude, .8, "Longitude for lc3 exceeds delta."); Assert.AreEqual(-3.043, lc3.Latitude, .1, "Latitude for lc3 exceeds delta."); Assert.AreEqual(298.072, lc3.RightAscension, .1, "Right Ascension for lc3 exceeds delta."); Assert.AreEqual(-24.030, lc3.Declination, .1, "Declination for lc3 exceeds delta."); Assert.AreEqual(288.106, lc3.GeometricMeanLongitude, .001, "Geometric Mean Longitude for lc3 exceeds delta."); Assert.AreEqual(-24.02, lc3.SublunarLatitude, .4, "Sublunar Latitude for lc3 exceeds delta."); Assert.AreEqual(52.36, lc3.SublunarLongitude, .4, "Sublunar Longitude for lc3 exceeds delta."); Assert.AreEqual(34.832, lc4.Longitude, .8, "Longitude for lc4 exceeds delta."); Assert.AreEqual(3.776, lc4.Latitude, .1, "Latitude for lc4 exceeds delta."); Assert.AreEqual(31.235, lc4.RightAscension, .1, "Right Ascension for lc4 exceeds delta."); Assert.AreEqual(16.686, lc4.Declination, .1, "Declination for lc4 exceeds delta."); Assert.AreEqual(39.296, lc4.GeometricMeanLongitude, .001, "Geometric Mean Longitude for lc4 exceeds delta."); Assert.AreEqual(16.420, lc4.SublunarLatitude, .4, "Sublunar Latitude for lc4 exceeds delta."); Assert.AreEqual(-5.37, lc4.SublunarLongitude, .4, "Sublunar Longitude for lc4 exceeds delta."); }
public void Time_at_Altitude_Condition_Tests() { Coordinate c = new Coordinate(47.40615, -122.24517, new DateTime(2020, 8, 11, 11, 29, 0)); var t = Celestial.Get_Time_at_Solar_Altitude(c, 57.8); Assert.AreEqual(CelestialStatus.DownAllDay, t.Condition); t = Celestial.Get_Time_at_Solar_Altitude(c, -57.8); Assert.AreEqual(CelestialStatus.UpAllDay, t.Condition); c = new Coordinate(75, 45, new DateTime(2020, 11, 5, 10, 7, 0)); c.Offset = -9; t = Celestial.Get_Time_at_Solar_Altitude(c, -.8); Assert.AreEqual(CelestialStatus.NoRise, t.Condition); c = new Coordinate(76, -45, new DateTime(2021, 8, 18, 10, 7, 0)); t = Celestial.Get_Time_at_Solar_Altitude(c, -.8); Assert.AreEqual(CelestialStatus.NoSet, t.Condition); }
private void Local_Time_Checker(Celestial cCel, Celestial lCel, Celestial sCel, Celestial bCel, double offset) { //SOLAR Time_Compare(cCel.SunRise, lCel.SunRise, sCel.SunRise, offset); Time_Compare(cCel.SunSet, lCel.SunSet, sCel.SunSet, offset); Time_Compare(cCel.AdditionalSolarTimes.CivilDawn, lCel.AdditionalSolarTimes.CivilDawn, sCel.AdditionalSolarTimes.CivilDawn, offset); Time_Compare(cCel.AdditionalSolarTimes.CivilDusk, lCel.AdditionalSolarTimes.CivilDusk, sCel.AdditionalSolarTimes.CivilDusk, offset); Time_Compare(cCel.AdditionalSolarTimes.NauticalDawn, lCel.AdditionalSolarTimes.NauticalDawn, sCel.AdditionalSolarTimes.NauticalDawn, offset); Time_Compare(cCel.AdditionalSolarTimes.NauticalDusk, lCel.AdditionalSolarTimes.NauticalDusk, sCel.AdditionalSolarTimes.NauticalDusk, offset); Time_Compare(cCel.AdditionalSolarTimes.AstronomicalDawn, lCel.AdditionalSolarTimes.AstronomicalDawn, sCel.AdditionalSolarTimes.AstronomicalDawn, offset); Time_Compare(cCel.AdditionalSolarTimes.AstronomicalDusk, lCel.AdditionalSolarTimes.AstronomicalDusk, sCel.AdditionalSolarTimes.AstronomicalDusk, offset); Time_Compare(cCel.SolarEclipse.LastEclipse.MaximumEclipse, lCel.SolarEclipse.LastEclipse.MaximumEclipse, sCel.SolarEclipse.LastEclipse.MaximumEclipse, offset); Time_Compare(cCel.SolarEclipse.NextEclipse.MaximumEclipse, lCel.SolarEclipse.NextEclipse.MaximumEclipse, sCel.SolarEclipse.NextEclipse.MaximumEclipse, offset); Assert.AreEqual(0, lCel.SunAltitude - bCel.SunAltitude, .00001); Assert.AreEqual(0, lCel.SunAzimuth - bCel.SunAzimuth, .00001); Assert.AreEqual(0, lCel.SunAzimuth - bCel.SunAzimuth, .00001); Assert.AreEqual(lCel.IsSunUp, bCel.IsSunUp); Assert.AreEqual(lCel.SunCondition, bCel.SunCondition); }
public void Local_Time() { DateTime d = new DateTime(2019, 10, 31, 14, 10, 22); double offset = -7; //INSTANCE CHECK //Coordinate in UTC Coordinate cUTC = new Coordinate(47.60357, -122.32945, d); //Coordinate in UTC - offset added to account for UTC date differing Coordinate sUTC = new Coordinate(47.60357, -122.32945, d.AddDays(offset / Math.Abs(offset) * -1)); //Coordinate in Local Coordinate lLoc = new Coordinate(47.60357, -122.32945, d); //Coordinate in local + offset (for cel coord comparision) Coordinate simUTC = new Coordinate(47.60357, -122.32945, d.AddHours(-offset)); lLoc.Offset = offset; Celestial cCel = cUTC.CelestialInfo; Celestial sCel = sUTC.CelestialInfo; Celestial lCel = lLoc.CelestialInfo; Celestial bCel = simUTC.CelestialInfo; Local_Time_Checker(cCel, lCel, sCel, bCel, offset); //STATIC CHECK cCel = Celestial.CalculateCelestialTimes(47.60357, -122.32945, d); sCel = Celestial.CalculateCelestialTimes(47.60357, -122.32945, d.AddDays(offset / Math.Abs(offset) * -1)); lCel = Celestial.CalculateCelestialTimes(47.60357, -122.32945, d, offset); bCel = Celestial.CalculateCelestialTimes(47.60357, -122.32945, d.AddHours(-offset)); Local_Time_Checker(cCel, lCel, sCel, bCel, offset); //With EagerLoad EagerLoad el = new EagerLoad(EagerLoadType.Celestial); cCel = Celestial.CalculateCelestialTimes(47.60357, -122.32945, d, el); sCel = Celestial.CalculateCelestialTimes(47.60357, -122.32945, d.AddDays(offset / Math.Abs(offset) * -1), el); lCel = Celestial.CalculateCelestialTimes(47.60357, -122.32945, d, el, offset); bCel = Celestial.CalculateCelestialTimes(47.60357, -122.32945, d.AddHours(-offset), el); Local_Time_Checker(cCel, lCel, sCel, bCel, offset); //VALIDATIONS //IN RANGE cUTC.Offset = -12; cUTC.Offset = 12; cCel = new Celestial(0, 0, DateTime.Now, -12); cCel = new Celestial(0, 0, DateTime.Now, 12); cCel = new Celestial(0, 0, DateTime.Now, -12, new EagerLoad()); cCel = new Celestial(0, 0, DateTime.Now, 12, new EagerLoad()); cCel = Celestial.CalculateCelestialTimes(0, 0, DateTime.Now, -12); cCel = Celestial.CalculateCelestialTimes(0, 0, DateTime.Now, 12); cCel = Celestial.CalculateCelestialTimes(0, 0, DateTime.Now, new EagerLoad(), 12); cCel = Celestial.CalculateCelestialTimes(0, 0, DateTime.Now, new EagerLoad(), -12); //OUT OF RANGE Assert.ThrowsException <ArgumentOutOfRangeException>(() => { cUTC.Offset = -13; }); Assert.ThrowsException <ArgumentOutOfRangeException>(() => { cUTC.Offset = 13; }); Assert.ThrowsException <ArgumentOutOfRangeException>(() => { cCel = new Celestial(0, 0, DateTime.Now, -13); }); Assert.ThrowsException <ArgumentOutOfRangeException>(() => { cCel = new Celestial(0, 0, DateTime.Now, 13); }); Assert.ThrowsException <ArgumentOutOfRangeException>(() => { cCel = new Celestial(0, 0, DateTime.Now, -13, new EagerLoad()); }); Assert.ThrowsException <ArgumentOutOfRangeException>(() => { cCel = new Celestial(0, 0, DateTime.Now, 13, new EagerLoad()); }); Assert.ThrowsException <ArgumentOutOfRangeException>(() => { cCel = Celestial.CalculateCelestialTimes(0, 0, DateTime.Now, -13); }); Assert.ThrowsException <ArgumentOutOfRangeException>(() => { cCel = Celestial.CalculateCelestialTimes(0, 0, DateTime.Now, 13); }); Assert.ThrowsException <ArgumentOutOfRangeException>(() => { cCel = Celestial.CalculateCelestialTimes(0, 0, DateTime.Now, new EagerLoad(), -13); }); Assert.ThrowsException <ArgumentOutOfRangeException>(() => { cCel = Celestial.CalculateCelestialTimes(0, 0, DateTime.Now, new EagerLoad(), 13); }); }