Exemplo n.º 1
0
        public async Task GetLikedAlbumIdsByUserIdAsyncTest_UserIdNoLikedArtists_EmptyArray()
        {
            // Arrange
            var albumRepoMock = new Mock <IAlbumRepository>();

            albumRepoMock.Setup(mock => mock.GetLikedAlbumIdsByUserIdAsync(1))
            .ReturnsAsync(new int[] { })
            .Verifiable();

            var albumCollection = new AlbumCollection(albumRepoMock.Object, _dependencyMapper);

            // Act
            var likedAlbums = (await albumCollection.GetLikedAlbumIdsByUserIdAsync(1)).ToArray();

            // Assert
            albumRepoMock.Verify();
            Assert.AreEqual(0, likedAlbums.Length);
        }