Ejemplo n.º 1
0
        public void GetAllPlaylistsContainingVideo_WithPlaylistsContainingVideo()
        {
            var expectedPlaylists = new List <PlaylistDto>();
            var videoRepository   = new VideoRepository();
            var videoDto          = CreateVideoUtil.GetNewVideoDetails(testLibrary.LibraryId, -1, -1);
            var videoId           = videoRepository.CreateVideo(videoDto);

            for (int i = 0; i < 2; ++i)
            {
                var sequence = CreateAndRetrievePlaylist();
                expectedPlaylists.Add(sequence);
                repository.AddVideoToSequence(videoId, sequence.SequenceId);
            }

            var sequences = repository.GetAllPlaylistsContainingVideo(videoId);

            CollectionAssert.AreEquivalent(expectedPlaylists, sequences);
        }
Ejemplo n.º 2
0
 public async Task <List <PlaylistDto> > GetAllPlaylistsContainingVideo(long videoId)
 {
     return(playlistRepository.GetAllPlaylistsContainingVideo(videoId));
 }