public void CreateAfternoonSession_NeedReturnSessionInstanceWithTitleContainsAfternoon() { SessionController sessionController = new SessionController(); Session session = sessionController.CreateAfternoonSession(new DateTime(2018, 1, 1, 16, 30, 0)); Assert.IsTrue(session.Title.Contains("Afternoon")); }
public Track(DateTime dayOfTheTrack) { //always when create a Track, need create 4 sessions: morning session, lunch session, afternoon session and network session SessionController sessionController = new SessionController(); this.SessionList = new List <Session>(); this.SessionList.Add(sessionController.CreateMorningSession(dayOfTheTrack)); this.SessionList.Add(sessionController.CreateLunchSession(dayOfTheTrack)); this.SessionList.Add(sessionController.CreateAfternoonSession(dayOfTheTrack)); //new date at 5PM to create the network session DateTime networkDay = new DateTime(dayOfTheTrack.Year, dayOfTheTrack.Month, dayOfTheTrack.Day, 17, 0, 0); this.SessionList.Add(sessionController.CreateNetworkSession(networkDay)); }