[Fact]
publicvoidNot_Have_Duplicate_Cards()
{
var cards = deck.Cards;
cards.Should().OnlyHaveUniqueItems();
}
Deck Specifications
A_Deck_Of_Cards_Must...
[Fact]
publicvoidOpen_With_Cards_In_Order()
{
var cards = deck.Cards;
cards.Should().BeInAscendingOrder();
}
Deck Specifications
A_Deck_Of_Cards_Must...
[Fact]
publicvoidShuffle_Cards_Into_A_Random_Order()
{
deck.Shuffle();
var cards = deck.Cards;
cards.Should().NotBeInAscendingOrder();
}
Deck Specifications
A_Deck_Of_Cards_Must...
[Fact]
publicvoidDraw_The_Top_Card_From_The_Deck()
{
var expectedCard =
new PlayingCard(PlayingCard.CardValue.ACE, PlayingCard.CardSuit.HEARTS);
var card = deck.DrawCard();
card.Should().NotBeNull().And.Be(expectedCard);
}
Deck Specifications
A_Deck_Of_Cards_Must...
[Fact]
publicvoidRemove_The_Card_From_The_Deck_When_Drawn()
{
var expectedCard =
new PlayingCard(PlayingCard.CardValue.ACE, PlayingCard.CardSuit.HEARTS);
deck.DrawCard();
deck.Cards.Should().NotContain(expectedCard);
}