예제 #1
0
파일: BotTests.cs 프로젝트: oslvzs/Chat-bot
        public void MusixmatchTestWrongApiKey()
        {
            string           token            = "test2www";
            MusixmatchFinder musixmatchFinder = new MusixmatchFinder(token);
            var songName = "Billie Jean is not my lover";
            IList <Tuple <string, string, string> > mixmatchResult = musixmatchFinder.FindSongByLyrics(songName);

            Assert.AreEqual(mixmatchResult, null);
        }
예제 #2
0
파일: BotTests.cs 프로젝트: oslvzs/Chat-bot
        public void MusixmatchTestEnglishLang()
        {
            string           token            = UnitTestProject1.Properties.Settings.Default.MusixmatchKey;
            MusixmatchFinder musixmatchFinder = new MusixmatchFinder(token);
            var songName = "Billie Jean is not my lover";
            IList <Tuple <string, string, string> > mixmatchResult = musixmatchFinder.FindSongByLyrics(songName);
            Tuple <string, string, string>          result         = new Tuple <string, string, string>("Billie Jean", "Thriller", "Michael Jackson");

            Assert.AreEqual(result.Item1, mixmatchResult[0].Item1);
            Assert.AreEqual(result.Item2, mixmatchResult[0].Item2);
            Assert.AreEqual(result.Item3, mixmatchResult[0].Item3);
        }
예제 #3
0
파일: BotTests.cs 프로젝트: oslvzs/Chat-bot
        public void MusixmatchTestRussianLang()
        {
            string token = UnitTestProject1.Properties.Settings.Default.MusixmatchKey;

            Console.WriteLine(token);
            MusixmatchFinder musixmatchFinder = new MusixmatchFinder(token);
            var songName = "Ах эти тучи в голубом";
            IList <Tuple <string, string, string> > mixmatchResult = musixmatchFinder.FindSongByLyrics(songName);
            Tuple <string, string, string>          result         = new Tuple <string, string, string>("Тучи в голубом", "My Life", "Кристина Орбакайте");

            Assert.AreEqual(result.Item1, mixmatchResult[0].Item1);
            Assert.AreEqual(result.Item2, mixmatchResult[0].Item2);
            Assert.AreEqual(result.Item3, mixmatchResult[0].Item3);
        }