public void AsAudioOnly_WithNullVideoList_ThrowsArgumentNullException()
 {
   IStateNotifier stateNotifier = new IStateNotifierMock();
   Downloader target = new Downloader(stateNotifier);
   string outputDirectory = string.Empty;
   IList<YoutubeVideo> videos = null;
   
   target.AsAudioOnly(outputDirectory, videos);
 }
    private void downloadSingleVideoAsAudio(string uri, string outputDirectory)
    {
      var video = GetVideoFromSingleVideo(uri);

      var downloader = new Downloader(this);
      downloader.AsAudioOnly(outputDirectory, new System.Collections.Generic.List<YoutubeVideo> { video });
    }
    private void downloadPlaylistAsAudio(string uri, string outputDirectory)
    {
      var videos = GetListOfVideosFromPlaylist(uri);

      var downloader = new Downloader(this);
      downloader.AsAudioOnly(outputDirectory, videos);
    }
    public void DownloadOneSongAsAudioOnly()
    {
      var flvUri = "http://youtube.com/get_video?video_id=y6_-cLWwEU0&t=OEgsToPDskK4SK4mp23uC0fNwECBlETt";
      var video = new YoutubeVideo { Title = "cool song", FlvUri = flvUri };
      var downloader = new Downloader(new IStateNotifierMock());

      var files = downloader.AsAudioOnly(string.Empty, new List<YoutubeVideo> { video });

      Assert.AreEqual(1, files.Count);
      Assert.AreEqual("cool song.mp3", files[0].GetFileName());
    }