Esempio n. 1
0
        public void YouTubeTestRussianLang()
        {
            string          token           = UnitTestProject1.Properties.Settings.Default.YoutubeKey;
            YoutubeListener youtubeListener = new YoutubeListener(token);
            var             songName        = "Кристина Орбакайте - Тучи в голубом";
            var             result          = youtubeListener.TryYoutube(songName);

            Assert.AreEqual("https://www.youtube.com/watch?v=Xh5IP1lMjNQ", result);
        }
Esempio n. 2
0
        public void YoutubeTestWrongApiKey()
        {
            string          token           = "test2www";
            YoutubeListener youtubeListener = new YoutubeListener(token);
            var             songName        = "Billie Jean is not my lover";
            var             result          = youtubeListener.TryYoutube(songName);

            Assert.AreEqual(result, null);
        }
Esempio n. 3
0
        public void YouTubeTestEnglishLang()
        {
            string          token           = UnitTestProject1.Properties.Settings.Default.YoutubeKey;
            YoutubeListener youtubeListener = new YoutubeListener(token);
            var             songName        = "Michael Jackson - Billie Jean";
            var             result          = youtubeListener.TryYoutube(songName);

            Assert.AreEqual("https://www.youtube.com/watch?v=Zi_XLOBDo_Y", result);
        }