public void AddAlbum_Album_CallsAlbumRepoAdd() { var album = new Album(); _inventoryService.AddAlbum(album); _albumRepository.Verify(x => x.Add(It.IsAny <Album>()), Times.AtLeastOnce); }
public void AddAlbum_Album_AddsAlbumToDatabase() { var album = new Album { Id = Guid.NewGuid() }; _inventoryService.AddAlbum(album); var albums = _context.Albums.ToList(); Assert.IsTrue(albums.Contains(album)); }