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