Explorar o código

Improve event test namespace

Patrick-Christopher Mattulat %!s(int64=2) %!d(string=hai) anos
pai
achega
a54271d290

+ 2 - 2
test/cases/event/EventManagerTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-27
- * Changed:         2023-02-04
+ * Changed:         2023-02-05
  *
  * */
 
@@ -15,7 +15,7 @@ using namespace ls::std::core;
 using namespace ls::std::core::type;
 using namespace ls::std::event;
 using namespace ::std;
-using namespace ls_std_event_test;
+using namespace test::event;
 
 namespace
 {

+ 2 - 2
test/cases/event/NarratorTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-14
- * Changed:         2023-02-04
+ * Changed:         2023-02-05
  *
  * */
 
@@ -16,7 +16,7 @@ using namespace ls::std::core;
 using namespace ls::std::core::interface_type;
 using namespace ls::std::event;
 using namespace ::std;
-using namespace ls_std_event_test;
+using namespace test::event;
 
 namespace
 {

+ 3 - 3
test/classes/event/Colour.cpp

@@ -9,14 +9,14 @@
 
 #include "Colour.hpp"
 
-ls_std_event_test::Colour::Colour(const ::std::string &_value) : ls::std::core::Class("Colour")
+test::event::Colour::Colour(const ::std::string &_value) : ls::std::core::Class("Colour")
 {
   this->value = _value;
 }
 
-ls_std_event_test::Colour::~Colour() = default;
+test::event::Colour::~Colour() = default;
 
-::std::string ls_std_event_test::Colour::getValue() const
+::std::string test::event::Colour::getValue() const
 {
   return this->value;
 }

+ 1 - 1
test/classes/event/Colour.hpp

@@ -12,7 +12,7 @@
 
 #include <ls-std/ls-std-core.hpp>
 
-namespace ls_std_event_test
+namespace test::event
 {
   class Colour : public ls::std::core::Class
   {

+ 5 - 7
test/classes/event/DailyNewsAgency.cpp

@@ -10,14 +10,12 @@
 #include "DailyNewsAgency.hpp"
 #include <ls-std/ls-std-event.hpp>
 
-// TODO: rename namespace
-
-ls_std_event_test::DailyNewsAgency::DailyNewsAgency() : ls_std_event_test::NewsAgency("DailyNewsAgency")
+test::event::DailyNewsAgency::DailyNewsAgency() : test::event::NewsAgency("DailyNewsAgency")
 {}
 
-ls_std_event_test::DailyNewsAgency::~DailyNewsAgency() = default;
+test::event::DailyNewsAgency::~DailyNewsAgency() = default;
 
-void ls_std_event_test::DailyNewsAgency::listen(const ls::std::core::Class &_info)
+void test::event::DailyNewsAgency::listen(const ls::std::core::Class &_info)
 {
   ls::std::event::Event event = dynamic_cast<const ls::std::event::Event &>(_info);
 
@@ -27,12 +25,12 @@ void ls_std_event_test::DailyNewsAgency::listen(const ls::std::core::Class &_inf
   }
 }
 
-void ls_std_event_test::DailyNewsAgency::clear()
+void test::event::DailyNewsAgency::clear()
 {
   this->news.clear();
 }
 
-::std::string ls_std_event_test::DailyNewsAgency::getNews()
+::std::string test::event::DailyNewsAgency::getNews()
 {
   return this->news;
 }

+ 2 - 2
test/classes/event/DailyNewsAgency.hpp

@@ -16,9 +16,9 @@
 #include <memory>
 #include <string>
 
-namespace ls_std_event_test
+namespace test::event
 {
-  class DailyNewsAgency : public ls_std_event_test::NewsAgency, public ls::std::core::interface_type::IListener
+  class DailyNewsAgency : public test::event::NewsAgency, public ls::std::core::interface_type::IListener
   {
     public:
 

+ 5 - 5
test/classes/event/GossipNewsAgency.cpp

@@ -10,12 +10,12 @@
 #include "GossipNewsAgency.hpp"
 #include <ls-std/ls-std-event.hpp>
 
-ls_std_event_test::GossipNewsAgency::GossipNewsAgency() : ls_std_event_test::NewsAgency("GossipNewsAgency")
+test::event::GossipNewsAgency::GossipNewsAgency() : test::event::NewsAgency("GossipNewsAgency")
 {}
 
-ls_std_event_test::GossipNewsAgency::~GossipNewsAgency() = default;
+test::event::GossipNewsAgency::~GossipNewsAgency() = default;
 
-void ls_std_event_test::GossipNewsAgency::listen(const ls::std::core::Class &_info)
+void test::event::GossipNewsAgency::listen(const ls::std::core::Class &_info)
 {
   ls::std::event::Event event = dynamic_cast<const ls::std::event::Event &>(_info);
 
@@ -30,12 +30,12 @@ void ls_std_event_test::GossipNewsAgency::listen(const ls::std::core::Class &_in
   }
 }
 
-void ls_std_event_test::GossipNewsAgency::clear()
+void test::event::GossipNewsAgency::clear()
 {
   this->news.clear();
 }
 
-::std::string ls_std_event_test::GossipNewsAgency::getNews()
+::std::string test::event::GossipNewsAgency::getNews()
 {
   return this->news;
 }

+ 2 - 2
test/classes/event/GossipNewsAgency.hpp

@@ -16,9 +16,9 @@
 #include <memory>
 #include <string>
 
-namespace ls_std_event_test
+namespace test::event
 {
-  class GossipNewsAgency : public ls_std_event_test::NewsAgency, public ls::std::core::interface_type::IListener
+  class GossipNewsAgency : public test::event::NewsAgency, public ls::std::core::interface_type::IListener
   {
     public:
 

+ 2 - 2
test/classes/event/GossipNewsEvent.cpp

@@ -9,10 +9,10 @@
 
 #include "GossipNewsEvent.hpp"
 
-ls_std_event_test::GossipNewsEvent::GossipNewsEvent(const ::std::string &_news) : ls::std::event::Event("GossipNewsEvent")
+test::event::GossipNewsEvent::GossipNewsEvent(const ::std::string &_news) : ls::std::event::Event("GossipNewsEvent")
 {
   ls::std::core::type::event_parameter newsParameter = ::std::make_pair("news", _news);
   this->addParameter(newsParameter);
 }
 
-ls_std_event_test::GossipNewsEvent::~GossipNewsEvent() = default;
+test::event::GossipNewsEvent::~GossipNewsEvent() = default;

+ 1 - 1
test/classes/event/GossipNewsEvent.hpp

@@ -13,7 +13,7 @@
 #include <ls-std/ls-std-event.hpp>
 #include <string>
 
-namespace ls_std_event_test
+namespace test::event
 {
   class GossipNewsEvent : public ls::std::event::Event
   {

+ 3 - 3
test/classes/event/NewsAgency.cpp

@@ -9,12 +9,12 @@
 
 #include "NewsAgency.hpp"
 
-ls_std_event_test::NewsAgency::NewsAgency(::std::string _agencyName) : agencyName(::std::move(_agencyName))
+test::event::NewsAgency::NewsAgency(::std::string _agencyName) : agencyName(::std::move(_agencyName))
 {}
 
-ls_std_event_test::NewsAgency::~NewsAgency() = default;
+test::event::NewsAgency::~NewsAgency() = default;
 
-::std::string ls_std_event_test::NewsAgency::getName()
+::std::string test::event::NewsAgency::getName()
 {
   return this->agencyName;
 }

+ 1 - 1
test/classes/event/NewsAgency.hpp

@@ -12,7 +12,7 @@
 
 #include <string>
 
-namespace ls_std_event_test
+namespace test::event
 {
   class NewsAgency
   {

+ 2 - 2
test/classes/event/SeriousNewsEvent.cpp

@@ -9,10 +9,10 @@
 
 #include "SeriousNewsEvent.hpp"
 
-ls_std_event_test::SeriousNewsEvent::SeriousNewsEvent(const ::std::string &_news) : ls::std::event::Event("SeriousNewsEvent")
+test::event::SeriousNewsEvent::SeriousNewsEvent(const ::std::string &_news) : ls::std::event::Event("SeriousNewsEvent")
 {
   ls::std::core::type::event_parameter newsParameter = ::std::make_pair("news", _news);
   this->addParameter(newsParameter);
 }
 
-ls_std_event_test::SeriousNewsEvent::~SeriousNewsEvent() = default;
+test::event::SeriousNewsEvent::~SeriousNewsEvent() = default;

+ 1 - 1
test/classes/event/SeriousNewsEvent.hpp

@@ -13,7 +13,7 @@
 #include <ls-std/ls-std-event.hpp>
 #include <string>
 
-namespace ls_std_event_test
+namespace test::event
 {
   class SeriousNewsEvent : public ls::std::event::Event
   {

+ 4 - 4
test/classes/event/TestDataCar.cpp

@@ -9,17 +9,17 @@
 
 #include "TestDataCar.hpp"
 
-ls_std_event_test::TestDataCar::TestDataCar() : color("white")
+test::event::TestDataCar::TestDataCar() : color("white")
 {}
 
-ls_std_event_test::TestDataCar::~TestDataCar() = default;
+test::event::TestDataCar::~TestDataCar() = default;
 
-::std::string ls_std_event_test::TestDataCar::getColor()
+::std::string test::event::TestDataCar::getColor()
 {
   return this->color;
 }
 
-void ls_std_event_test::TestDataCar::setColor(::std::string _color)
+void test::event::TestDataCar::setColor(::std::string _color)
 {
   this->color = ::std::move(_color);
 }

+ 1 - 1
test/classes/event/TestDataCar.hpp

@@ -12,7 +12,7 @@
 
 #include <string>
 
-namespace ls_std_event_test
+namespace test::event
 {
   class TestDataCar
   {

+ 4 - 4
test/classes/event/TestDataMercedesCar.cpp

@@ -10,14 +10,14 @@
 #include "TestDataMercedesCar.hpp"
 #include "Colour.hpp"
 
-ls_std_event_test::TestDataMercedesCar::TestDataMercedesCar() : TestDataCar()
+test::event::TestDataMercedesCar::TestDataMercedesCar() : TestDataCar()
 {
   this->setColor("blue");
 }
 
-ls_std_event_test::TestDataMercedesCar::~TestDataMercedesCar() = default;
+test::event::TestDataMercedesCar::~TestDataMercedesCar() = default;
 
-void ls_std_event_test::TestDataMercedesCar::listen(const ls::std::core::Class &_info)
+void test::event::TestDataMercedesCar::listen(const ls::std::core::Class &_info)
 {
-  this->setColor(dynamic_cast<const ls_std_event_test::Colour &>(_info).getValue());
+  this->setColor(dynamic_cast<const test::event::Colour &>(_info).getValue());
 }

+ 2 - 2
test/classes/event/TestDataMercedesCar.hpp

@@ -13,9 +13,9 @@
 #include "TestDataCar.hpp"
 #include <ls-std/ls-std-core.hpp>
 
-namespace ls_std_event_test
+namespace test::event
 {
-  class TestDataMercedesCar : public ls_std_event_test::TestDataCar, public ls::std::core::interface_type::IListener
+  class TestDataMercedesCar : public test::event::TestDataCar, public ls::std::core::interface_type::IListener
   {
     public: