public void SpadesTwoToSix() { // ARRANGE var game = StraightFlushGameBuilder.Spades() .From(Rank.TWO).To(Rank.SIX); // ACT var result = new StraightFlush().Evaluate(game); // ASSERT Assert.IsTrue(result.Success()); Assert.AreSame(game.Cards, result.UsedCards); }
public void DiamondsFiveToNine() { // ARRANGE var game = StraightFlushGameBuilder.Diamonds() .From(Rank.FIVE).To(Rank.NINE); // ACT var result = new StraightFlush().Evaluate(game); // ASSERT Assert.IsTrue(result.Success()); Assert.AreSame(game.Cards, result.UsedCards); }
public void Straight() { // ARRANGE var cards = StraightFlushGameBuilder.Diamonds() .From(Rank.TWO).To(Rank.SIX).Cards.ToArray(); var game = new Game( cards[0], cards[1], cards[2], cards[3], new Card(cards[4].Rank, Suit.CLUBS)); // ACT new GameEvaluator().Evaluate(game); // ASSERT Assert.AreEqual(GameCategory.STRAIGHT, game.Category); }
public void TwoToSix() { // ARRANGE var cards = StraightFlushGameBuilder.Spades() .From(Rank.TWO).To(Rank.SIX).Cards.ToArray(); var game = new Game( cards[0], cards[1], cards[2], cards[3], new Card(cards[4].Rank, Suit.CLUBS)); // ACT var result = new Straight().Evaluate(game); // ASSERT Assert.IsTrue(result.Success()); Assert.AreSame(game.Cards, result.UsedCards); }
public void FiveToNine() { // ARRANGE var cards = StraightFlushGameBuilder.Diamonds() .From(Rank.FIVE).To(Rank.NINE).Cards.ToArray(); var game = new Game( cards[0], cards[1], cards[2], cards[3], new Card(cards[4].Rank, Suit.CLUBS)); // ACT var result = new Straight().Evaluate(game); // ASSERT Assert.IsTrue(result.Success()); Assert.AreSame(game.Cards, result.UsedCards); }