Пример #1
0
    def test_with_given_tenth_frame_triple_stike_should_return_30(self):
        frame = Frame((10, 10, 10))

        result = frame.calculate_value()
        expected = 30

        self.assertEqual(result, expected)
Пример #2
0
    def test_with_given_tenth_frame_spare_and_strike_should_return_20(self):
        frame = Frame((9, 1, 10))

        result = frame.calculate_value()
        expected = 20

        self.assertEqual(result, expected)
Пример #3
0
    def test_with_given_open_frame_should_return_correct_value(self):
        frame = Frame((0, 9))

        result = frame.calculate_value()
        expected = 9

        self.assertEqual(result, expected)
Пример #4
0
    def test_with_given_spare_should_return_10(self):
        frame = Frame((9, 1))

        result = frame.calculate_value()
        expected = 10

        self.assertEqual(result, expected)
Пример #5
0
    def test_with_given_tenth_frame_non_stike_and_non_spare_should_return_correct_value(
            self):
        frame = Frame((2, 0))

        result = frame.calculate_value()
        expected = 2

        self.assertEqual(result, expected)
Пример #6
0
    def test_with_given_tenth_frame_double_stike_and_non_strike_should_return_correct_value(
            self):
        frame = Frame((10, 10, 9))

        result = frame.calculate_value()
        expected = 29

        self.assertEqual(result, expected)