コード例 #1
0
        public void Should_return_empty_list_for_day_4()
        {
            // Arrange
            var sessions = SessionBuilder.CreateListWithSize(10)
                                               .WhereTheFirst(10).HasDay(2)
                                               .Build();

            Presenter = new SessionsPresenter(sessions, 1);

            // Act
            var results = Presenter.GetSessionsForDay(4);

            // Assert
            results.Count().ShouldBe(0);
        }
コード例 #2
0
        public void Should_contain_valid_sessions_for_day_1()
        {
            // Arrange
            var sessions = SessionBuilder.CreateListWithSize(10)
                                               .WhereTheFirst(5).HasDay(1)
                                               .AndTheNext(5).HasDay(2)
                                               .Build();

            Presenter = new SessionsPresenter(sessions, 1);

            // Act
            var results = Presenter.GetSessionsForDay(1);

            // Assert
            results.Count().ShouldBe(5);
            foreach (var session in results)
                session.Day.ShouldBe(1);
        }
コード例 #3
0
        public void Should_return_7_sessions_in_section_1()
        {
            // Arrange
            var sessions = SessionBuilder.CreateListWithSize(10)
                                               .WhereTheFirst(3).HasTime("9:00 - 10:00")
                                               .AndTheNext(7).HasTime("10:20 - 11:20")
                                               .Build();

            Presenter = new SessionsPresenter(sessions, 1);

            // Act
            var result = Presenter.GetSessionsForSection(1);

            // Assert
            result.Count().ShouldBe(7);
            foreach (var session in result)
                session.Time.ShouldBe("10:20 - 11:20");
        }
コード例 #4
0
 public SessionsTableViewController(int day)
     : base(UITableViewStyle.Grouped)
 {
     var allSessions = (UIApplication.SharedApplication.Delegate as AppDelegate).Sessions;
     Presenter = new SessionsPresenter(allSessions, day);
 }
コード例 #5
0
 protected void SetupPresenterForDay(int day)
 {
     Presenter = new SessionsPresenter(null, day);
 }