public async Task InsertPageBefore_inserts_page_in_correct_spot()
        {
            Assume.That(navController.MainStack.Count == 4);
            Assume.That(navController.MainStack[2] is TestPage2);

            await navController.InsertPageBefore <TestViewModel2, TestViewModel5>();

            Assert.Multiple(() =>
            {
                Assert.IsTrue(navController.MainStack.Count == 5);
                Assert.IsInstanceOf <TestPage5>(navController.MainStack[2]);
            });
        }
Esempio n. 2
0
        public async Task Main()
        {
            var navController = new NavController();
            await navController.InitAsync(new TestPage0());

            await navController.PushAsync <TestViewModel1>();

            await navController.PushAsync <TestViewModel2>();

            await navController.PushAsync <TestViewModel3>();

            await navController.InsertPageBefore <TestViewModel2, TestViewModel5>();
        }