Correct syntax for mocking MVVMCross navigation service using Moq
up vote
0
down vote
favorite
1
I am quite new to MVVMCross and Moq and I need some help with the format of mocking the MvxNavigation Service. I have a call in my code which I want to mock. I would have thought I could have set the return value by doing something along the lines of: _naviageService.Setup(n => n.Navigate<PlaceSelectViewModel, Place, Place>(It.IsAny<Place>())).Returns(returnPlace); but this does not compile. I have tried looking in the Moq quick start and MVVMCross example but can’t seem to find what I want. Please find complete sample below as requested: Tnx public class FooClass { IMvxNavigationService _navigationService; public IMvxAsyncCommand SelectPlaceCommand { get; } public FooClass(IMvxNavigationService navigationService) { _navigationService = navigati...