CHeroClassTest.cpp 916 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * CHeroClassTest.cpp, 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. #include "StdInc.h"
  11. #include "../../lib/CHeroHandler.h"
  12. namespace test
  13. {
  14. using namespace ::testing;
  15. class CHeroClassTest : public Test
  16. {
  17. public:
  18. MOCK_METHOD4(registarCb, void(int32_t, int32_t, const std::string &, const std::string &));
  19. protected:
  20. std::shared_ptr<CHeroClass> subject;
  21. void SetUp() override
  22. {
  23. subject = std::make_shared<CHeroClass>();
  24. }
  25. };
  26. TEST_F(CHeroClassTest, RegistersIconsDoesNothing)
  27. {
  28. auto cb = [this](auto && PH1, auto && PH2, auto && PH3, auto && PH4)
  29. {
  30. registarCb(std::forward<decltype(PH1)>(PH1), std::forward<decltype(PH2)>(PH2), std::forward<decltype(PH3)>(PH3), std::forward<decltype(PH4)>(PH4));
  31. };
  32. subject->registerIcons(cb);
  33. }
  34. }