EventParameterTest.cpp 845 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2024-05-30
  6. * Changed: 2024-05-30
  7. *
  8. * */
  9. #include <gtest/gtest.h>
  10. #include <ls-std/ls-std-event.hpp>
  11. using ls::std::event::EventParameter;
  12. using testing::Test;
  13. namespace
  14. {
  15. class EventParameterTest : public Test
  16. {
  17. public:
  18. EventParameterTest() = default;
  19. ~EventParameterTest() override = default;
  20. };
  21. TEST_F(EventParameterTest, addParameter)
  22. {
  23. auto parameter = EventParameter();
  24. ASSERT_TRUE(parameter.get().empty());
  25. parameter.addParameter("blue");
  26. ASSERT_EQ(1, parameter.get().size());
  27. ASSERT_STREQ("blue", parameter.get().front().c_str());
  28. }
  29. TEST_F(EventParameterTest, get)
  30. {
  31. ASSERT_TRUE(EventParameter().get().empty());
  32. }
  33. }