public void TestCardStackGetsRightNumberOfCardsFromPackage() { CardStack stack = new CardStack(); // Get 5 cards 4 times stack.AddPackage(_package); stack.AddPackage(_package); stack.AddPackage(_package); stack.AddPackage(_package); Assert.AreEqual(20, stack.CardCollection.Count); }
public void TestCardDeckGetsMaximumFourCards() { CardStack stack = new CardStack(); CardDeck deck = new CardDeck(); stack.AddPackage(_package); stack.AddPackage(_package); deck.AddCard(stack.CardCollection[0]); deck.AddCard(stack.CardCollection[1]); deck.AddCard(stack.CardCollection[2]); deck.AddCard(stack.CardCollection[3]); deck.RemoveCard(deck.CardCollection[2]); deck.AddCard(stack.CardCollection[4]); Assert.AreEqual(4, deck.CardCollection.Count); }
public void TestCardStackGetsRightCardsFromPackage() { CardStack stack = new CardStack(); stack.AddPackage(_package); Assert.AreEqual("Gandalf", stack.CardCollection[0].Name); }
public void AddCardsToStack(CardPackage pack) { if (Coins > 0) { Stack.AddPackage(pack); Coins -= 5; } }
public void TestCardStackGetsCardsFromPackage() { // Arrange CardStack stack = new CardStack(); // Act stack.AddPackage(_package); // Assert Assert.IsNotNull(stack.CardCollection); Assert.AreEqual("Gandalf", stack.CardCollection[0].Name); }
public void TestGetRandomCardFromDeck() { CardStack stack = new CardStack(); CardDeck deck = new CardDeck(); stack.AddPackage(_package); deck.AddCard(stack.CardCollection[0]); deck.AddCard(stack.CardCollection[1]); deck.AddCard(stack.CardCollection[2]); deck.AddCard(stack.CardCollection[3]); Card randomCard = deck.GetRandomCard(); Assert.NotNull(randomCard); Console.WriteLine("The name of the random Monster/Spell is: " + randomCard.Name); }