Ejemplo n.º 1
0
        public void TestGetAlbumValid()
        {
            Musixmatch Musixmatch = new Musixmatch(Environment.GetEnvironmentVariable("MusixmatchApiToken"));
            Album      Album      = Musixmatch.GetAlbum("14250417");

            String actual   = Album.ArtistName;
            String expected = "LMFAO";

            Assert.AreEqual(expected, actual, $"Artist name Expected {expected} Was {actual}");
        }
Ejemplo n.º 2
0
        public void TestGetAlbumNull()
        {
            Musixmatch Musixmatch = new Musixmatch(Environment.GetEnvironmentVariable("MusixmatchApiToken"));

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