Esempio n. 1
0
 def test_square_of_sum_out_of_range(self):
     record = NumberRecord(number=0)
     self.assertIsNone(record.square_of_sum())
Esempio n. 2
0
 def test_square_of_sum_bigger(self):
     record = NumberRecord(number=10)
     self.assertEqual(
         record.square_of_sum(),
         3025
         )
Esempio n. 3
0
 def test_square_of_sum_huge(self):
     record = NumberRecord(number=101)
     self.assertEqual(
         record.square_of_sum(),
         26532801
         )
Esempio n. 4
0
 def test_square_of_sum_small(self):
     record = NumberRecord(number=3)
     self.assertEqual(
         record.square_of_sum(),
         36
         )