Ejemplo n.º 1
0
 def test_first_valid_second_valid_plus_calculate(self):
     viewmodel = RationalNumberViewModel()
     viewmodel.set_first_number("12/3")
     viewmodel.set_second_number("2/7")
     viewmodel.set_operation("+")
     viewmodel.calculate()
     self.assertEqual("30/7", viewmodel.get_result())
Ejemplo n.º 2
0
 def test_number_updated_result_empty(self):
     viewmodel = RationalNumberViewModel()
     viewmodel.set_first_number("12/3")
     viewmodel.set_second_number("2/7")
     viewmodel.set_operation("+")
     viewmodel.calculate()
     viewmodel.set_first_number("12/11")
     self.assertEqual("", viewmodel.get_result())