public void PutCardToBeanFieldTest() { var target = new BeanField(); Card card = new BohnanzaCard(BohnanzaCard.CardEnum.CocoaBeans); target.PutCardToBeanField(card); Assert.IsTrue(target.NumberOfCards == 1); }
/// <summary> /// Provides a method for creating a Al Cabohne unshaken card deck. /// </summary> /// <returns></returns> public static DeckTypes.CardPile ProduceBohnanzaDeck() { //Define a result var result = new DeckTypes.CardPile(); //Iterate over each type of card foreach( BohnanzaCard.CardEnum value in Enum.GetValues(typeof(BohnanzaCard.CardEnum)) ) { //Get the number of cards we should have in the game of this type var card = new BohnanzaCard(value); //Number of cards of this type in the whole game int numberOfCards = card.TotalNumberOfCards; //Iterate a number of times until we added enough cards of this type to the deck do { //Get a card of this type card = new BohnanzaCard(value); //Add this card to the cardPile result.PutCard(card); //Decrement number of cards numberOfCards--; } while (numberOfCards > 0); } return result; }
public void FirstCardOnBeanFieldTest() { var target = new BeanField(); Card card = new BohnanzaCard(BohnanzaCard.CardEnum.CocoaBeans); target.PutCardToBeanField(card); var actual = target.FirstCardOnBeanField; Assert.AreEqual(card,actual); }
public void PutCardToBeanFieldTest() { var target = _player; Card card = new BohnanzaCard(BohnanzaCard.CardEnum.CoffeeBeans); var beanField = new BeanField(); var actual = target.PutCardToBeanField(card, beanField); Assert.AreEqual(null, actual); }
public void EqualsTest() { var target = new BohnanzaCard(BohnanzaCard.CardEnum.BlueBeans); bool actual = target.Equals(bluebeancard); Assert.IsTrue(actual); }
public void BohnanzaCardConstructorTest() { var target = new BohnanzaCard(BohnanzaCard.CardEnum.CocoaBeans); Assert.IsInstanceOfType(target, typeof (BohnanzaCard)); }
public static void MyClassInitialize(TestContext testContext) { bluebeancard = new BohnanzaCard(BohnanzaCard.CardEnum.BlueBeans); }