Пример #1
0
        public void Test_getTimeSlot_goodTimeAM()
        {
            DateTime goodTime = DateTime.Parse("09:00 AM");
            DateTime actual   = _scheduleManager.getTimeSlot(goodTime, 15);

            Assert.AreEqual(actual, goodTime);
        }
Пример #2
0
        private DateTime getNextSlot(IActivity activity)
        {
            DateTime nextTime = _scheduleManager.getStartTime();

            if (_activites.Count > 0)
            {
                IScheduledActivity lastActivity = _activites.Last();
                if (lastActivity != null)
                {
                    DateTime lastTime = lastActivity.getEnd();
                    int      duration = activity.getDuration();
                    nextTime = _scheduleManager.getTimeSlot(lastTime, duration);
                }
            }
            return(nextTime);
        }