def test_determines_if_there_are_five_cards_in_a_row(self):
        validator = StraightValidator(cards=self.cards)

        self.assertEqual(
            validator.is_valid(),
            True
        )
    def test_does_not_deem_two_consecutive_cards_as_straight(self):
        cards = [
            Card(rank="6", suit="Hearts"),
            Card(rank="7", suit="Diamonds")
        ]
        validator = StraightValidator(cards=cards)

        self.assertEqual(validator.is_valid(), False)
    def test_does_not_figure_a_2_hand_card_as_Straight(self):
        two_cards = [
            Card(rank="2", suit="Spades"),
            Card(rank="3", suit="Hearts")
        ]

        validator = StraightValidator(cards=two_cards)

        self.assertEqual(validator.is_valid(), False)
    def test_returns_five_highest_cards_in_a_row(self):
        validator = StraightValidator(cards=self.cards)

        self.assertEqual(
            validator.valid_cards(),
            [
                self.seven_of_clubs,
                self.eight_of_spades,
                self.nine_of_spades,
                self.ten_of_clubs,
                self.jack_of_spades
            ]
        )
    def test_returns_five_highest_cards_in_a_row(self):
        validator = StraightValidator(cards=self.cards)

        self.assertEqual(
            validator.valid_cards(),
            [
                self.seven,
                self.eight,
                self.nine,
                self.ten,
                self.jack
            ]
        )
 def test_returns_a_straight_from_card_collection(self):
     validator = StraightValidator(cards=self.cards)
     self.assertEqual(validator.valid_cards(), [
         self.five_of_spades, self.six_of_hearts, self.seven_of_diamonds,
         self.eight_of_clubs, self.nine_of_clubs
     ])
    def test_validates_that_cards_have_a_straight(self):
        validator = StraightValidator(cards=self.cards)

        self.assertEqual(validator.is_valid(), True)