Beispiel #1
0
 def test_by_default_button_is_disable(self):
     model = QuadraticEquationViewModel()
     self.assertEqual('disabled', model.is_button_enable())
Beispiel #2
0
 def test_when_clear_c_button_disabled(self):
     model = QuadraticEquationViewModel(1, -1, 1)
     model.set_c(None)
     self.assertEqual('disabled', model.is_button_enable())
Beispiel #3
0
 def test_when_enter_incorrect_values(self):
     model = QuadraticEquationViewModel('-1a', '123', 'q9')
     self.assertEqual('disabled', model.is_button_enable())
Beispiel #4
0
 def test_when_enter_a_b_c_button_enabled(self):
     model = QuadraticEquationViewModel(1, 1, 1)
     self.assertTrue(model.is_button_enable())