Example #1
0
        public void Hour3Return8()
        {
            var expected = "08";
            var actual   = ClockMirror.Hour(3, 1);

            Assert.AreEqual(expected, actual);
        }
Example #2
0
        public void Hour12Return11()
        {
            var expected = "11";
            var actual   = ClockMirror.Hour(12, 1);

            Assert.AreEqual(expected, actual);
        }
Example #3
0
        public static string FormatTime(string time)
        {
            var h       = Convert.ToInt32(time.Split(':')[0]);
            var min     = Convert.ToInt32(time.Split(':')[1]);
            var hour    = ClockMirror.Hour(h, min);
            var minutes = ClockMirror.Minutes(min);

            return($"{hour}:{minutes}");
        }