def test_get_stack(self):
     model = StackViewModel()
     model.set_input_value(1)
     model.input_click()
     model.set_input_value(2)
     model.input_click()
     self.assertEqual(model.get_stack_values(), [1, 2])
 def test_output_result_logging(self):
     model = StackViewModel()
     model.set_input_value(3)
     model.input_click()
     model.set_input_value(10)
     model.input_click()
     model.output_click()
     self.assertEqual('Получено число 10', model.logger.get_last_message())
 def test_full_stack_logging(self):
     model = StackViewModel()
     model.set_size_value(2)
     model.size_click()
     model.set_input_value(10)
     model.input_click()
     model.set_input_value(6)
     model.input_click()
     self.assertEqual('Стэк переполнен', model.logger.get_last_message())
 def test_validate_with_invalide_input_value_logging(self):
     model = StackViewModel()
     model.set_input_value('f')
     model.input_click()
     self.assertEqual('Введение данных неверного типа',
                      model.logger.get_last_message())
 def test_validate_with_valide_input_value_logging(self):
     model = StackViewModel()
     model.set_input_value(6)
     model.input_click()
     self.assertEqual('Число 6 добавлено в стек',
                      model.logger.get_last_message())
 def test_input_output_result(self):
     model = StackViewModel()
     model.set_input_value(10)
     model.input_click()
     model.output_click()
     self.assertEqual(model.get_pop_result(), 10)
 def test_empty_stack_output_result_logging(self):
     model = StackViewModel()
     model.set_input_value(10)
     model.input_click()
     model.output_click()
     self.assertEqual('Стэк пуст', model.logger.get_last_message())