Beispiel #1
0
        public void AbleToRetrieveCardByName()
        {
            const string cardName = "Seshiro the Anointed";
            var          card     = CardRepository.GetCardByName(cardName);

            Assert.IsTrue(card.Name == cardName);
        }
Beispiel #2
0
        public static bool CreateDeck(string deckName, string commanderName)
        {
            var commander = CardRepository.GetCardByName(commanderName);

            if (commander == null)
            {
                return(false);
            }

            var deck = new DeckDm
            {
                Id        = 0,
                DeckName  = deckName,
                Commander = commander
            };

            DeckRepository.InsertDeck(deck);

            return(true);
        }
Beispiel #3
0
 public static CardVm GetCardByName(string cardName)
 {
     return(CardMapper.Map(CardRepository.GetCardByName(cardName)));
 }