public void GetVideoIdFromQueryString_GoodUrlithExtra_ReturnsIdOfVideo() { var youtube_dl = new Youtube_Dl("./"); var id = "spr5smxuO5E"; var result = youtube_dl.GetVideoIdFromQueryString(new Uri($"https://www.youtube.com/watch?v={id}&t=8s")); Assert.Equal(result, id); }
public void GetVideoIdFromQueryString_GoodUrl_ReturnsIdOfVideo() { var youtube_dl = new Youtube_Dl("./"); var id = "RKTXn_c2tyQ"; var result = youtube_dl.GetVideoIdFromQueryString(new Uri($"https://www.youtube.com/watch?v={id}")); Assert.Equal(result, id); }
public void GetVideoIdFromQueryString_BadVideoUrl_ThrowNullArguementException() { var youtube_dl = new Youtube_Dl("./"); Assert.Throws <ArgumentNullException>(() => youtube_dl.GetVideoIdFromQueryString(new Uri("https://www.youtube.com/watch?b=Test&v=RKTXn_c2tyQ"))); }
public void GetVideoIdFromQueryString_MissingQueryString_ThrowNullArguementException() { var youtube_dl = new Youtube_Dl("./"); Assert.Throws <ArgumentNullException>(() => youtube_dl.GetVideoIdFromQueryString(new Uri("https://youtube.com"))); }