Пример #1
0
        private void InitApp()
        {
            BlobCache.ApplicationName = "PodcastReader";

            var b = new AppBootstrapper(); //IoC registrations
			FileCache.Instance.Init();
        }
Пример #2
0
        public void Test()
        {
            var b = new AppBootstrapper();
            var router = Screen.Router;

            router.Navigate.Execute(new TestVM());
            router.Navigate.Execute(new TestVM());

            router.NavigationStack.ItemsAdded.Take(2).Wait();

            Assert.AreEqual(2, router.NavigationStack.Count, "number of NavStack entries is unexpected");
            var canGoBack = Screen.Router.NavigateBack.CanExecute(null);
            Assert.IsTrue(canGoBack, "Cant go back");
        }
Пример #3
0
        public void After_Two_Navigates_I_Am_Able_To_Go_Back()
        {
            var uiTask = Observable.Start(() =>
            {
                var app = new AppBootstrapper();
                //var app = new AppLifetime();
                //app.OnLaunching();
                //var vm = Locator.Current.GetService<MainViewModel>();
                var vm = new TestVM();
                Screen.Router.Navigate.Execute(vm);
                Screen.Router.Navigate.Execute(vm);
                //vm.AddSubscriptionCommand.Execute(null);

                Screen.Router.NavigationStack.ItemsAdded.Take(2).Wait();

                var canGoBack = Screen.Router.NavigateBack.CanExecute(null);

                Assert.IsTrue(canGoBack);

            }, RxApp.MainThreadScheduler).FirstOrDefaultAsync();

            uiTask.Wait();
        }