public void ContextToVideo() { var yc = new YoutubeContext(Url) {BaseDirectory = new DirectoryInfo(Path.GetTempPath())}; try { yc.ToVideo(VideoType.Mp4); Assert.IsTrue(File.Exists(yc.VideoPath.FullName)); Debug.WriteLine(yc.VideoPath.FullName); } finally { if (yc.VideoPath != null && File.Exists(yc.VideoPath.FullName)) File.Delete(yc.VideoPath.FullName); Assert.IsFalse(File.Exists(yc.VideoPath.FullName)); } }