Пример #1
0
        public void FindCardById()
        {
            int ventriloquyCardId = 10418;

            ArtifactClient client = new ArtifactClient();
            Card           card   = client.GetCard(ventriloquyCardId);

            Assert.IsNotNull(card);
        }
Пример #2
0
        public void FindCardByName()
        {
            string cardName = "Phantom assassin";

            ArtifactClient client = new ArtifactClient();
            Card           c      = client.GetCard(cardName);

            Assert.IsNotNull(c);
            Assert.AreEqual(cardName.ToLower(), c.Names.English.ToLower());
        }
Пример #3
0
        public void GetCardArtUrl()
        {
            ArtifactClient client = new ArtifactClient();
            Card           c      = client.GetCard("venomancer");

            if (c == null)
            {
                Assert.Fail(); //Failed because GetCard(name) fails
            }
            Enums.ArtType type    = Enums.ArtType.Large;
            string        idUrl   = client.GetCardArtUrl(c.Id, type);
            string        nameUrl = client.GetCardArtUrl(c.Names.English, type);

            Assert.IsFalse(string.IsNullOrEmpty(idUrl));
            Assert.IsFalse(string.IsNullOrEmpty(nameUrl));
            Assert.AreEqual(idUrl, nameUrl);
        }