コード例 #1
0
        public void CustomNavigation_Resolved_In_PrismApplication()
        {
            var app        = new PrismApplicationCustomNavMock(new XunitPlatformInitializer(_testOutputHelper));
            var navService = app.GetNavigationService();

            Assert.NotNull(navService);
            Assert.IsType <CustomNavigationServiceMock>(navService);
        }
コード例 #2
0
        public void CustomNavigation_Resolved_In_ViewModel()
        {
            var app = new PrismApplicationCustomNavMock(new XunitPlatformInitializer(_testOutputHelper));

            app.MainPage = new AutowireView();
            var vm = app.MainPage.BindingContext as AutowireViewModel;

            Assert.NotNull(vm);
            Assert.NotNull(vm.NavigationService);
            Assert.IsType <CustomNavigationServiceMock>(vm.NavigationService);
        }