public static void Setup(TestContext context) { Mock <IImageRepository> _imageRepository = new ImageRepositoryMock()._imageRepository; Mock <IAlbumService> _albumService = new AlbumServiceMock()._albumService; _imageService = new ImageService(_imageRepository.Object, _albumService.Object); }
public void ImageIsPersistedToRepository() { ImageRepositoryMock.Verify(x => x.Add(It.IsAny <Image>()), Times.Once()); }