public void ShouldHaveExpectedProperties([Values()] eSuit suit, [Values()] eRank rank) { var card = new Card(rank, suit); Assert.That(card.Rank, Is.EqualTo(rank)); Assert.That(card.Suit, Is.EqualTo(suit)); }
public void Sort_Should_SortAscendingBySuitThenRank([Values()] eSuit suit, [Values()] eRank rank) { deck.Shuffle(); deck.Sort(); var expectedIndex = (int)suit * 13 + (int)rank; var card = deck.Cards[expectedIndex]; Assert.That(card.Rank, Is.EqualTo(rank)); Assert.That(card.Suit, Is.EqualTo(suit)); }
public Card(eSuit Suit, eValue Value) { this.Suit = Suit; this.Value = Value; }
public Card(eRank rank, eSuit suit) { this.rank = rank; this.suit = suit; }
public Card(eSuit suit, eRank rank) { Suit = suit; Rank = rank; }
public Card(eRank rank, eSuit suit) { this.rank = rank; this.suit = suit; }
public Card(eRank rank, eSuit suit) { Rank = rank; Suit = suit; }
public Card(eRank rank, eSuit suit) { this.rank = rank; this.suit = suit; image = (Bitmap)Properties.Resources.ResourceManager.GetObject(rank.ToString() + suit.ToString()); }
public void Should_HaveOneOfEachCard([Values()] eSuit suit, [Values()] eRank rank) { Assert.That(deck.Cards.SingleOrDefault(c => c.Suit == suit && c.Rank == rank), Is.Not.Null); }