Пример #1
0
        public void IngameImageToStringTest()
        {
            // Arrange
            IngameImage ingameImage = new IngameImage();
            // Act
            string result = ingameImage.ToString();

            // Assert
            Assert.IsTrue(result.Contains("@default"));
        }
Пример #2
0
        public void IngameImagePropertyTest()
        {
            // Arrange
            string      testUrl     = "<url to png>";
            IngameImage ingameImage = new IngameImage();

            // Act
            ingameImage.@default = testUrl;
            // Assert
            Assert.AreEqual(testUrl, ingameImage.@default);
        }
Пример #3
0
        public void CardListPropertyTest()
        {
            // Arrange
            int           cardId      = 1000;
            int           baseCardId  = 1000;
            string        cardType    = "Stronghold";
            CardName      cardName    = new CardName();
            CardText      cardText    = new CardText();
            MiniImage     miniImage   = new MiniImage();
            LargeImage    largeImage  = new LargeImage();
            IngameImage   ingameImage = new IngameImage();
            int           hitPoints   = 80;
            List <object> references  = new List <object>();
            string        illustrator = "Forrest Imel";
            int?          manaCost    = 3;
            int?          attack      = 2;
            bool?         isBlack     = true;
            string        subType     = "Accessory";
            int?          goldCost    = 3;
            bool?         isGreen     = false;
            bool?         isRed       = false;
            int?          armor       = 5;
            bool?         isBlue      = false;
            // Act
            CardList list = new CardList();

            list.card_id      = cardId;
            list.base_card_id = baseCardId;
            list.card_type    = cardType;
            list.card_name    = cardName;
            list.card_text    = cardText;
            list.mini_image   = miniImage;
            list.large_image  = largeImage;
            list.ingame_image = ingameImage;
            list.hit_points   = hitPoints;
            list.references   = references;
            list.illustrator  = illustrator;
            list.mana_cost    = manaCost;
            list.attack       = attack;
            list.is_black     = isBlack;
            list.sub_type     = subType;
            list.gold_cost    = goldCost;
            list.is_green     = isGreen;
            list.is_red       = isRed;
            list.armor        = armor;
            list.is_blue      = isBlue;
            // Assert
            Assert.AreEqual(cardId, list.card_id);
            Assert.AreEqual(baseCardId, list.base_card_id);
            Assert.AreEqual(cardType, list.card_type);
            Assert.AreEqual(cardName, list.card_name);
            Assert.AreEqual(cardText, list.card_text);
            Assert.AreEqual(miniImage, list.mini_image);
            Assert.AreEqual(largeImage, list.large_image);
            Assert.AreEqual(ingameImage, list.ingame_image);
            Assert.AreEqual(hitPoints, list.hit_points);
            Assert.AreEqual(references, list.references);
            Assert.AreEqual(illustrator, list.illustrator);
            Assert.AreEqual(manaCost, list.mana_cost);
            Assert.AreEqual(attack, list.attack);
            Assert.AreEqual(isBlack, list.is_black);
            Assert.AreEqual(subType, list.sub_type);
            Assert.AreEqual(goldCost, list.gold_cost);
            Assert.AreEqual(isGreen, list.is_green);
            Assert.AreEqual(isRed, list.is_red);
            Assert.AreEqual(armor, list.armor);
            Assert.AreEqual(isBlue, list.is_blue);
        }