Esempio n. 1
0
            public ViewArtistDetailsRequestHandlerBuilder SetupArtistServiceToReturnNull()
            {
                MockArtistService
                .Setup(service => service.GetByArtist(It.IsAny <int>()))
                .Returns(Task.FromResult <Artist>(null));

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

                return(this);
            }