JniApiTest.cpp 828 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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-07
  7. *
  8. * */
  9. #include <gtest/gtest.h>
  10. #include <ls-std/ls-std-core-jni.hpp>
  11. #include <ls-std/ls-std-core.hpp>
  12. using ls::std::core::IllegalArgumentException;
  13. using ls::std::core::JniApi;
  14. using testing::Test;
  15. namespace
  16. {
  17. class JniApiTest : public Test
  18. {
  19. public:
  20. JniApiTest() = default;
  21. ~JniApiTest() override = default;
  22. };
  23. TEST_F(JniApiTest, constructor)
  24. {
  25. EXPECT_THROW(
  26. {
  27. try
  28. {
  29. JniApi jniApi{nullptr};
  30. }
  31. catch (const IllegalArgumentException &_exception)
  32. {
  33. throw;
  34. }
  35. },
  36. IllegalArgumentException);
  37. }
  38. }