public void SnapHandAddOneCorrectCard() { IHand hand = new SnapHand(); var card = new SnapCard(Suit.Spades, Rank.Ace); hand.Add(card); Assert.AreEqual(card, hand.Peek()); }
public void SnapHandPeekCorrectCard() { // Arrange IHand hand = new SnapHand(); var cards = new List <SnapCard> { new SnapCard(Suit.Spades, Rank.Ace), new SnapCard(Suit.Spades, Rank.Two), new SnapCard(Suit.Diamonds, Rank.Three), new SnapCard(Suit.Spades, Rank.Four), new SnapCard(Suit.Spades, Rank.Five) }; foreach (var card in cards) { hand.Add(card); } // Act var check = cards.First(); var test = hand.Peek(); Assert.AreEqual(check.Rank, test.Rank); Assert.AreEqual(check.Suit, test.Suit); }