public void EncodeWeaponCardTest()
        {
            var encoder = new MtgEncodeFormatEncoder();

            var output         = encoder.EncodeCard(testWeapon);
            var expectedOutput =
                "|3weapon|4warrior|6common|7&^^^^|8&^^^^|9&^^|2$DR$: deal &^ damage to all minions.|1death's bite|";

            Assert.AreEqual(expectedOutput, output);
        }
        public void EncodeMinionCardTest()
        {
            var encoder = new MtgEncodeFormatEncoder();

            var output         = encoder.EncodeCard(testMinion);
            var expectedOutput =
                "|3minion|4paladin|5none|6legendary|7&^^^^^^^^|8&^^^^^^|9&^^^^^^|2$DV$. $T$. $DR$: equip a &^^^^^/&^^^ ashbringer.|1tirion fordring|";

            Assert.AreEqual(expectedOutput, output);
        }
        public void EncodeSpellCardTest()
        {
            var encoder = new MtgEncodeFormatEncoder();

            var output         = encoder.EncodeCard(testSpell);
            var expectedOutput =
                "|3spell|4mage|6common|7&^^^^|2deal $&^^^^^^ damage.|1fireball|";

            Assert.AreEqual(expectedOutput, output);
        }
Esempio n. 4
0
        public StreamEncode(CardCollection cardCollection, StreamWriter stream)
        {
            _encoder = new MtgEncodeFormatEncoder();


            _consoleLog = ConsoleLog.Instance;

            _cardCollection = cardCollection;
            _stream         = stream;
        }