private void downloadAsVideo(object args)
    {
      var uri = ((object[])args)[0] as string;
      var outputDirectory = ((object[])args)[1] as string;

      var uriConverter = new UriConverter(new WebClientImpl());
      if (uriConverter.IsPlaylistUri(uri))
      {
        downloadPlaylistAsVideo(uri, outputDirectory);
      }
      else
      {
        downloadSingleVideoAsVideo(uri, outputDirectory);
      }
    }
    public void IsPlaylistUri_WithSingleVideoUri()
    {
      var uriConverter = new UriConverter(_webClient.Object);

      string videoUri = "http://www.youtube.com/watch?v=nXBOfXj6cvE";

      Assert.IsFalse(uriConverter.IsPlaylistUri(videoUri));
    }
    public void IsPlaylistUri_WithPlaylistUri()
    {
      var uriConverter = new UriConverter(_webClient.Object);

      string playlistUri = "http://www.youtube.com/view_play_list?p=7BD938126500CF21";

      Assert.IsTrue(uriConverter.IsPlaylistUri(playlistUri));
    }
    public void IsPlaylistUri_WithValidPlaylistUri()
    {
      var uriConverter = new UriConverter(_webClient.Object);

      var playlistUri = "http://www.youtube.com/view_play_list?p=B30D2B52964020D6";

      Assert.IsTrue(uriConverter.IsPlaylistUri(playlistUri));
    }