def test_by_default_button_create_graph_disable(self): model = DAViewModel() self.assertEqual('disabled', model.get_btn_create_graph_state())
def test_when_enter_incorrect_number_button_create_graph_keeps_disabled( self): model = DAViewModel() model.set_num_vertex('some incorrect input') self.assertEqual('disabled', model.get_btn_create_graph_state())
def test_when_clear_number_button_create_graph_disabled(self): model = DAViewModel() model.set_num_vertex(None) self.assertEqual('disabled', model.get_btn_create_graph_state())
def test_when_enter_less_zero_number_button_create_graph_disabled(self): model = DAViewModel() model.set_num_vertex('-1') self.assertEqual('disabled', model.get_btn_create_graph_state())
def test_when_enter_correct_number_button_create_graph_enabled(self): model = DAViewModel() model.set_num_vertex('5') self.assertEqual('normal', model.get_btn_create_graph_state())