public async Task Should_Return_Correct_Type() { // Given NavigatorState sut = new NavigatorStateFixture(); // When var result = await sut.RemoveRoute(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.RemoveRoute(new PageRoute <TestViewModel>(new RouteSettings())); // Then await navigator.Received().RemoveRoute(Arg.Any <PageRoute <TestViewModel> >()); }