public void FindSongsByAlbumIdTest() { Mock <ISongRepository> songRepository = new Mock <ISongRepository>(); Song song1 = new Song(); song1.Title = "Received song1"; song1.Id = 1; Song song2 = new Song(); song2.Title = "Received song2"; song2.Id = 2; songRepository.Setup(r => r.FindAllByAlbumId(1)).Returns(new List <Song>() { song1, song2 }); ISongService songService = new SongService(songRepository.Object, null); Assert.AreEqual(songService.FindByAlbumId(1)[0], song1); Assert.AreEqual(songService.FindByAlbumId(1)[1], song2); Assert.IsTrue(songService.FindByAlbumId(1).Count == 2); }