Ejemplo n.º 1
0
        public async Task GoForward()
        {
            var facade  = new FakeFacade();
            var service = GetService(facade);

            await service.GoForwardAsync();

            Assert.IsTrue(facade.IsGoFowardInvoked);
        }
Ejemplo n.º 2
0
        public async Task GoBack()
        {
            var facade  = new FakeFacade();
            var service = GetService(facade);

            await service.GoBackAsync();

            Assert.IsTrue(facade.IsGoBackInvoked);

            facade.Reset();

            await service.GoBackAsync(null);

            Assert.IsTrue(facade.IsGoBackInvoked);
        }
Ejemplo n.º 3
0
        public async Task Navigate()
        {
            var facade  = new FakeFacade();
            var service = GetService(facade);

            await service.NavigateAsync(typeof(FakePage));

            Assert.IsTrue(facade.IsNavInvoked);
            Assert.IsNull(facade.NavParam);

            facade.Reset();

            await service.NavigateAsync(typeof(FakePage), "p1");

            Assert.IsTrue(facade.IsNavInvoked);
            Assert.AreEqual("p1", facade.NavParam);

            facade.Reset();

            await service.NavigateAsync(typeof(FakePage), "p2", null);

            Assert.IsTrue(facade.IsNavInvoked);
            Assert.AreEqual("p2", facade.NavParam);
        }