public void Play_initial_not_trump_suit_when_can_trump() { var sut = FollowSuit.MustTrump; var trickPile = CreateTrickPileWithSixClubs(sut, Trump.Static(Stub.Suits.Spades)); var hand = CreateHandWithCards(Stub.Suits.Clubs, Stub.Suits.Diamonds, Stub.Suits.Spades); var otherSuitCard = hand.CardsInPile[0]; var result = sut.Play(trickPile, hand, otherSuitCard); Assert.AreEqual(FollowSuitPlayResult.Played, result); }
public void Play_other_not_trump_suit_when_pile_already_has_trump_not_following_suit_and_can_follow_initial_suit() { var sut = FollowSuit.MustTrump; var trickPile = CreateTrickPileWithSixClubs(sut, Trump.Static(Stub.Suits.Spades)); trickPile.Push(new Card(Stub.Ranks.Default[11], Stub.Suits.Spades), PilePosition.Top); var hand = CreateHandWithCards(Stub.Suits.Clubs, Stub.Suits.Diamonds, Stub.Suits.Spades); var otherSuitCard = hand.CardsInPile[1]; var result = sut.Play(trickPile, hand, otherSuitCard); Assert.AreEqual(FollowSuitPlayResult.Revoke, result); }
public void Play_higher_trump_to_beat_when_pile_already_has_trump_not_following_suit() { var sut = FollowSuit.MustTrump; var trickPile = CreateTrickPileWithSixClubs(sut, Trump.Static(Stub.Suits.Spades)); trickPile.Push(new Card(Stub.Ranks.Six, Stub.Suits.Spades), PilePosition.Top); var hand = CreateHandWithCards(Stub.Suits.Hearts, Stub.Suits.Spades); var otherTrumpSuitCard = hand.CardsInPile[1]; var result = sut.Play(trickPile, hand, otherTrumpSuitCard); Assert.AreEqual(FollowSuitPlayResult.Ruff, result); }