public void Test_getTimeSlot_goodTimeAM() { DateTime goodTime = DateTime.Parse("09:00 AM"); DateTime actual = _scheduleManager.getTimeSlot(goodTime, 15); Assert.AreEqual(actual, goodTime); }
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); }