public void SortCheckWorks() { var deck = new PokerDeck_52(false); deck.PutOnBottom(new PokerCard(PokerCard.Ranks.Two, PokerCard.Suits.Spades)); deck.PutOnBottom(new PokerCard(PokerCard.Ranks.Five, PokerCard.Suits.Spades)); deck.PutOnBottom(new PokerCard(PokerCard.Ranks.Ace, PokerCard.Suits.Hearts)); deck.PutOnBottom(new PokerCard(PokerCard.Ranks.Ace, PokerCard.Suits.Spades)); Assert.IsTrue(deck.IsSorted()); deck.PutOnBottom(new PokerCard(PokerCard.Ranks.Three, PokerCard.Suits.Spades)); Assert.IsFalse(deck.IsSorted()); }
public void PokerDeckSorted() { //Note: This test is useless if shuffle fails var deck = new PokerDeck_52(); deck.Shuffle(); deck.Sort(); Assert.IsTrue(deck.IsSorted()); }
public void PokerDeckShuffled() { //I'll leave deep analysis to the math majors. If the list isn't still in order, it's shuffled //Visual inspection should give a good idea of how effective we were //I mainly just want to make sure it doesn't crash. var deck = new PokerDeck_52(); deck.Shuffle(); Assert.IsFalse(deck.IsSorted()); }