public async Task PopToRoot_leaves_only_rootPage(bool isAnimated)
        {
            await navController.PushAsync <TestViewModel1>();

            await navController.PushAsync <TestViewModel2>();

            await navController.PopToRootAsync(isAnimated);

            Assert.Multiple(() => {
                Assert.AreEqual(navController.MainStack.Count, 1);
                Assert.IsInstanceOf <TestPage0>(navController.MainStack[0]);
            });
        }
        public async Task OnAppearing_doesnt_run_after_PopToRootAsync_if_modal(bool isAnimated)
        {
            navController = new NavController();
            await navController.InitAsync(new TestPage1());

            await navController.PushAsync <TestViewModel2>();

            await navController.PushModalAsync <TestViewModel3>();

            await navController.PopToRootAsync(isAnimated);

            Assume.That(navController.RootViewModel is TestViewModel1);
            var vm = navController.RootViewModel as TestViewModel1;

            Assert.AreEqual(1, vm.OnAppearingRuns);
        }
        public async Task OnAppearing_runs_after_PopToRootAsync(bool isAnimated)
        {
            navController = new NavController();
            await navController.InitAsync(new TestPage1());

            await navController.PushAsync <TestViewModel2>();

            await navController.PushAsync <TestViewModel3>();

            await navController.PopToRootAsync(isAnimated);

            Assume.That(navController.RootViewModel is TestViewModel1);
            var vm = navController.RootViewModel as TestViewModel1;

            Assert.IsTrue(vm.OnAppearingRuns == 2);
        }