1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- /*
- * Author: Patrick-Christopher Mattulat
- * Company: Lynar Studios
- * E-Mail: webmaster@lynarstudios.com
- * Created: 2020-08-16
- * Changed: 2023-05-15
- *
- * */
- #include <gtest/gtest.h>
- #include <ls-std-core-test.hpp>
- #include <ls-std/ls-std-core.hpp>
- using ls::std::core::Class;
- using ls::std::core::IllegalArgumentException;
- using std::make_shared;
- using std::shared_ptr;
- using test::core::ClassWrapper;
- using testing::Test;
- namespace
- {
- class ClassTest : public Test
- {
- public:
- ClassTest() = default;
- ~ClassTest() override = default;
- };
- TEST_F(ClassTest, constructor_empty_parameter)
- {
- EXPECT_THROW(
- {
- try
- {
- Class object{""};
- }
- catch (const IllegalArgumentException &_exception)
- {
- throw;
- }
- },
- IllegalArgumentException);
- }
- TEST_F(ClassTest, destructor)
- {
- auto object = make_shared<ClassWrapper>();
- EXPECT_CALL(*object, Die());
- }
- TEST_F(ClassTest, getClassName)
- {
- Class object{"Class"};
- ASSERT_STREQ("Class", object.getClassName().c_str());
- }
- }
|