SetSelectedSessions() 공개 메소드

public SetSelectedSessions ( ) : void
리턴 void
        public void Should_ask_the_repository_to_get_all_selected_sessions()
        {
            var sessions = new List<Session>
            {
                new Session { ID = mockGuid1, Title = "Some fake session" }
            };
            manager = new MyScheduleManager(repository, sessions);

            manager.SetSelectedSessions();

            repository.GetAllWasCalled.ShouldBe(true);
        }
예제 #2
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            InitializeWindow();

            // TODO: put this in a thread when the UI is blocked
            Sessions = SessionsOnDisk.GetAll();
            MyScheduleManager = new MyScheduleManager(new ScheduleTextFileRepository(), Sessions);
            MyScheduleManager.SetSelectedSessions();

            InitializeMainViewControllers();
            InitializeTabController();

            window.MakeKeyAndVisible();
            return true;
        }
        public void Should_flag_the_correct_sessions()
        {
            var sessions = new List<Session>
            {
                new Session { ID = mockGuid1, Title = "Some fake session" },
                new Session { ID = mockGuid2, Title = "Another fake session" }
            };
            repository.SessionIdsToGet = new List<Guid> { mockGuid1 };
            manager = new MyScheduleManager(repository, sessions);

            manager.SetSelectedSessions();

            sessions[0].IsSelected.ShouldBe(true);
            sessions[1].IsSelected.ShouldBe(false);
        }