MockJniApi.hpp 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2023-04-07
  6. * Changed: 2023-04-11
  7. *
  8. * */
  9. #ifndef LS_STD_MOCK_JNI_API_HPP
  10. #define LS_STD_MOCK_JNI_API_HPP
  11. #include <gmock/gmock.h>
  12. #include <ls-std/core/interface/IJniApi.hpp>
  13. namespace test::core::jni
  14. {
  15. class MockJniApi : public ls::std::core::experimental::interface_type::IJniApi
  16. {
  17. public:
  18. MockJniApi();
  19. ~MockJniApi() noexcept override;
  20. MOCK_METHOD(jboolean, callBooleanMethod, (jobject _javaObject, jmethodID _methodId), (override));
  21. MOCK_METHOD(jbyte, callByteMethod, (jobject _javaObject, jmethodID _methodINd), (override));
  22. MOCK_METHOD(jchar, callCharMethod, (jobject _javaObject, jmethodID _methodId), (override));
  23. MOCK_METHOD(jdouble, callDoubleMethod, (jobject _javaObject, jmethodID _methodId), (override));
  24. MOCK_METHOD(jfloat, callFloatMethod, (jobject _javaObject, jmethodID _methodId), (override));
  25. MOCK_METHOD(jint, callIntMethod, (jobject _javaObject, jmethodID _methodId), (override));
  26. MOCK_METHOD(jlong, callLongMethod, (jobject _javaObject, jmethodID _methodId), (override));
  27. MOCK_METHOD(jshort, callShortMethod, (jobject _javaObject, jmethodID _methodId), (override));
  28. MOCK_METHOD(jclass, findClass, (const ::std::string &_classPath), (override));
  29. MOCK_METHOD(jmethodID, getMethodId, (jclass _javaClass, const char *_methodIdentifier, const char *_methodSignature), (override));
  30. };
  31. }
  32. #endif