public void InsertCards() { ICard toInsert = new ZombicideCard("TestCard", "1 Walker", "2 Walker", "2 Walker", "2 Walker"); ICardDeck deck = new GenericDeck(); deck.InsertCard(toInsert); Assert.AreEqual(1, deck.CardsInDeck, "1 Card Inserted"); deck.InsertCard(toInsert); Assert.AreEqual(2, deck.CardsInDeck, "2 Card Inserted, possible to insert card more than once"); }
public void ModifyinDeckAfterCreation() { ICardDeck deck = new GenericDeck(); ICard toInsert = new ZombicideCard("TestCard", "1 Walker", "2 Walker", "2 Walker", "2 Walker"); deck.InsertCard(toInsert); var session = deck.StartNewSession(); Assert.AreEqual(1, session.CardsRemaining, " Should have 1 cards remaining."); deck.InsertCard(toInsert); Assert.AreEqual(1, session.CardsRemaining, "Modifing deck should not modify sesson."); }
public void DrawCard() { ICardDeck deck = new GenericDeck(); ICard toInsert = new ZombicideCard("TestCard", "1 Walker", "2 Walker", "2 Walker", "2 Walker"); deck.InsertCard(toInsert); var session = deck.StartNewSession(); Assert.AreEqual(1, session.CardsRemaining, " Should have 1 cards remaining."); ICard drawnCard = session.DrawCard(); Assert.IsNotNull(drawnCard); Assert.AreEqual(toInsert, drawnCard); Assert.AreEqual(0, session.CardsRemaining); drawnCard = session.DrawCard(); Assert.IsNull(drawnCard); }
public void InsertCardsNull() { ICardDeck deck = new GenericDeck(); deck.InsertCard(null); Assert.AreEqual(0, deck.CardsInDeck, "Null is no card"); }