public async Task Should_Return_Correct_Type() { // Given NavigatorState sut = new NavigatorStateFixture(); // When var result = await sut.ReplaceRouteBelow(new PageRoute <TestViewModel>(new RouteSettings())); // Then result.Should().BeOfType <PageRoute <TestViewModel> >(); }
public async Task Should_Receive_Remove_Route() { // Given var navigator = Substitute.For <INavigator>(); NavigatorState sut = new NavigatorStateFixture().WithNavigator(navigator); // When await sut.ReplaceRouteBelow(new PageRoute <TestViewModel>(new RouteSettings())); // Then await navigator.Received().ReplaceRouteBelow(Arg.Any <PageRoute <TestViewModel> >()); }