| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- /*
- * Author: Patrick-Christopher Mattulat
- * Co-Author: Claude Sonnet 4.6 (LLM)
- * Company: Lynar Studios
- * E-Mail: webmaster@lynarstudios.com
- * Created: 2023-04-07
- * Changed: 2026-06-23
- *
- * */
- #include <gtest/gtest.h>
- #include <ls-std/ls-std-core-jni.hpp>
- #include <ls-std/ls-std-core.hpp>
- #include <string>
- using ls::standard::core::IllegalArgumentException;
- using ls::standard::core::experimental::JniApi;
- using std::string;
- using testing::Test;
- namespace
- {
- class JniApiTest : public Test
- {
- public:
- JniApiTest() = default;
- ~JniApiTest() override = default;
- };
- TEST_F(JniApiTest, constructor)
- {
- EXPECT_THROW(
- {
- try
- {
- JniApi jniApi{nullptr};
- }
- catch (const IllegalArgumentException &_exception)
- {
- string expected = _exception.getName() + " thrown - Java environment is not being provided!";
- string actual = _exception.what();
- ASSERT_STREQ(expected.c_str(), actual.c_str());
- throw;
- }
- },
- IllegalArgumentException);
- }
- }
|