public void Test_GetTimeBetween_L_L()
        {
            var ts = TimeOfDayHelper.GetTimeBetween(TimeOfDay.Lunch, TimeOfDay.Lunch);

            Assert.AreEqual(23, ts.Hours);
            Assert.AreEqual(59, ts.Minutes);
            Assert.AreEqual(59, ts.Seconds);
        }
        public static int CalcCountDownValue(MedicineWithDoses medicine)
        {
            if (medicine == null)
            {
                return(0);
            }

            var previousDoseTime = medicine.PreviousDoseTime;
            var nextDoseTime     = medicine.NextDoseTime;
            var totalTime        = TimeOfDayHelper.GetTimeBetween(previousDoseTime, nextDoseTime);
            var remainingTime    = TimeOfDayHelper.GetTimeOffsetForNextPill(medicine.NextDoseTime);
            var countDown        = ((int)remainingTime.TotalMinutes * 100) /
                                   (int)totalTime.TotalMinutes;

            return(countDown > CountDownMaxValue ? CountDownMaxValue : countDown);
        }
        public void Test_GetTimeBetween_D_B()
        {
            var ts = TimeOfDayHelper.GetTimeBetween(TimeOfDay.Dinner, TimeOfDay.Breakfast);

            Assert.AreEqual(12, ts.TotalHours);
        }
        public void Test_GetTimeBetween_L_B()
        {
            var ts = TimeOfDayHelper.GetTimeBetween(TimeOfDay.Lunch, TimeOfDay.Breakfast);

            Assert.AreEqual(19, ts.TotalHours);
        }
        public void Test_GetTimeBetween_L_D()
        {
            var ts = TimeOfDayHelper.GetTimeBetween(TimeOfDay.Lunch, TimeOfDay.Dinner);

            Assert.AreEqual(7, ts.TotalHours);
        }