public ViewArtistDetailsRequestHandlerBuilder SetupArtistServiceToReturnNull() { MockArtistService .Setup(service => service.GetByArtist(It.IsAny <int>())) .Returns(Task.FromResult <Artist>(null)); return(this); }
public ViewArtistDetailsRequestHandlerBuilder SetupArtistServiceGetByArtistToReturn(Artist artist) { MockArtistService .Setup(service => service.GetByArtist(It.Is <int>(id => id == artist.Id))) .Returns(Task.FromResult(artist)); return(this); }