Esempio n. 1
0
 def function(modulo):
     return multiply(547, 312, modulo)
Esempio n. 2
0
 def test__multiply__when_modulo_is_positive_and_second_factor_is_negative(
 ):
     # when
     result = multiply(547, -312, 10000)
     # then
     assert_that(result).is_equal_to(9336)
Esempio n. 3
0
 def test__multiply__when_modulo_is_positive_and_factors_are_negative():
     # when
     result = multiply(-547, -312, 10000)
     # then
     assert_that(result).is_equal_to(664)
Esempio n. 4
0
 def test__multiply__when_factors_are_negative__then_result_is_positive():
     # when
     result = multiply(-3, -10)
     # then
     assert_that(result).is_equal_to(30)
Esempio n. 5
0
 def test__multiply__when_first_factor_is_positive_and_second_factor_is_negative__then_result_is_negative(
 ):
     # when
     result = multiply(3, -10)
     # then
     assert_that(result).is_equal_to(-30)
Esempio n. 6
0
 def test__multiply__when_factors_are_zero():
     # when
     result = multiply(0, 0)
     # then
     assert_that(result).is_equal_to(0)
Esempio n. 7
0
 def test__multiply__when_second_factor_is_zero():
     # when
     result = multiply(14, 0)
     # then
     assert_that(result).is_equal_to(0)
Esempio n. 8
0
 def test__multiply__when_first_factor_is_zero():
     # when
     result = multiply(0, 14)
     # then
     assert_that(result).is_equal_to(0)