mock_spells_Problem.h 705 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * mock_spells_Problem.h part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #pragma once
  11. #include <vcmi/spells/Magic.h>
  12. #include "../../lib/texts/MetaString.h"
  13. namespace spells
  14. {
  15. class ProblemMock : public Problem
  16. {
  17. public:
  18. void add(MetaString && description, Severity severity = CRITICAL) override
  19. {
  20. //TODO: do something with description
  21. add(severity);
  22. log.push_back(description.toString());
  23. }
  24. MOCK_METHOD1(add, void(Severity));
  25. MOCK_CONST_METHOD1(getAll, void(std::vector<std::string> &));
  26. std::vector<std::string> log;
  27. };
  28. }