Esempio n. 1
0
    def test_it_return_3_1114_1222_with_total_7_digit_4(self):
        howmanynumbers = HowManyNumbers(7, 4)

        self.assertEqual(howmanynumbers.process(), [3, 1114, 1222])
Esempio n. 2
0
 def test_it_raises_InvalidParameterError_when_total_is_not_greater_than_0(
         self):
     with self.assertRaises(InvalidParameterError):
         HowManyNumbers(total=0)
Esempio n. 3
0
    def test_it_return_8_118_334_with_total_10_digit_3(self):
        howmanynumbers = HowManyNumbers(10, 3)

        self.assertEqual(howmanynumbers.process(), [8, 118, 334])
Esempio n. 4
0
    def test_it_return_11_129_444_with_total_12_digit_3(self):
        howmanynumbers = HowManyNumbers(12, 3)

        self.assertEqual(howmanynumbers.process(), [11, 129, 444])
Esempio n. 5
0
    def test_it_return_2_699_888_with_total_24_digit_3(self):
        howmanynumbers = HowManyNumbers(24, 3)

        self.assertEqual(howmanynumbers.process(), [3, 699, 888])
Esempio n. 6
0
    def test_it_return_4_115_223_with_total_7_digit_3(self):
        howmanynumbers = HowManyNumbers(7, 3)

        self.assertEqual(howmanynumbers.process(), [4, 115, 223])
Esempio n. 7
0
    def test_it_return_7_117_333_with_total_9_digit_3(self):
        howmanynumbers = HowManyNumbers(9, 3)

        self.assertEqual(howmanynumbers.process(), [7, 117, 333])
Esempio n. 8
0
    def test_it_return_1_112_112_with_total_4_digit_3(self):
        howmanynumbers = HowManyNumbers(4, 3)

        self.assertEqual(howmanynumbers.process(), [1, 112, 112])
Esempio n. 9
0
    def test_it_return_3_114_222_with_total_6_digit_3(self):
        howmanynumbers = HowManyNumbers(6, 3)

        self.assertEqual(howmanynumbers.process(), [3, 114, 222])
Esempio n. 10
0
    def test_it_return_1_12_12_with_total_3_digit_2(self):
        howmanynumbers = HowManyNumbers(3, 2)

        self.assertEqual(howmanynumbers.process(), [1, 12, 12])
Esempio n. 11
0
    def test_it_return_2_13_22_with_total_4_digit_2(self):
        howmanynumbers = HowManyNumbers(4, 2)

        self.assertEqual(howmanynumbers.process(), [2, 13, 22])
Esempio n. 12
0
 def test_it_raises_InvalidParameterError_when_total_is_not_integer(self):
     with self.assertRaises(InvalidParameterError):
         HowManyNumbers(total='a')
Esempio n. 13
0
    def test_it_return_1_11_11_with_total_2_digit_2(self):
        howmanynumbers = HowManyNumbers(2, 2)

        self.assertEqual(howmanynumbers.process(), [1, 11, 11])
Esempio n. 14
0
    def test_it_return_empty_array_with_total_10_digit_1(self):
        howmanynumbers = HowManyNumbers(10, 1)

        self.assertEqual(howmanynumbers.process(), [])
Esempio n. 15
0
    def test_it_return_1_2_2_with_total_2_digit_1(self):
        howmanynumbers = HowManyNumbers(2, 1)

        self.assertEqual(howmanynumbers.process(), [1, 2, 2])
Esempio n. 16
0
    def test_it_return_123_116999_566666_with_total_35_digit_6(self):
        howmanynumbers = HowManyNumbers(35, 6)

        self.assertEqual(howmanynumbers.process(), [123, 116999, 566666])