public void DeckOfCards_CreateCardDeck_CountCards_FiftyTwoCard() { DeckOfCards deckOfCards = new DeckOfCards(); List <NewGame.Snap.PlayingCard> pc = deckOfCards.CreateDeckOfCards(); Assert.IsTrue(pc.Count.Equals(52)); }
public void DeckOfCards_ShuffleCards_CheckCardsDiffer_DifferentList() { DeckOfCards deckOfCards = new DeckOfCards(); List <PlayingCard> pcbefore = deckOfCards.CreateDeckOfCards(); List <PlayingCard> pcafter = deckOfCards.ShuffleCards(pcbefore); Assert.IsFalse(pcbefore.Equals(pcafter)); }
public void DeckOfCards_CreateCardDeck_CountCardsInSuits_ThirteenCards() { DeckOfCards deckOfCards = new DeckOfCards(); List <NewGame.Snap.PlayingCard> pc = deckOfCards.CreateDeckOfCards(); // Check there are four different suits Assert.IsTrue(pc.GroupBy(c => c.CardValue).Count().Equals(13)); }
public void DeckOfCards_CreateCardDeck_CountSuits_FourSuits() { DeckOfCards deckOfCards = new DeckOfCards(); List <NewGame.Snap.PlayingCard> pc = deckOfCards.CreateDeckOfCards(); // Check there are four different suits Assert.IsTrue(pc.GroupBy(c => c.CardSuit).Count().Equals(4)); }
public void DeckOfCards_SelectCards_DrawCard_CardPopulated() { DeckOfCards deckOfCards = new DeckOfCards(); List <PlayingCard> shuffledDeckOfCards = deckOfCards.ShuffleCards(deckOfCards.CreateDeckOfCards()); PlayingCard playingCard = deckOfCards.SelectCard(shuffledDeckOfCards); Assert.IsTrue(playingCard != null); }
public void DeckOfCards_SelectCards_DrawTwoCards_CheckCardsDiffer() { DeckOfCards deckOfCards = new DeckOfCards(); List <PlayingCard> shuffledDeckOfCards = deckOfCards.ShuffleCards(deckOfCards.CreateDeckOfCards()); PlayingCard firstPlayingCard = deckOfCards.SelectCard(shuffledDeckOfCards); PlayingCard secondPlayingCard = deckOfCards.SelectCard(shuffledDeckOfCards); Assert.IsFalse(firstPlayingCard.Equals(secondPlayingCard)); }