Exemplo n.º 1
0
        public MainPage(SessionOrganizer sessionOrganizer, SpecialSessionIdentifier specialSessionIdentifier)
        {
            InitializeComponent();

            this.sessionOrganizer = sessionOrganizer;
            this.specialSessionIdentifier = specialSessionIdentifier;
            var service = new SessionService(this);

            service.GetListOfSessions();
        }
Exemplo n.º 2
0
        public void ListOfSessionsOrderedByTime()
        {
            var sut = new SessionOrganizer();
            var sessions = buildInputSessions();

            var sortedSessions = sut.SortAndGroupSessionsByTime(sessions);

            var sessionTimes = new List<string>();
            var groups = sortedSessions.GetEnumerator();
            while (groups.MoveNext())
            {
                var group = groups.Current as Group<Session>;
                sessionTimes.Add(group.FormattedTitle);
            }

            Assert.AreEqual(sessionTimes.Count, 5);
            Assert.AreEqual(sessionTimes[0], " 9:00 AM - 10:30 AM");
            Assert.AreEqual(sessionTimes[1], " 10:30 AM - 11:00 AM");
            Assert.AreEqual(sessionTimes[2], " 11:00 AM - 12:30 PM");
            Assert.AreEqual(sessionTimes[3], " 12:30 PM - 1:30 PM");
            Assert.AreEqual(sessionTimes[4], " 1:30 PM - 3:00 PM");
        }
Exemplo n.º 3
0
 public MainPage(SessionOrganizer sessionOrganizer, SpecialSessionIdentifier specialSessionIdentifier)
 {
     InitializeComponent();
     this.sessionOrganizer = sessionOrganizer;
     this.specialSessionIdentifier = specialSessionIdentifier;
 }