Exemple #1
0
        static void TimeSinceMidnightTest()
        {
            MyTime actual   = MyTime.TimeSinceMidnight(1234);
            MyTime expected = new MyTime(0, 20, 34);

            Assertions.AssertEquals(expected, actual, "TimeSinceMidnightTest");
        }
Exemple #2
0
        static void TimeFromMidnightTest()
        {
            MyTime t        = new MyTime(1, 2, 3);
            int    expected = 1 * 60 * 60 + 2 * 60 + 3;
            int    actual   = t.TimeSinceMidnight();

            Assertions.AssertEquals(expected, actual, "TimeFromMidnightTest");
        }