Example #1
0
        public void DecodeSpellCardTest()
        {
            var decoder = new scfdivineFormatDecoder();
            var input   = "Fireball @ Mage | Spell | C | 4 || Deal $6 damage. &";

            var output = decoder.DecodeCard(input);

            Assert.AreEqual(testSpell.Name, output.Name);
            Assert.AreEqual(testSpell.Type, output.Type);
            Assert.AreEqual(testSpell.CardClass, output.CardClass);
            Assert.AreEqual(testSpell.Rarity, output.Rarity);
            Assert.AreEqual(testSpell.Cost, output.Cost);
            Assert.AreEqual(testSpell.Text, output.Text);
        }
Example #2
0
        public void DecodeWeaponCardTest()
        {
            var decoder = new scfdivineFormatDecoder();
            var input   = "Death's Bite @ Warrior | Weapon | C | 4 | 4/2 || $DR$: Deal 1 damage to all minions. &";

            var output = decoder.DecodeCard(input);

            Assert.AreEqual(testWeapon.Name, output.Name);
            Assert.AreEqual(testWeapon.Type, output.Type);
            Assert.AreEqual(testWeapon.CardClass, output.CardClass);
            Assert.AreEqual(testWeapon.Rarity, output.Rarity);
            Assert.AreEqual(testWeapon.Cost, output.Cost);
            Assert.AreEqual(testWeapon.Attack, output.Attack);
            Assert.AreEqual(testWeapon.Durability, output.Durability);
            Assert.AreEqual(testWeapon.Text, output.Text);
        }
Example #3
0
        public void DecodeMinionCardTest()
        {
            var decoder = new scfdivineFormatDecoder();
            var input   =
                "Tirion Fordring @ Paladin |  | Minion | L | 8 | 6/6 || $DV$. $T$. $DR$: Equip a 5/3 Ashbringer. &";

            var output = decoder.DecodeCard(input);

            Assert.AreEqual(testMinion.Name, output.Name);
            Assert.AreEqual(testMinion.Type, output.Type);
            Assert.AreEqual(testMinion.CardClass, output.CardClass);
            Assert.AreEqual(testMinion.Rarity, output.Rarity);
            Assert.AreEqual(testMinion.Cost, output.Cost);
            Assert.AreEqual(testMinion.Attack, output.Attack);
            Assert.AreEqual(testMinion.Health, output.Health);
            Assert.AreEqual(testMinion.Text, output.Text);
        }