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); }
public void Test_getStartTime() { DateTime actual = _scheduleManager.getStartTime(); Assert.AreEqual(actual.Hour, TimeManager.STARTHOUR); }