Exemple #1
0
        public void PushTwoViewModels()
        {
            Navigator          navigator = new Navigator(NavigationFixture.ServiceProvider);
            FirstTestViewModel vm        = navigator.BuildViewModel <FirstTestViewModel>();

            Assert.NotNull(vm);
            navigator.PushViewModelToStack(vm, false);
            Assert.IsType <FirstTestViewModel>(navigator.SelectedViewModel);
            Assert.False(navigator.NavigationStackNotEmpty);
            SecondTestViewModel secondVm = navigator.BuildViewModel <SecondTestViewModel>();

            Assert.NotNull(secondVm);
            navigator.PushViewModelToStack(secondVm, false);
            Assert.IsType <SecondTestViewModel>(navigator.SelectedViewModel);
            Assert.True(navigator.NavigationStackNotEmpty);
        }