public void GetRankTypeShouldWorkCorrectly(ICollection <Card> playerCards, HandRankType expectedHandRankType, ICollection <CardType> expectedBestHandCards) { IHandEvaluator handEvaluator = new HandEvaluator(); var bestHand = handEvaluator.GetBestHand(playerCards.Shuffle().ToList()); Assert.Equal(expectedHandRankType, bestHand.RankType); CollectionsAssert.SameElements(expectedBestHandCards, bestHand.Cards); }
public void Save_SavesItemToDatabase_Bands() { Bands testBands = new Bands("BandOne", "Pop"); testBands.Save(); List <Bands> result = Bands.GetAllBands CollectionsAssert.AreEqual(result, testBands); }
public void GetNextCardShouldReturnAll52CardsOnce() { IDeck deck = new Deck(); var cards = new List <Card>(); for (var i = 0; i < 52; i++) { cards.Add(deck.GetNextCard()); } CollectionsAssert.SameElements(Deck.AllCards, cards); }