public void testCreateLocalPath()
        {
            Video video = new Video();
            video.author = "Test Author";
            video.title = "Test Title";

            VideoURL videoURL = new VideoURL(video);
            videoURL.Type = "video/x-flv";

            DownloadVideo downloadVideo = new DownloadVideo(videoURL, @"C:\VIDEO");
            String localPath = downloadVideo.CreateLocalPath();
            String expected = @"C:\VIDEO\Test Author_Test Title.flv";

            Assert.AreEqual(expected, localPath);
        }
Beispiel #2
0
        public void Download_Click(object sender, EventArgs e)
        {
            VideoURL selectedVideoURL = this._udlView.comboBoxVideoURL.SelectedItem as VideoURL;

            if (selectedVideoURL == null)
            {
                throw new NullReferenceException("VideoURL is null");
            }

            DownloadVideo downloadVideo = new DownloadVideo(selectedVideoURL, UDL.Properties.Settings.Default.OutputPath);

            DownloadVideoView dl = new DownloadVideoView(downloadVideo);

            downloadVideo.Attach(dl);
            dl.Show();
        }
 public DownloadVideoView(DownloadVideo aVideoDownload)
 {
     this._videoDownload = aVideoDownload;
     InitializeComponent();
 }