public void ContextToVideoAsync() { var yc = new YoutubeContext(Url) {BaseDirectory = new DirectoryInfo(Path.GetTempPath())}; try { yc.ToVideoAsync(VideoType.Mp4).Wait(); 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)); } }