Esempio n. 1
0
        public void Extensions_MakeUtcDateRange_1()
        {
            var moon = new moonStation();

            var x = moon.MakeUtcDateRange(new DateTime(1980, 1, 1, 13, 0, 0, DateTimeKind.Utc), new DateTime(1980, 1, 1, 14, 0, 0, DateTimeKind.Utc));

            Aver.IsTrue(x.Kind == DateTimeKind.Utc);
            Aver.AreEqual(13, x.Start.Value.Hour);
            Aver.AreEqual(14, x.End.Value.Hour);
        }
Esempio n. 2
0
        public void Extensions_MakeUtcDateRange_2()
        {
            var moon = new moonStation();

            var x = moon.MakeUtcDateRange(new DateTime(1980, 1, 1, 13, 0, 0, DateTimeKind.Local), new DateTime(1980, 1, 1, 14, 0, 0, DateTimeKind.Local));

            Aver.IsTrue(x.Kind == DateTimeKind.Utc);
            Aver.AreEqual(18, x.Start.Value.Hour); //UTC is 5 hrs ahead of moon
            Aver.AreEqual(19, x.End.Value.Hour);
        }
Esempio n. 3
0
        public void Extensions_MakeLocalDateRange_2()
        {
            var moon = new moonStation();

            var x = moon.MakeLocalDateRange(new DateTime(1980, 1, 1, 13, 0, 0, DateTimeKind.Utc), new DateTime(1980, 1, 1, 14, 0, 0, DateTimeKind.Utc));

            Aver.IsTrue(x.Kind == DateTimeKind.Local);
            Aver.AreEqual(8, x.Start.Value.Hour); //moon is 5 hrs behind UTC
            Aver.AreEqual(9, x.End.Value.Hour);
        }