Пример #1
0
        public async Task PushesIntoNextInner()
        {
            var page     = new ContentPage();
            var navProxy = new NavigationProxy();

            await navProxy.PushAsync(page);

            var navTest = new NavigationTest();

            navProxy.Inner = navTest;

            Assert.AreEqual(page, navTest.LastPushed);
        }
Пример #2
0
        public async Task TestPushWithInner()
        {
            var proxy = new NavigationProxy();
            var inner = new NavigationTest();

            proxy.Inner = inner;

            var child = new ContentPage {
                Content = new View()
            };
            await proxy.PushAsync(child);

            Assert.AreEqual(child, inner.LastPushed);
        }
Пример #3
0
        public async Task TestPopWithInner()
        {
            var proxy = new NavigationProxy();
            var inner = new NavigationTest();

            proxy.Inner = inner;

            var child = new ContentPage {
                Content = new View()
            };
            await proxy.PushAsync(child);

            var result = await proxy.PopAsync();

            Assert.AreEqual(child, result);
            Assert.True(inner.Popped, "Pop was never called on the inner proxy item");
        }
Пример #4
0
 protected override Task OnPushAsync(Page page, bool animated) => _navigation.PushAsync(page, animated);
 public async Task Begin()
 {
     await NavigationProxy.PushAsync(new ContentPage { Content = this });
 }