예제 #1
0
        public void TestGetArtistValid()
        {
            Musixmatch Musixmatch = new Musixmatch(Environment.GetEnvironmentVariable("MusixmatchApiToken"));
            String     actual     = Musixmatch.GetArtist("123").ArtistName;
            String     expected   = "Sheryl Crow";

            Assert.AreEqual(expected, actual);
        }
예제 #2
0
        public void TestGetArtistInvalid()
        {
            Musixmatch Musixmatch = new Musixmatch(Environment.GetEnvironmentVariable("MusixmatchApiToken"));

            try
            {
                Artist Artist = Musixmatch.GetArtist("999999999999");
            }
            catch (StatusCodeException e)
            {
                String actual   = e.Message;
                String expected = "STATUS CODE 404 : The requested resource was not found.";
                Assert.AreEqual(expected, actual);
            }
        }