Beispiel #1
0
        public async Task GetLikedSongIdsByUserIdAsync_UserIdNoLikedArtists_EmptyArray()
        {
            // Arrange
            var artistRepoMock = new Mock <IArtistRepository>();

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

            var artistCollection = new ArtistCollection(artistRepoMock.Object, _dependencyMapper);

            // Act
            var likedArtists = (await artistCollection.GetLikedArtistIdsByUserIdAsync(1)).ToArray();

            // Assert
            artistRepoMock.Verify();
            Assert.AreEqual(0, likedArtists.Length);
        }