public async Task Should_Return_Correct_Type() { // Given NavigatorState sut = new NavigatorStateFixture(); // When var result = await sut.PopAndPushNamed <Route <TestViewModel> >(string.Empty, default(object)); // Then result.Should().BeOfType <Route <TestViewModel> >(); }
public async Task Should_Receive_Pop_And_Push_Named() { // Given var navigator = Substitute.For <INavigator>(); NavigatorState sut = new NavigatorStateFixture().WithNavigator(navigator); // When await sut.PopAndPushNamed <Route <TestViewModel> >(string.Empty, default(object)); // Then await navigator.Received().PopAndPushNamed <Route <TestViewModel> >(Arg.Any <string>(), Arg.Any <object>()); }