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); }