Beispiel #1
0
            public async Task Should_Return_Correct_Type()
            {
                // Given
                NavigatorState sut = new NavigatorStateFixture();

                // When
                var result = await sut.PushAndRemoveUntil(new PageRoute <TestViewModel>(new RouteSettings()),
                                                          Route.WithName <PageRoute <TestViewModel> >(""));

                // Then
                result.Should().BeOfType <PageRoute <TestViewModel> >();
            }
Beispiel #2
0
            public async Task Should_Receive_Push_And_Remove_Until()
            {
                // Given
                var            navigator = Substitute.For <INavigator>();
                NavigatorState sut       = new NavigatorStateFixture().WithNavigator(navigator);

                // When
                await sut.PushAndRemoveUntil(new PageRoute <TestViewModel>(new RouteSettings()), x => true);

                // Then
                await navigator.Received().PushAndRemoveUntil(Arg.Any <PageRoute <TestViewModel> >(),
                                                              Arg.Any <Expression <Func <PageRoute <TestViewModel>, bool> > >());
            }