Esempio n. 1
0
    def test_returns_the_four_cards_with_the_same_rank(self):
        validator = FourOfAKindValidator(cards=self.cards)

        self.assertEqual(validator.valid_cards(), [
            self.three_0f_clubs, self.three_of_diamonds, self.three_of_hearts,
            self.three_of_spades
        ])
    def test_determines_that_four_cards_of_one_rank_are_present(self):
        validator = FourOfAKindValidator(cards = self.cards)

        self.assertEqual(
            validator.is_valid(),
            True
        )
    def test_valid_cards(self):
        validator = FourOfAKindValidator(cards=self.cards)

        self.assertEqual(validator.valid_cards(), [
            self.four_clubs, self.four_diamonds, self.four_hearts,
            self.four_spades
        ])
 def test_returns_a_4_of_a_kind_from_card_collection(self):
     validator = FourOfAKindValidator(cards=self.cards)
     self.assertEqual(validator.valid_cards(), [
         self.ten_of_hearts, self.four_of_clubs, self.four_of_diamonds,
         self.four_of_hearts, self.four_of_spades
     ])
    def test_validates_that_cards_have_a_4_of_a_kind(self):
        validator = FourOfAKindValidator(cards=self.cards)

        self.assertEqual(validator.is_valid(), True)
    def test_is_valid(self):

        validator = FourOfAKindValidator(cards=self.cards)

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