public async void Init_ExceptionThrown_ReportsError()
        {
            DataClient.GetDataBody = delegate { throw new Exception(); };
            string errorMessage = null;

            Messenger.Subscribe <ErrorMessage>(msg => errorMessage = msg.Message);

            var viewModel = new SpeakersViewModel(Messenger, CodeCampService);
            await viewModel.Init();

            Assert.NotNull(errorMessage);
            Assert.False(viewModel.IsLoading);
            Assert.Null(viewModel.Speakers);
        }
        private void reinitializeChildViewModels()
        {
            OverviewViewModel = new OverviewViewModel(Messenger, _campService);
            OverviewViewModel.Init();

            SessionsViewModel = new SessionsViewModel(Messenger, _campService);
            SessionsViewModel.Init();

            SpeakersViewModel = new SpeakersViewModel(Messenger, _campService);
            SpeakersViewModel.Init();

            SponsorsViewModel = new SponsorsViewModel(Messenger, _campService);
            SponsorsViewModel.Init();
        }
        public async void Init_DataLoadsSuccessfully_LoadsSpeakerList()
        {
            var data = new CampData {
                Speakers = new List <Speaker>()
            };

            DataClient.GetDataBody = () => Task.FromResult(data);
            var viewModel = new SpeakersViewModel(Messenger, CodeCampService);

            Assert.True(viewModel.IsLoading);

            await viewModel.Init();

            Assert.AreEqual(data.Speakers, viewModel.Speakers);
            Assert.False(viewModel.IsLoading);
        }
        private void reinitializeChildViewModels()
        {
            OverviewViewModel = new OverviewViewModel(Messenger, _campService);
            OverviewViewModel.Init();

            SessionsViewModel = new SessionsViewModel(Messenger, _campService);
            SessionsViewModel.Init();

            SpeakersViewModel = new SpeakersViewModel(Messenger, _campService);
            SpeakersViewModel.Init();

            SponsorsViewModel = new SponsorsViewModel(Messenger, _campService);
            SponsorsViewModel.Init();
        }