Просмотр исходного кода

Merge branch 'remove-namespaces-in-tests' of public/ls-standard-library into development

patrick-christopher.mattulat 2 лет назад
Родитель
Сommit
f30b9d9247
46 измененных файлов с 1665 добавлено и 1501 удалено
  1. 46 42
      test/cases/boxing/BooleanTest.cpp
  2. 69 65
      test/cases/boxing/DoubleTest.cpp
  3. 67 63
      test/cases/boxing/FloatTest.cpp
  4. 84 81
      test/cases/boxing/IntegerTest.cpp
  5. 105 102
      test/cases/boxing/LongTest.cpp
  6. 40 37
      test/cases/boxing/StringTest.cpp
  7. 10 6
      test/cases/core/ClassTest.cpp
  8. 4 2
      test/cases/core/LibraryVersionTest.cpp
  9. 18 16
      test/cases/core/VersionTest.cpp
  10. 6 4
      test/cases/core/exception/EventNotHandledExceptionTest.cpp
  11. 6 4
      test/cases/core/exception/EventNotSubscribedExceptionTest.cpp
  12. 6 4
      test/cases/core/exception/FileNotFoundExceptionTest.cpp
  13. 6 4
      test/cases/core/exception/FileOperationExceptionTest.cpp
  14. 6 4
      test/cases/core/exception/IllegalArgumentExceptionTest.cpp
  15. 6 4
      test/cases/core/exception/IllegalArithmeticOperationExceptionTest.cpp
  16. 6 4
      test/cases/core/exception/IncompleteJsonExceptionTest.cpp
  17. 6 4
      test/cases/core/exception/NullPointerExceptionTest.cpp
  18. 6 3
      test/cases/core/utils/RegexUtilsTest.cpp
  19. 32 29
      test/cases/core/utils/STLUtilsTest.cpp
  20. 5 3
      test/cases/encoding/Base64Test.cpp
  21. 8 5
      test/cases/event/EventHandlerTest.cpp
  22. 64 58
      test/cases/event/EventManagerTest.cpp
  23. 28 24
      test/cases/event/EventTest.cpp
  24. 42 36
      test/cases/event/NarratorTest.cpp
  25. 23 18
      test/cases/event/serialization/SerializableJsonEventTest.cpp
  26. 26 21
      test/cases/io/FileOutputStreamTest.cpp
  27. 29 23
      test/cases/io/FileReaderTest.cpp
  28. 84 79
      test/cases/io/FileTest.cpp
  29. 19 14
      test/cases/io/FileWriterTest.cpp
  30. 4 3
      test/cases/io/StandardOutputWriterTest.cpp
  31. 26 20
      test/cases/io/StorableFileTest.cpp
  32. 18 16
      test/cases/io/kv/KvDocumentTest.cpp
  33. 29 24
      test/cases/io/kv/KvFileReaderTest.cpp
  34. 10 7
      test/cases/io/kv/KvPairTest.cpp
  35. 20 15
      test/cases/io/kv/KvParserTest.cpp
  36. 59 56
      test/cases/io/logging/LogLevelTest.cpp
  37. 95 89
      test/cases/io/logging/LoggerTest.cpp
  38. 18 15
      test/cases/io/xml/XmlAttributeTest.cpp
  39. 23 20
      test/cases/io/xml/XmlDeclarationTest.cpp
  40. 26 21
      test/cases/io/xml/XmlDocumentTest.cpp
  41. 258 253
      test/cases/io/xml/XmlNodeTest.cpp
  42. 144 138
      test/cases/io/xml/XmlParserTest.cpp
  43. 12 9
      test/cases/io/xml/XmlParserTestWrapperTest.cpp
  44. 28 23
      test/cases/io/xml/XmlReaderTest.cpp
  45. 5 3
      test/cases/serialization/JsonTest.cpp
  46. 33 30
      test/cases/time/DateTest.cpp

+ 46 - 42
test/cases/boxing/BooleanTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-09
- * Changed:         2022-05-20
+ * Changed:         2022-11-09
  *
  * */
 
@@ -11,6 +11,10 @@
 #include <ls_std/ls_std_core.hpp>
 #include <ls_std/ls_std_boxing.hpp>
 
+using namespace ls::std::boxing;
+using namespace ls::std::core;
+using namespace ::std;
+
 namespace
 {
   class BooleanTest : public ::testing::Test
@@ -31,7 +35,7 @@ namespace
 
   TEST_F(BooleanTest, operator_assignment_boolean)
   {
-    ls::std::boxing::Boolean expression{};
+    Boolean expression{};
     expression = true;
 
     ASSERT_TRUE(expression);
@@ -39,7 +43,7 @@ namespace
 
   TEST_F(BooleanTest, operator_assignment_integer)
   {
-    ls::std::boxing::Boolean expression{};
+    Boolean expression{};
     expression = 1;
 
     ASSERT_TRUE(expression);
@@ -49,8 +53,8 @@ namespace
 
   TEST_F(BooleanTest, operator_output_stream)
   {
-    ls::std::boxing::Boolean expression{true};
-    ::std::ostringstream _stream{};
+    Boolean expression{true};
+    ostringstream _stream{};
     _stream << expression;
 
     ASSERT_STREQ("true", _stream.str().c_str());
@@ -60,20 +64,20 @@ namespace
 
   TEST_F(BooleanTest, operator_negation_negative_value)
   {
-    ls::std::boxing::Boolean expression{};
+    Boolean expression{};
     ASSERT_TRUE(!expression);
   }
 
   TEST_F(BooleanTest, operator_negation_positive_value)
   {
-    ls::std::boxing::Boolean expression{true};
+    Boolean expression{true};
     ASSERT_FALSE(!expression);
   }
 
   TEST_F(BooleanTest, operator_and)
   {
-    ls::std::boxing::Boolean expressionA{true};
-    ls::std::boxing::Boolean expressionB{3 == 3};
+    Boolean expressionA{true};
+    Boolean expressionB{3 == 3};
 
     ASSERT_TRUE(expressionA && expressionB);
     ASSERT_TRUE(expressionB && expressionA);
@@ -84,8 +88,8 @@ namespace
 
   TEST_F(BooleanTest, operator_and_with_false_result)
   {
-    ls::std::boxing::Boolean expressionA{true};
-    ls::std::boxing::Boolean expressionB{3 == 4};
+    Boolean expressionA{true};
+    Boolean expressionB{3 == 4};
 
     ASSERT_FALSE(expressionA && expressionB);
     ASSERT_FALSE(expressionB && expressionA);
@@ -96,8 +100,8 @@ namespace
 
   TEST_F(BooleanTest, operator_or)
   {
-    ls::std::boxing::Boolean expressionA{false};
-    ls::std::boxing::Boolean expressionB{3 == 3};
+    Boolean expressionA{false};
+    Boolean expressionB{3 == 3};
 
     ASSERT_TRUE(expressionA || expressionB);
     ASSERT_TRUE(expressionB || expressionA);
@@ -108,8 +112,8 @@ namespace
 
   TEST_F(BooleanTest, operator_or_with_false_result)
   {
-    ls::std::boxing::Boolean expressionA{false};
-    ls::std::boxing::Boolean expressionB{3 == 4};
+    Boolean expressionA{false};
+    Boolean expressionB{3 == 4};
 
     ASSERT_FALSE(expressionA || expressionB);
     ASSERT_FALSE(expressionB || expressionA);
@@ -122,7 +126,7 @@ namespace
 
   TEST_F(BooleanTest, parse_true_value)
   {
-    ls::std::boxing::Boolean expression{};
+    Boolean expression{};
 
     expression.parse("true");
     ASSERT_TRUE(expression);
@@ -136,7 +140,7 @@ namespace
 
   TEST_F(BooleanTest, parse_false_value)
   {
-    ls::std::boxing::Boolean expression{};
+    Boolean expression{};
 
     expression.parse("false");
     ASSERT_FALSE(expression);
@@ -153,24 +157,24 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     ls::std::boxing::Boolean expression{};
+                     Boolean expression{};
                      expression.parse("hello");
-                   } catch (const ls::std::core::IllegalArgumentException &_exception)
+                   } catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 
   TEST_F(BooleanTest, toString_true)
   {
-    ls::std::boxing::Boolean expression{2 < 3};
+    Boolean expression{2 < 3};
     ASSERT_STREQ("true", expression.toString().c_str());
   }
 
   TEST_F(BooleanTest, toString_false)
   {
-    ls::std::boxing::Boolean expression{4 < 3};
+    Boolean expression{4 < 3};
     ASSERT_STREQ("false", expression.toString().c_str());
   }
 
@@ -178,35 +182,35 @@ namespace
 
   TEST_F(BooleanTest, getValue)
   {
-    ls::std::boxing::Boolean x{2 < 3};
+    Boolean x{2 < 3};
     ASSERT_TRUE(x.getValue());
   }
 
   TEST_F(BooleanTest, XOR_with_positive_result)
   {
-    ls::std::boxing::Boolean x{2 < 3};
-    ls::std::boxing::Boolean y{4 < 3};
+    Boolean x{2 < 3};
+    Boolean y{4 < 3};
 
-    ASSERT_TRUE(ls::std::boxing::Boolean::XOR(x, y));
-    ASSERT_TRUE(ls::std::boxing::Boolean::XOR(y, x));
-    ASSERT_TRUE(ls::std::boxing::Boolean::XOR(y, true));
-    ASSERT_TRUE(ls::std::boxing::Boolean::XOR(true, y));
-    ASSERT_TRUE(ls::std::boxing::Boolean::XOR(true, false));
-    ASSERT_TRUE(ls::std::boxing::Boolean::XOR(false, true));
+    ASSERT_TRUE(Boolean::XOR(x, y));
+    ASSERT_TRUE(Boolean::XOR(y, x));
+    ASSERT_TRUE(Boolean::XOR(y, true));
+    ASSERT_TRUE(Boolean::XOR(true, y));
+    ASSERT_TRUE(Boolean::XOR(true, false));
+    ASSERT_TRUE(Boolean::XOR(false, true));
   }
 
   TEST_F(BooleanTest, XOR_with_negative_result)
   {
-    ls::std::boxing::Boolean w{};
-    ls::std::boxing::Boolean x{true};
-    ls::std::boxing::Boolean y{};
-    ls::std::boxing::Boolean z{true};
-
-    ASSERT_FALSE(ls::std::boxing::Boolean::XOR(x, z));
-    ASSERT_FALSE(ls::std::boxing::Boolean::XOR(w, y));
-    ASSERT_FALSE(ls::std::boxing::Boolean::XOR(true, true));
-    ASSERT_FALSE(ls::std::boxing::Boolean::XOR(false, false));
-    ASSERT_FALSE(ls::std::boxing::Boolean::XOR(w, false));
-    ASSERT_FALSE(ls::std::boxing::Boolean::XOR(false, w));
+    Boolean w{};
+    Boolean x{true};
+    Boolean y{};
+    Boolean z{true};
+
+    ASSERT_FALSE(Boolean::XOR(x, z));
+    ASSERT_FALSE(Boolean::XOR(w, y));
+    ASSERT_FALSE(Boolean::XOR(true, true));
+    ASSERT_FALSE(Boolean::XOR(false, false));
+    ASSERT_FALSE(Boolean::XOR(w, false));
+    ASSERT_FALSE(Boolean::XOR(false, w));
   }
 }

+ 69 - 65
test/cases/boxing/DoubleTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2022-05-20
+ * Changed:         2022-11-09
  *
  * */
 
@@ -11,6 +11,10 @@
 #include <ls_std/ls_std_core.hpp>
 #include <ls_std/ls_std_boxing.hpp>
 
+using namespace ls::std::boxing;
+using namespace ls::std::core;
+using namespace ::std;
+
 namespace
 {
   class DoubleTest : public ::testing::Test
@@ -32,7 +36,7 @@ namespace
 
   TEST_F(DoubleTest, operator_assignment)
   {
-    ls::std::boxing::Double x{};
+    Double x{};
     x = 44.22;
 
     ASSERT_EQ(44.22, x);
@@ -42,67 +46,67 @@ namespace
 
   TEST_F(DoubleTest, operator_negative)
   {
-    ls::std::boxing::Double x{3.25};
+    Double x{3.25};
     ASSERT_DOUBLE_EQ(-3.25, -x);
   }
 
   TEST_F(DoubleTest, operator_addition_with_reference)
   {
-    ls::std::boxing::Double x{3.1415};
-    ls::std::boxing::Double y{2.223};
-    ls::std::boxing::Double z{x + y};
+    Double x{3.1415};
+    Double y{2.223};
+    Double z{x + y};
 
     ASSERT_DOUBLE_EQ(5.3645, z);
   }
 
   TEST_F(DoubleTest, operator_addition_with_value)
   {
-    ls::std::boxing::Double x{3.1415};
+    Double x{3.1415};
     ASSERT_DOUBLE_EQ(5.3645, x + 2.223);
   }
 
   TEST_F(DoubleTest, operator_multiplication_with_reference)
   {
-    ls::std::boxing::Double x{3.14};
-    ls::std::boxing::Double y{2.22};
-    ls::std::boxing::Double z{x * y};
+    Double x{3.14};
+    Double y{2.22};
+    Double z{x * y};
 
     ASSERT_DOUBLE_EQ(6.9708, z);
   }
 
   TEST_F(DoubleTest, operator_multiplication_with_value)
   {
-    ls::std::boxing::Double x{3.14};
+    Double x{3.14};
     ASSERT_DOUBLE_EQ(6.9708, x * 2.22);
   }
 
   TEST_F(DoubleTest, operator_substraction_with_reference)
   {
-    ls::std::boxing::Double x{3.1415};
-    ls::std::boxing::Double y{2.225};
-    ls::std::boxing::Double z{x - y};
+    Double x{3.1415};
+    Double y{2.225};
+    Double z{x - y};
 
     ASSERT_DOUBLE_EQ(0.9165, z);
   }
 
   TEST_F(DoubleTest, operator_substraction_with_value)
   {
-    ls::std::boxing::Double x{3.1415};
+    Double x{3.1415};
     ASSERT_DOUBLE_EQ(0.9165, x - 2.225);
   }
 
   TEST_F(DoubleTest, operator_division_with_reference)
   {
-    ls::std::boxing::Double x{2.25};
-    ls::std::boxing::Double y{0.5};
-    ls::std::boxing::Double z{x / y};
+    Double x{2.25};
+    Double y{0.5};
+    Double z{x / y};
 
     ASSERT_DOUBLE_EQ(4.5, z);
   }
 
   TEST_F(DoubleTest, operator_division_with_value)
   {
-    ls::std::boxing::Double x{2.25};
+    Double x{2.25};
     ASSERT_DOUBLE_EQ(4.5, x / 0.5);
   }
 
@@ -110,8 +114,8 @@ namespace
 
   TEST_F(DoubleTest, operator_add_assign_with_reference)
   {
-    ls::std::boxing::Double x{2.25000000};
-    ls::std::boxing::Double y{3.14000000};
+    Double x{2.25000000};
+    Double y{3.14000000};
 
     x += y;
     ASSERT_DOUBLE_EQ(5.39000000, x);
@@ -119,7 +123,7 @@ namespace
 
   TEST_F(DoubleTest, operator_add_assign_with_value)
   {
-    ls::std::boxing::Double x{2.25000000};
+    Double x{2.25000000};
 
     x += 3.14000000;
     ASSERT_DOUBLE_EQ(5.39000000, x);
@@ -127,8 +131,8 @@ namespace
 
   TEST_F(DoubleTest, operator_sub_assign_with_reference)
   {
-    ls::std::boxing::Double x{2.25};
-    ls::std::boxing::Double y{0.04};
+    Double x{2.25};
+    Double y{0.04};
 
     x -= y;
     ASSERT_DOUBLE_EQ(2.21, x);
@@ -136,7 +140,7 @@ namespace
 
   TEST_F(DoubleTest, operator_sub_assign_with_value)
   {
-    ls::std::boxing::Double x{2.25};
+    Double x{2.25};
 
     x -= 0.04;
     ASSERT_DOUBLE_EQ(2.21, x);
@@ -144,8 +148,8 @@ namespace
 
   TEST_F(DoubleTest, operator_mul_assign_with_reference)
   {
-    ls::std::boxing::Double x{2.25000000};
-    ls::std::boxing::Double y{0.04000000};
+    Double x{2.25000000};
+    Double y{0.04000000};
 
     x *= y;
     ASSERT_DOUBLE_EQ(0.09000000, x);
@@ -153,7 +157,7 @@ namespace
 
   TEST_F(DoubleTest, operator_mul_assign_with_value)
   {
-    ls::std::boxing::Double x{2.25000000};
+    Double x{2.25000000};
 
     x *= 0.04000000;
     ASSERT_DOUBLE_EQ(0.09000000, x);
@@ -161,8 +165,8 @@ namespace
 
   TEST_F(DoubleTest, operator_division_assign_with_reference)
   {
-    ls::std::boxing::Double x{2.25};
-    ls::std::boxing::Double y{0.05};
+    Double x{2.25};
+    Double y{0.05};
 
     x /= y;
     ASSERT_DOUBLE_EQ(45.0, x);
@@ -170,7 +174,7 @@ namespace
 
   TEST_F(DoubleTest, operator_division_assign_with_value)
   {
-    ls::std::boxing::Double x{2.25};
+    Double x{2.25};
 
     x /= 0.05;
     ASSERT_DOUBLE_EQ(45.0, x);
@@ -180,8 +184,8 @@ namespace
 
   TEST_F(DoubleTest, operator_equals_with_reference)
   {
-    ls::std::boxing::Double x{3.14159};
-    ls::std::boxing::Double y{3.14159};
+    Double x{3.14159};
+    Double y{3.14159};
 
     ASSERT_TRUE(x == y);
     ASSERT_TRUE(y == x);
@@ -189,7 +193,7 @@ namespace
 
   TEST_F(DoubleTest, operator_equals_with_value)
   {
-    ls::std::boxing::Double x{3.14159};
+    Double x{3.14159};
 
     ASSERT_TRUE(x == 3.14159);
     ASSERT_TRUE(3.14159 == x);
@@ -197,8 +201,8 @@ namespace
 
   TEST_F(DoubleTest, operator_not_equal_with_reference)
   {
-    ls::std::boxing::Double x{3.1415};
-    ls::std::boxing::Double y{3.1414};
+    Double x{3.1415};
+    Double y{3.1414};
 
     ASSERT_TRUE(x != y);
     ASSERT_TRUE(y != x);
@@ -206,7 +210,7 @@ namespace
 
   TEST_F(DoubleTest, operator_not_equal_with_value)
   {
-    ls::std::boxing::Double x{3.1415};
+    Double x{3.1415};
 
     ASSERT_TRUE(x != 3.1414);
     ASSERT_TRUE(3.1414 != x);
@@ -214,25 +218,25 @@ namespace
 
   TEST_F(DoubleTest, operator_greater_than_with_reference)
   {
-    ls::std::boxing::Double x{3.1415};
-    ls::std::boxing::Double y{3.1414};
+    Double x{3.1415};
+    Double y{3.1414};
 
     ASSERT_TRUE(x > y);
   }
 
   TEST_F(DoubleTest, operator_greater_than_with_value)
   {
-    ls::std::boxing::Double x{3.1415};
-    ls::std::boxing::Double y{3.1414};
+    Double x{3.1415};
+    Double y{3.1414};
 
     ASSERT_TRUE(x > 3.1414);
   }
 
   TEST_F(DoubleTest, operator_greater_than_equals_with_reference)
   {
-    ls::std::boxing::Double x{3.1414};
-    ls::std::boxing::Double y{3.1414};
-    ls::std::boxing::Double z{3.1415};
+    Double x{3.1414};
+    Double y{3.1414};
+    Double z{3.1415};
 
     ASSERT_TRUE(x >= y);
     ASSERT_TRUE(z >= y);
@@ -240,31 +244,31 @@ namespace
 
   TEST_F(DoubleTest, operator_greater_than_equals_with_value)
   {
-    ls::std::boxing::Double x{3.1414};
+    Double x{3.1414};
     ASSERT_TRUE(x >= 3.1414);
   }
 
   TEST_F(DoubleTest, operator_less_than_with_reference)
   {
-    ls::std::boxing::Double x{3.1413};
-    ls::std::boxing::Double y{3.1414};
+    Double x{3.1413};
+    Double y{3.1414};
 
     ASSERT_TRUE(x < y);
   }
 
   TEST_F(DoubleTest, operator_less_than_with_value)
   {
-    ls::std::boxing::Double x{3.1413};
-    ls::std::boxing::Double y{3.1414};
+    Double x{3.1413};
+    Double y{3.1414};
 
     ASSERT_TRUE(x < 3.1414);
   }
 
   TEST_F(DoubleTest, operator_less_than_equals_with_reference)
   {
-    ls::std::boxing::Double x{3.1414};
-    ls::std::boxing::Double y{3.1414};
-    ls::std::boxing::Double z{3.1415};
+    Double x{3.1414};
+    Double y{3.1414};
+    Double z{3.1415};
 
     ASSERT_TRUE(x <= y);
     ASSERT_TRUE(x <= z);
@@ -272,7 +276,7 @@ namespace
 
   TEST_F(DoubleTest, operator_less_than_equals_with_value)
   {
-    ls::std::boxing::Double x{3.1414};
+    Double x{3.1414};
     ASSERT_TRUE(x <= 3.1414);
   }
 
@@ -280,7 +284,7 @@ namespace
 
   TEST_F(DoubleTest, operator_increment)
   {
-    ls::std::boxing::Double x{3.1415};
+    Double x{3.1415};
 
     ++x;
     ASSERT_DOUBLE_EQ(4.1415, x);
@@ -288,7 +292,7 @@ namespace
 
   TEST_F(DoubleTest, operator_decrement)
   {
-    ls::std::boxing::Double x{3.1415};
+    Double x{3.1415};
 
     --x;
     ASSERT_DOUBLE_EQ(2.1415, x);
@@ -298,7 +302,7 @@ namespace
 
   TEST_F(DoubleTest, parse_with_positive_value)
   {
-    ls::std::boxing::Double x{};
+    Double x{};
 
     x.parse("3.1415");
     ASSERT_DOUBLE_EQ(3.1415, x);
@@ -306,7 +310,7 @@ namespace
 
   TEST_F(DoubleTest, parse_with_negative_value)
   {
-    ls::std::boxing::Double x{};
+    Double x{};
 
     x.parse("-2.1415");
     ASSERT_DOUBLE_EQ(-2.1415, x);
@@ -314,27 +318,27 @@ namespace
 
   TEST_F(DoubleTest, toString)
   {
-    ls::std::boxing::Double x{13.1543};
-    ASSERT_TRUE(x.toString().find("13.1543") != ::std::string::npos);
+    Double x{13.1543};
+    ASSERT_TRUE(x.toString().find("13.1543") != string::npos);
   }
 
   // additional functionality
 
   TEST_F(DoubleTest, getEpsilon)
   {
-    ls::std::boxing::Double x{};
+    Double x{};
     ASSERT_DOUBLE_EQ(0.00000001, x.getEpsilon());
   }
 
   TEST_F(DoubleTest, getValue)
   {
-    ls::std::boxing::Double x{3.1415};
+    Double x{3.1415};
     ASSERT_DOUBLE_EQ(3.1415, x.getValue());
   }
 
   TEST_F(DoubleTest, setEpsilon)
   {
-    ls::std::boxing::Double x{};
+    Double x{};
     x.setEpsilon(0.01);
 
     ASSERT_DOUBLE_EQ(0.01, x.getEpsilon());
@@ -342,17 +346,17 @@ namespace
 
   TEST_F(DoubleTest, setEpsilon_invalid_value)
   {
-    ls::std::boxing::Double x{};
+    Double x{};
 
     EXPECT_THROW({
                    try
                    {
                      x.setEpsilon(0.0);
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 }

+ 67 - 63
test/cases/boxing/FloatTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2022-05-20
+ * Changed:         2022-11-09
  *
  * */
 
@@ -11,6 +11,10 @@
 #include <ls_std/ls_std_core.hpp>
 #include <ls_std/ls_std_boxing.hpp>
 
+using namespace ls::std::boxing;
+using namespace ls::std::core;
+using namespace ::std;
+
 namespace
 {
   class FloatTest : public ::testing::Test
@@ -31,7 +35,7 @@ namespace
 
   TEST_F(FloatTest, operator_assignment)
   {
-    ls::std::boxing::Float x{13.023f};
+    Float x{13.023f};
 
     x = 44.22f;
     ASSERT_EQ(44.22f, x);
@@ -41,67 +45,67 @@ namespace
 
   TEST_F(FloatTest, operator_negative)
   {
-    ls::std::boxing::Float x{3.25f};
+    Float x{3.25f};
     ASSERT_FLOAT_EQ(-3.25f, -x);
   }
 
   TEST_F(FloatTest, operator_addition_with_reference)
   {
-    ls::std::boxing::Float x{3.1415f};
-    ls::std::boxing::Float y{2.223f};
-    ls::std::boxing::Float z{x + y};
+    Float x{3.1415f};
+    Float y{2.223f};
+    Float z{x + y};
 
     ASSERT_FLOAT_EQ(5.3645f, z);
   }
 
   TEST_F(FloatTest, operator_addition_with_value)
   {
-    ls::std::boxing::Float x{3.1415f};
+    Float x{3.1415f};
     ASSERT_FLOAT_EQ(5.3645f, x + 2.223f);
   }
 
   TEST_F(FloatTest, operator_multiplication_with_reference)
   {
-    ls::std::boxing::Float x{3.14f};
-    ls::std::boxing::Float y{2.22f};
-    ls::std::boxing::Float z{x * y};
+    Float x{3.14f};
+    Float y{2.22f};
+    Float z{x * y};
 
     ASSERT_FLOAT_EQ(6.9708f, z);
   }
 
   TEST_F(FloatTest, operator_multiplication_with_value)
   {
-    ls::std::boxing::Float x{3.14f};
+    Float x{3.14f};
     ASSERT_FLOAT_EQ(6.9708f, x * 2.22f);
   }
 
   TEST_F(FloatTest, operator_substraction_with_reference)
   {
-    ls::std::boxing::Float x{3.1415f};
-    ls::std::boxing::Float y{2.225f};
-    ls::std::boxing::Float z{x - y};
+    Float x{3.1415f};
+    Float y{2.225f};
+    Float z{x - y};
 
     ASSERT_FLOAT_EQ(0.9165f, z);
   }
 
   TEST_F(FloatTest, operator_substraction_with_value)
   {
-    ls::std::boxing::Float x{3.1415f};
+    Float x{3.1415f};
     ASSERT_FLOAT_EQ(0.9165f, x - 2.225f);
   }
 
   TEST_F(FloatTest, operator_division_with_reference)
   {
-    ls::std::boxing::Float x{2.25f};
-    ls::std::boxing::Float y{0.5f};
-    ls::std::boxing::Float z{x / y};
+    Float x{2.25f};
+    Float y{0.5f};
+    Float z{x / y};
 
     ASSERT_FLOAT_EQ(4.5f, z);
   }
 
   TEST_F(FloatTest, operator_division_with_value)
   {
-    ls::std::boxing::Float x{2.25f};
+    Float x{2.25f};
     ASSERT_FLOAT_EQ(4.5f, x / 0.5f);
   }
 
@@ -109,8 +113,8 @@ namespace
 
   TEST_F(FloatTest, operator_add_assign_with_reference)
   {
-    ls::std::boxing::Float x{2.25f};
-    ls::std::boxing::Float y{3.14f};
+    Float x{2.25f};
+    Float y{3.14f};
     x += y;
 
     ASSERT_FLOAT_EQ(5.39f, x);
@@ -118,7 +122,7 @@ namespace
 
   TEST_F(FloatTest, operator_add_assign_with_value)
   {
-    ls::std::boxing::Float x{2.25f};
+    Float x{2.25f};
     x += 3.14f;
 
     ASSERT_FLOAT_EQ(5.39f, x);
@@ -126,8 +130,8 @@ namespace
 
   TEST_F(FloatTest, operator_sub_assign_with_reference)
   {
-    ls::std::boxing::Float x{2.25f};
-    ls::std::boxing::Float y{1.14f};
+    Float x{2.25f};
+    Float y{1.14f};
     x -= y;
 
     ASSERT_FLOAT_EQ(1.11f, x);
@@ -135,7 +139,7 @@ namespace
 
   TEST_F(FloatTest, operator_sub_assign_with_value)
   {
-    ls::std::boxing::Float x{2.25f};
+    Float x{2.25f};
     x -= 1.14f;
 
     ASSERT_FLOAT_EQ(1.11f, x);
@@ -143,8 +147,8 @@ namespace
 
   TEST_F(FloatTest, operator_mul_assign_with_reference)
   {
-    ls::std::boxing::Float x{2.25f};
-    ls::std::boxing::Float y{0.04f};
+    Float x{2.25f};
+    Float y{0.04f};
     x *= y;
 
     ASSERT_FLOAT_EQ(0.09f, x);
@@ -152,7 +156,7 @@ namespace
 
   TEST_F(FloatTest, operator_mul_assign_with_value)
   {
-    ls::std::boxing::Float x{2.25f};
+    Float x{2.25f};
     x *= 1.14f;
 
     ASSERT_FLOAT_EQ(2.565f, x);
@@ -160,8 +164,8 @@ namespace
 
   TEST_F(FloatTest, operator_division_assign_with_reference)
   {
-    ls::std::boxing::Float x{2.25f};
-    ls::std::boxing::Float y{1.5f};
+    Float x{2.25f};
+    Float y{1.5f};
     x /= y;
 
     ASSERT_FLOAT_EQ(1.5f, x);
@@ -169,7 +173,7 @@ namespace
 
   TEST_F(FloatTest, operator_division_assign_with_value)
   {
-    ls::std::boxing::Float x{2.25f};
+    Float x{2.25f};
     x /= 0.05f;
 
     ASSERT_FLOAT_EQ(45.0f, x);
@@ -179,8 +183,8 @@ namespace
 
   TEST_F(FloatTest, operator_equals_with_reference)
   {
-    ls::std::boxing::Float x{3.14159f};
-    ls::std::boxing::Float y{3.14159f};
+    Float x{3.14159f};
+    Float y{3.14159f};
 
     ASSERT_TRUE(x == y);
     ASSERT_TRUE(y == x);
@@ -188,14 +192,14 @@ namespace
 
   TEST_F(FloatTest, operator_equals_with_value)
   {
-    ls::std::boxing::Float x{3.14159f};
+    Float x{3.14159f};
     ASSERT_TRUE(x == 3.14159f);
   }
 
   TEST_F(FloatTest, operator_not_equals_with_reference)
   {
-    ls::std::boxing::Float x{3.1415f};
-    ls::std::boxing::Float y{3.1414f};
+    Float x{3.1415f};
+    Float y{3.1414f};
 
     ASSERT_TRUE(x != y);
     ASSERT_TRUE(y != x);
@@ -203,14 +207,14 @@ namespace
 
   TEST_F(FloatTest, operator_not_equals_with_value)
   {
-    ls::std::boxing::Float x{3.1415f};
+    Float x{3.1415f};
     ASSERT_TRUE(x != 3.1414f);
   }
 
   TEST_F(FloatTest, operator_greater_than_with_reference)
   {
-    ls::std::boxing::Float x{3.1415f};
-    ls::std::boxing::Float y{3.1414f};
+    Float x{3.1415f};
+    Float y{3.1414f};
 
     ASSERT_TRUE(x > y);
     ASSERT_TRUE(x > 3.1414f);
@@ -218,15 +222,15 @@ namespace
 
   TEST_F(FloatTest, operator_greater_than_with_value)
   {
-    ls::std::boxing::Float x{3.1415f};
+    Float x{3.1415f};
     ASSERT_TRUE(x > 3.1414f);
   }
 
   TEST_F(FloatTest, operator_greater_than_equals_with_reference)
   {
-    ls::std::boxing::Float x{3.1414f};
-    ls::std::boxing::Float y{3.1414f};
-    ls::std::boxing::Float z{3.1415f};
+    Float x{3.1414f};
+    Float y{3.1414f};
+    Float z{3.1415f};
 
     ASSERT_TRUE(x >= y);
     ASSERT_TRUE(z >= y);
@@ -234,8 +238,8 @@ namespace
 
   TEST_F(FloatTest, operator_greater_than_equals_with_value)
   {
-    ls::std::boxing::Float x{3.1414f};
-    ls::std::boxing::Float z{3.1415f};
+    Float x{3.1414f};
+    Float z{3.1415f};
 
     ASSERT_TRUE(x >= 3.1414f);
     ASSERT_TRUE(z >= 3.1414f);
@@ -243,23 +247,23 @@ namespace
 
   TEST_F(FloatTest, operator_less_than_with_reference)
   {
-    ls::std::boxing::Float x{3.1413f};
-    ls::std::boxing::Float y{3.1414f};
+    Float x{3.1413f};
+    Float y{3.1414f};
 
     ASSERT_TRUE(x < y);
   }
 
   TEST_F(FloatTest, operator_less_than_with_value)
   {
-    ls::std::boxing::Float x{3.1413f};
+    Float x{3.1413f};
     ASSERT_TRUE(x < 3.1414f);
   }
 
   TEST_F(FloatTest, operator_less_than_equals_with_reference)
   {
-    ls::std::boxing::Float x{3.1414f};
-    ls::std::boxing::Float y{3.1414f};
-    ls::std::boxing::Float z{3.1415f};
+    Float x{3.1414f};
+    Float y{3.1414f};
+    Float z{3.1415f};
 
     ASSERT_TRUE(x <= y);
     ASSERT_TRUE(x <= z);
@@ -267,7 +271,7 @@ namespace
 
   TEST_F(FloatTest, operator_less_than_equals_with_value)
   {
-    ls::std::boxing::Float x{3.1414f};
+    Float x{3.1414f};
 
     ASSERT_TRUE(x <= 3.1414f);
     ASSERT_TRUE(x <= 3.1415f);
@@ -277,7 +281,7 @@ namespace
 
   TEST_F(FloatTest, operator_increment)
   {
-    ls::std::boxing::Float x{3.1415f};
+    Float x{3.1415f};
     ++x;
 
     ASSERT_FLOAT_EQ(4.1415f, x);
@@ -285,7 +289,7 @@ namespace
 
   TEST_F(FloatTest, operator_decrement)
   {
-    ls::std::boxing::Float x{3.1415f};
+    Float x{3.1415f};
     --x;
 
     ASSERT_FLOAT_EQ(2.1415f, x);
@@ -295,7 +299,7 @@ namespace
 
   TEST_F(FloatTest, parse)
   {
-    ls::std::boxing::Float number{};
+    Float number{};
 
     number.parse("3.1415f");
     ASSERT_FLOAT_EQ(3.1415f, number);
@@ -303,27 +307,27 @@ namespace
 
   TEST_F(FloatTest, toString)
   {
-    ls::std::boxing::Float x{13.1543f};
-    ASSERT_TRUE(x.toString().find("13.1543") != ::std::string::npos);
+    Float x{13.1543f};
+    ASSERT_TRUE(x.toString().find("13.1543") != string::npos);
   }
 
   // additional functionality
 
   TEST_F(FloatTest, getEpsilon)
   {
-    ls::std::boxing::Float x{};
+    Float x{};
     ASSERT_FLOAT_EQ(0.00001f, x.getEpsilon());
   }
 
   TEST_F(FloatTest, getValue)
   {
-    ls::std::boxing::Float x{3.1415f};
+    Float x{3.1415f};
     ASSERT_FLOAT_EQ(3.1415f, x.getValue());
   }
 
   TEST_F(FloatTest, setEpsilon)
   {
-    ls::std::boxing::Float x{};
+    Float x{};
     x.setEpsilon(0.01f);
 
     ASSERT_FLOAT_EQ(0.01f, x.getEpsilon());
@@ -331,17 +335,17 @@ namespace
 
   TEST_F(FloatTest, setEpsilon_invalid_value)
   {
-    ls::std::boxing::Float x{};
+    Float x{};
 
     EXPECT_THROW({
                    try
                    {
                      x.setEpsilon(0.0f);
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 }

+ 84 - 81
test/cases/boxing/IntegerTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-09
- * Changed:         2022-05-14
+ * Changed:         2022-11-09
  *
  * */
 
@@ -11,6 +11,9 @@
 #include <ls_std/ls_std_core.hpp>
 #include <ls_std/ls_std_boxing.hpp>
 
+using namespace ls::std::boxing;
+using namespace ls::std::core;
+
 namespace
 {
   class IntegerTest : public ::testing::Test
@@ -31,8 +34,8 @@ namespace
 
   TEST_F(IntegerTest, operator_assignment_with_reference)
   {
-    ls::std::boxing::Integer x{};
-    ls::std::boxing::Integer y{3};
+    Integer x{};
+    Integer y{3};
     x = y;
 
     ASSERT_EQ(3, x);
@@ -40,7 +43,7 @@ namespace
 
   TEST_F(IntegerTest, operator_assignment_with_value)
   {
-    ls::std::boxing::Integer x{};
+    Integer x{};
     x = 44;
 
     ASSERT_EQ(44, x);
@@ -50,8 +53,8 @@ namespace
 
   TEST_F(IntegerTest, operator_negative)
   {
-    ls::std::boxing::Integer x{13};
-    ls::std::boxing::Integer y{-13};
+    Integer x{13};
+    Integer y{-13};
 
     ASSERT_EQ(-13, -x);
     ASSERT_EQ(13, -y);
@@ -59,57 +62,57 @@ namespace
 
   TEST_F(IntegerTest, operator_add_with_reference)
   {
-    ls::std::boxing::Integer x{13};
-    ls::std::boxing::Integer y{7};
+    Integer x{13};
+    Integer y{7};
 
     ASSERT_EQ(20, x + y);
   }
 
   TEST_F(IntegerTest, operator_add_with_value)
   {
-    ls::std::boxing::Integer x{13};
+    Integer x{13};
     ASSERT_EQ(20, x + 7);
   }
 
   TEST_F(IntegerTest, operator_mul_with_reference)
   {
-    ls::std::boxing::Integer x{3};
-    ls::std::boxing::Integer y{7};
+    Integer x{3};
+    Integer y{7};
 
     ASSERT_EQ(21, x * y);
   }
 
   TEST_F(IntegerTest, operator_mul_with_value)
   {
-    ls::std::boxing::Integer x{3};
+    Integer x{3};
     ASSERT_EQ(21, x * 7);
   }
 
   TEST_F(IntegerTest, operator_sub_with_reference)
   {
-    ls::std::boxing::Integer x{51};
-    ls::std::boxing::Integer y{17};
+    Integer x{51};
+    Integer y{17};
 
     ASSERT_EQ(34, x - y);
   }
 
   TEST_F(IntegerTest, operator_sub_with_value)
   {
-    ls::std::boxing::Integer x{51};
+    Integer x{51};
     ASSERT_EQ(34, x - 17);
   }
 
   TEST_F(IntegerTest, operator_div_with_reference)
   {
-    ls::std::boxing::Integer x{81};
-    ls::std::boxing::Integer y{9};
+    Integer x{81};
+    Integer y{9};
 
     ASSERT_EQ(9, x / y);
   }
 
   TEST_F(IntegerTest, operator_div_with_value)
   {
-    ls::std::boxing::Integer x{81};
+    Integer x{81};
     ASSERT_EQ(9, x / 9);
   }
 
@@ -118,15 +121,15 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     ls::std::boxing::Integer x{9};
-                     ls::std::boxing::Integer y{0};
+                     Integer x{9};
+                     Integer y{0};
 
                      x = x / y;
-                   } catch (const ls::std::core::IllegalArithmeticOperationException &_exception)
+                   } catch (const IllegalArithmeticOperationException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArithmeticOperationException);
+                 }, IllegalArithmeticOperationException);
   }
 
   TEST_F(IntegerTest, operator_div_by_zero_with_value)
@@ -134,26 +137,26 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     ls::std::boxing::Integer x{9};
+                     Integer x{9};
                      x = x / 0;
-                   } catch (const ls::std::core::IllegalArithmeticOperationException &_exception)
+                   } catch (const IllegalArithmeticOperationException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArithmeticOperationException);
+                 }, IllegalArithmeticOperationException);
   }
 
   TEST_F(IntegerTest, operator_mod_with_reference)
   {
-    ls::std::boxing::Integer x{85};
-    ls::std::boxing::Integer y{9};
+    Integer x{85};
+    Integer y{9};
 
     ASSERT_EQ(4, x % y);
   }
 
   TEST_F(IntegerTest, operator_mod_with_value)
   {
-    ls::std::boxing::Integer x{85};
+    Integer x{85};
     ASSERT_EQ(4, x % 9);
   }
 
@@ -161,8 +164,8 @@ namespace
 
   TEST_F(IntegerTest, operator_add_assign_with_reference)
   {
-    ls::std::boxing::Integer x{4};
-    ls::std::boxing::Integer y{2};
+    Integer x{4};
+    Integer y{2};
     x += y;
 
     ASSERT_EQ(6, x);
@@ -170,7 +173,7 @@ namespace
 
   TEST_F(IntegerTest, operator_add_assign_with_value)
   {
-    ls::std::boxing::Integer x{4};
+    Integer x{4};
     x += 2;
 
     ASSERT_EQ(6, x);
@@ -178,8 +181,8 @@ namespace
 
   TEST_F(IntegerTest, operator_sub_assign_with_reference)
   {
-    ls::std::boxing::Integer x{14};
-    ls::std::boxing::Integer y{2};
+    Integer x{14};
+    Integer y{2};
     x -= y;
 
     ASSERT_EQ(12, x);
@@ -187,7 +190,7 @@ namespace
 
   TEST_F(IntegerTest, operator_sub_assign_with_value)
   {
-    ls::std::boxing::Integer x{14};
+    Integer x{14};
     x -= 2;
 
     ASSERT_EQ(12, x);
@@ -195,8 +198,8 @@ namespace
 
   TEST_F(IntegerTest, operator_mul_assign_with_reference)
   {
-    ls::std::boxing::Integer x{6};
-    ls::std::boxing::Integer y{3};
+    Integer x{6};
+    Integer y{3};
     x *= y;
 
     ASSERT_EQ(18, x);
@@ -204,7 +207,7 @@ namespace
 
   TEST_F(IntegerTest, operator_mul_assign_with_value)
   {
-    ls::std::boxing::Integer x{6};
+    Integer x{6};
     x *= 3;
 
     ASSERT_EQ(18, x);
@@ -212,8 +215,8 @@ namespace
 
   TEST_F(IntegerTest, operator_div_assign_with_reference)
   {
-    ls::std::boxing::Integer x{12};
-    ls::std::boxing::Integer y{3};
+    Integer x{12};
+    Integer y{3};
     x /= y;
 
     ASSERT_EQ(4, x);
@@ -221,7 +224,7 @@ namespace
 
   TEST_F(IntegerTest, operator_div_assign_with_value)
   {
-    ls::std::boxing::Integer x{12};
+    Integer x{12};
     x /= 3;
 
     ASSERT_EQ(4, x);
@@ -232,15 +235,15 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     ls::std::boxing::Integer x{9};
-                     ls::std::boxing::Integer y{0};
+                     Integer x{9};
+                     Integer y{0};
 
                      x = x /= y;
-                   } catch (const ls::std::core::IllegalArithmeticOperationException &_exception)
+                   } catch (const IllegalArithmeticOperationException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArithmeticOperationException);
+                 }, IllegalArithmeticOperationException);
   }
 
   TEST_F(IntegerTest, operator_div_assign_by_zero_with_value)
@@ -248,99 +251,99 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     ls::std::boxing::Integer x{9};
+                     Integer x{9};
                      x = x /= 0;
-                   } catch (const ls::std::core::IllegalArithmeticOperationException &_exception)
+                   } catch (const IllegalArithmeticOperationException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArithmeticOperationException);
+                 }, IllegalArithmeticOperationException);
   }
 
   // comparison operators
 
   TEST_F(IntegerTest, operator_equals_with_reference)
   {
-    ls::std::boxing::Integer x{12};
-    ls::std::boxing::Integer y{12};
+    Integer x{12};
+    Integer y{12};
 
     ASSERT_TRUE(x == y);
   }
 
   TEST_F(IntegerTest, operator_equals_with_value)
   {
-    ls::std::boxing::Integer x{12};
+    Integer x{12};
 
     ASSERT_TRUE(x == 12);
   }
 
   TEST_F(IntegerTest, operator_not_equals_with_reference)
   {
-    ls::std::boxing::Integer x{12};
-    ls::std::boxing::Integer y{3};
+    Integer x{12};
+    Integer y{3};
 
     ASSERT_TRUE(x != y);
   }
 
   TEST_F(IntegerTest, operator_not_equals_with_value)
   {
-    ls::std::boxing::Integer x{12};
+    Integer x{12};
     ASSERT_TRUE(x != 3);
   }
 
   TEST_F(IntegerTest, operator_greater_than_with_reference)
   {
-    ls::std::boxing::Integer x{12};
-    ls::std::boxing::Integer y{3};
+    Integer x{12};
+    Integer y{3};
 
     ASSERT_TRUE(x > y);
   }
 
   TEST_F(IntegerTest, operator_greater_than_with_value)
   {
-    ls::std::boxing::Integer x{12};
+    Integer x{12};
     ASSERT_TRUE(x > 3);
   }
 
   TEST_F(IntegerTest, operator_greater_than_equals_with_reference)
   {
-    ls::std::boxing::Integer x{12};
-    ls::std::boxing::Integer y{12};
+    Integer x{12};
+    Integer y{12};
 
     ASSERT_TRUE(x >= y);
   }
 
   TEST_F(IntegerTest, operator_greater_than_equals_with_value)
   {
-    ls::std::boxing::Integer x{12};
+    Integer x{12};
     ASSERT_TRUE(x >= 12);
   }
 
   TEST_F(IntegerTest, operator_less_than_with_reference)
   {
-    ls::std::boxing::Integer x{10};
-    ls::std::boxing::Integer y{12};
+    Integer x{10};
+    Integer y{12};
 
     ASSERT_TRUE(x < y);
   }
 
   TEST_F(IntegerTest, operator_less_than_with_value)
   {
-    ls::std::boxing::Integer x{10};
+    Integer x{10};
     ASSERT_TRUE(x < 12);
   }
 
   TEST_F(IntegerTest, operator_less_than_equals_with_reference)
   {
-    ls::std::boxing::Integer x{10};
-    ls::std::boxing::Integer y{10};
+    Integer x{10};
+    Integer y{10};
 
     ASSERT_TRUE(x <= y);
   }
 
   TEST_F(IntegerTest, operator_less_than_equals_with_value)
   {
-    ls::std::boxing::Integer x{10};
+    Integer x{10};
     ASSERT_TRUE(x <= 10);
   }
 
@@ -348,47 +351,47 @@ namespace
 
   TEST_F(IntegerTest, operator_negation)
   {
-    ls::std::boxing::Integer x{};
+    Integer x{};
     ASSERT_TRUE(!x);
   }
 
   TEST_F(IntegerTest, operator_and_with_reference)
   {
-    ls::std::boxing::Integer x{1};
-    ls::std::boxing::Integer y{1};
+    Integer x{1};
+    Integer y{1};
 
     ASSERT_TRUE(x && y);
   }
 
   TEST_F(IntegerTest, operator_and_with_value)
   {
-    ls::std::boxing::Integer x{1};
+    Integer x{1};
     ASSERT_TRUE(x && 1);
   }
 
   TEST_F(IntegerTest, operator_and_with_boolean)
   {
-    ls::std::boxing::Integer x{1};
+    Integer x{1};
     ASSERT_TRUE(x && true);
   }
 
   TEST_F(IntegerTest, operator_or_with_reference)
   {
-    ls::std::boxing::Integer x{};
-    ls::std::boxing::Integer y{1};
+    Integer x{};
+    Integer y{1};
 
     ASSERT_TRUE(x || y);
   }
 
   TEST_F(IntegerTest, operator_or_with_value)
   {
-    ls::std::boxing::Integer x{};
+    Integer x{};
     ASSERT_TRUE(x || 1);
   }
 
   TEST_F(IntegerTest, operator_or_with_boolean)
   {
-    ls::std::boxing::Integer x{};
+    Integer x{};
     ASSERT_TRUE(x || true);
   }
 
@@ -396,7 +399,7 @@ namespace
 
   TEST_F(IntegerTest, operator_increment)
   {
-    ls::std::boxing::Integer x{};
+    Integer x{};
     ++x;
 
     ASSERT_EQ(1, x);
@@ -404,7 +407,7 @@ namespace
 
   TEST_F(IntegerTest, operator_decrement)
   {
-    ls::std::boxing::Integer x{};
+    Integer x{};
 
     --x;
     ASSERT_EQ(-1, x);
@@ -414,7 +417,7 @@ namespace
 
   TEST_F(IntegerTest, parse_with_positive_value)
   {
-    ls::std::boxing::Integer number{};
+    Integer number{};
 
     number.parse("1989");
     ASSERT_EQ(1989, number);
@@ -422,7 +425,7 @@ namespace
 
   TEST_F(IntegerTest, parse_with_negative_value)
   {
-    ls::std::boxing::Integer number{};
+    Integer number{};
 
     number.parse("-13");
     ASSERT_EQ(-13, number);
@@ -430,7 +433,7 @@ namespace
 
   TEST_F(IntegerTest, toString)
   {
-    ls::std::boxing::Integer number{112};
+    Integer number{112};
     ASSERT_STREQ("112", number.toString().c_str());
   }
 
@@ -438,7 +441,7 @@ namespace
 
   TEST_F(IntegerTest, getValue)
   {
-    ls::std::boxing::Integer x{3};
+    Integer x{3};
     ASSERT_EQ(3, x.getValue());
   }
 
@@ -446,7 +449,7 @@ namespace
 
   TEST_F(IntegerTest, constApproach)
   {
-    const ls::std::boxing::Integer x{3};
+    const Integer x{3};
     ASSERT_EQ(3, x);
 
     // x = 4; // wouldn't work

+ 105 - 102
test/cases/boxing/LongTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2022-05-14
+ * Changed:         2022-11-09
  *
  * */
 
@@ -11,6 +11,9 @@
 #include <ls_std/ls_std_core.hpp>
 #include <ls_std/ls_std_boxing.hpp>
 
+using namespace ls::std::boxing;
+using namespace ls::std::core;
+
 namespace
 {
   class LongTest : public ::testing::Test
@@ -32,8 +35,8 @@ namespace
 
   TEST_F(LongTest, operator_assignment_with_reference)
   {
-    ls::std::boxing::Long x{13};
-    ls::std::boxing::Long y{3};
+    Long x{13};
+    Long y{3};
     x = y;
 
     ASSERT_EQ(3, x);
@@ -41,8 +44,8 @@ namespace
 
   TEST_F(LongTest, operator_assignment_with_value)
   {
-    ls::std::boxing::Long x{13};
-    x = (ls::std::core::type::long_type) 3;
+    Long x{13};
+    x = (type::long_type) 3;
 
     ASSERT_EQ(3, x);
   }
@@ -51,8 +54,8 @@ namespace
 
   TEST_F(LongTest, operator_negative)
   {
-    ls::std::boxing::Long x{13};
-    ls::std::boxing::Long y{-13};
+    Long x{13};
+    Long y{-13};
 
     ASSERT_EQ(-13, -x);
     ASSERT_EQ(13, -y);
@@ -60,58 +63,58 @@ namespace
 
   TEST_F(LongTest, operator_add_with_reference)
   {
-    ls::std::boxing::Long x{13};
-    ls::std::boxing::Long y{7};
+    Long x{13};
+    Long y{7};
 
     ASSERT_EQ(20, x + y);
   }
 
   TEST_F(LongTest, operator_add_with_value)
   {
-    ls::std::boxing::Long x{13};
-    ASSERT_EQ(20, x + (ls::std::core::type::long_type) 7);
+    Long x{13};
+    ASSERT_EQ(20, x + (type::long_type) 7);
   }
 
   TEST_F(LongTest, operator_mul_with_reference)
   {
-    ls::std::boxing::Long x{3};
-    ls::std::boxing::Long y{7};
+    Long x{3};
+    Long y{7};
 
     ASSERT_EQ(21, x * y);
   }
 
   TEST_F(LongTest, operator_mul_with_value)
   {
-    ls::std::boxing::Long x{3};
-    ASSERT_EQ(21, x * (ls::std::core::type::long_type) 7);
+    Long x{3};
+    ASSERT_EQ(21, x * (type::long_type) 7);
   }
 
   TEST_F(LongTest, operator_sub_with_reference)
   {
-    ls::std::boxing::Long x{51};
-    ls::std::boxing::Long y{17};
+    Long x{51};
+    Long y{17};
 
     ASSERT_EQ(34, x - y);
   }
 
   TEST_F(LongTest, operator_sub_with_value)
   {
-    ls::std::boxing::Long x{51};
-    ASSERT_EQ(34, x - (ls::std::core::type::long_type) 17);
+    Long x{51};
+    ASSERT_EQ(34, x - (type::long_type) 17);
   }
 
   TEST_F(LongTest, operator_div_with_reference)
   {
-    ls::std::boxing::Long x{81};
-    ls::std::boxing::Long y{9};
+    Long x{81};
+    Long y{9};
 
     ASSERT_EQ(9, x / y);
   }
 
   TEST_F(LongTest, operator_div_with_value)
   {
-    ls::std::boxing::Long x{81};
-    ASSERT_EQ(9, x / (ls::std::core::type::long_type) 9);
+    Long x{81};
+    ASSERT_EQ(9, x / (type::long_type) 9);
   }
 
   TEST_F(LongTest, operator_div_by_zero_with_reference)
@@ -119,15 +122,15 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     ls::std::boxing::Long x{9};
-                     ls::std::boxing::Long y{0};
+                     Long x{9};
+                     Long y{0};
 
                      x = x / y;
-                   } catch (const ls::std::core::IllegalArithmeticOperationException &_exception)
+                   } catch (const IllegalArithmeticOperationException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArithmeticOperationException);
+                 }, IllegalArithmeticOperationException);
   }
 
   TEST_F(LongTest, operator_div_by_zero_with_value)
@@ -135,35 +138,35 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     ls::std::boxing::Long x{9};
-                     x = x / (ls::std::core::type::long_type) 0;
-                   } catch (const ls::std::core::IllegalArithmeticOperationException &_exception)
+                     Long x{9};
+                     x = x / (type::long_type) 0;
+                   } catch (const IllegalArithmeticOperationException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArithmeticOperationException);
+                 }, IllegalArithmeticOperationException);
   }
 
   TEST_F(LongTest, operator_mod_with_reference)
   {
-    ls::std::boxing::Long x{85};
-    ls::std::boxing::Long y{9};
+    Long x{85};
+    Long y{9};
 
     ASSERT_EQ(4, x % y);
   }
 
   TEST_F(LongTest, operator_mod_with_value)
   {
-    ls::std::boxing::Long x{85};
-    ASSERT_EQ(4, x % (ls::std::core::type::long_type) 9);
+    Long x{85};
+    ASSERT_EQ(4, x % (type::long_type) 9);
   }
 
   // compound operators
 
   TEST_F(LongTest, operator_add_equals_with_reference)
   {
-    ls::std::boxing::Long x{4};
-    ls::std::boxing::Long y{2};
+    Long x{4};
+    Long y{2};
     x += y;
 
     ASSERT_EQ(6, x);
@@ -171,16 +174,16 @@ namespace
 
   TEST_F(LongTest, operator_add_equals_with_value)
   {
-    ls::std::boxing::Long x{4};
-    x += (ls::std::core::type::long_type) 2;
+    Long x{4};
+    x += (type::long_type) 2;
 
     ASSERT_EQ(6, x);
   }
 
   TEST_F(LongTest, operator_sub_equals_with_reference)
   {
-    ls::std::boxing::Long x{14};
-    ls::std::boxing::Long y{2};
+    Long x{14};
+    Long y{2};
     x -= y;
 
     ASSERT_EQ(12, x);
@@ -188,16 +191,16 @@ namespace
 
   TEST_F(LongTest, operator_sub_equals_with_value)
   {
-    ls::std::boxing::Long x{14};
-    x -= (ls::std::core::type::long_type) 2;
+    Long x{14};
+    x -= (type::long_type) 2;
 
     ASSERT_EQ(12, x);
   }
 
   TEST_F(LongTest, operator_mul_equals_with_reference)
   {
-    ls::std::boxing::Long x{6};
-    ls::std::boxing::Long y{3};
+    Long x{6};
+    Long y{3};
     x *= y;
 
     ASSERT_EQ(18, x);
@@ -205,16 +208,16 @@ namespace
 
   TEST_F(LongTest, operator_mul_equals_with_value)
   {
-    ls::std::boxing::Long x{6};
-    x *= (ls::std::core::type::long_type) 3;
+    Long x{6};
+    x *= (type::long_type) 3;
 
     ASSERT_EQ(18, x);
   }
 
   TEST_F(LongTest, operator_div_equals_with_reference)
   {
-    ls::std::boxing::Long x{12};
-    ls::std::boxing::Long y{3};
+    Long x{12};
+    Long y{3};
     x /= y;
 
     ASSERT_EQ(4, x);
@@ -222,8 +225,8 @@ namespace
 
   TEST_F(LongTest, operator_div_equals_with_value)
   {
-    ls::std::boxing::Long x{12};
-    x /= (ls::std::core::type::long_type) 3;
+    Long x{12};
+    x /= (type::long_type) 3;
 
     ASSERT_EQ(4, x);
   }
@@ -233,15 +236,15 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     ls::std::boxing::Long x{9};
-                     ls::std::boxing::Long y{0};
+                     Long x{9};
+                     Long y{0};
 
                      x = x /= y;
-                   } catch (const ls::std::core::IllegalArithmeticOperationException &_exception)
+                   } catch (const IllegalArithmeticOperationException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArithmeticOperationException);
+                 }, IllegalArithmeticOperationException);
   }
 
   TEST_F(LongTest, operator_div_equals_by_zero_with_value)
@@ -249,148 +252,148 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     ls::std::boxing::Long x{9};
-                     x = x /= (ls::std::core::type::long_type) 0;
-                   } catch (const ls::std::core::IllegalArithmeticOperationException &_exception)
+                     Long x{9};
+                     x = x /= (type::long_type) 0;
+                   } catch (const IllegalArithmeticOperationException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArithmeticOperationException);
+                 }, IllegalArithmeticOperationException);
   }
 
   // comparison operators
 
   TEST_F(LongTest, operator_equals_with_reference)
   {
-    ls::std::boxing::Long x{12};
-    ls::std::boxing::Long y{12};
+    Long x{12};
+    Long y{12};
 
     ASSERT_TRUE(x == y);
   }
 
   TEST_F(LongTest, operator_equals_with_value)
   {
-    ls::std::boxing::Long x{12};
-    ASSERT_TRUE(x == (ls::std::core::type::long_type) 12);
+    Long x{12};
+    ASSERT_TRUE(x == (type::long_type) 12);
   }
 
   TEST_F(LongTest, operator_not_equals_with_reference)
   {
-    ls::std::boxing::Long x{12};
-    ls::std::boxing::Long y{3};
+    Long x{12};
+    Long y{3};
 
     ASSERT_TRUE(x != y);
   }
 
   TEST_F(LongTest, operator_not_equals_with_value)
   {
-    ls::std::boxing::Long x{12};
-    ASSERT_TRUE(x != (ls::std::core::type::long_type) 3);
+    Long x{12};
+    ASSERT_TRUE(x != (type::long_type) 3);
   }
 
   TEST_F(LongTest, operator_greater_than_with_reference)
   {
-    ls::std::boxing::Long x{12};
-    ls::std::boxing::Long y{3};
+    Long x{12};
+    Long y{3};
 
     ASSERT_TRUE(x > y);
   }
 
   TEST_F(LongTest, operator_greater_than_with_value)
   {
-    ls::std::boxing::Long x{12};
-    ASSERT_TRUE(x > (ls::std::core::type::long_type) 3);
+    Long x{12};
+    ASSERT_TRUE(x > (type::long_type) 3);
   }
 
   TEST_F(LongTest, operator_greater_than_equals_with_reference)
   {
-    ls::std::boxing::Long x{12};
-    ls::std::boxing::Long y{12};
+    Long x{12};
+    Long y{12};
 
     ASSERT_TRUE(x >= y);
   }
 
   TEST_F(LongTest, operator_greater_than_equals_with_value)
   {
-    ls::std::boxing::Long x{12};
-    ASSERT_TRUE(x >= (ls::std::core::type::long_type) 12);
+    Long x{12};
+    ASSERT_TRUE(x >= (type::long_type) 12);
   }
 
   TEST_F(LongTest, operator_less_than_with_reference)
   {
-    ls::std::boxing::Long x{10};
-    ls::std::boxing::Long y{12};
+    Long x{10};
+    Long y{12};
 
     ASSERT_TRUE(x < y);
   }
 
   TEST_F(LongTest, operator_less_than_with_value)
   {
-    ls::std::boxing::Long x{10};
-    ls::std::boxing::Long y{12};
+    Long x{10};
+    Long y{12};
 
-    ASSERT_TRUE(x < (ls::std::core::type::long_type) 12);
+    ASSERT_TRUE(x < (type::long_type) 12);
   }
 
   TEST_F(LongTest, operator_less_than_equals_with_reference)
   {
-    ls::std::boxing::Long x{10};
-    ls::std::boxing::Long y{10};
+    Long x{10};
+    Long y{10};
 
     ASSERT_TRUE(x <= y);
   }
 
   TEST_F(LongTest, operator_less_than_equals_with_value)
   {
-    ls::std::boxing::Long x{10};
-    ASSERT_TRUE(x <= (ls::std::core::type::long_type) 10);
+    Long x{10};
+    ASSERT_TRUE(x <= (type::long_type) 10);
   }
 
   // logical operators
 
   TEST_F(LongTest, operator_negation)
   {
-    ls::std::boxing::Long x{};
+    Long x{};
     ASSERT_TRUE(!x);
   }
 
   TEST_F(LongTest, operator_and_with_reference)
   {
-    ls::std::boxing::Long x{1};
-    ls::std::boxing::Long y{1};
+    Long x{1};
+    Long y{1};
 
     ASSERT_TRUE(x && y);
   }
 
   TEST_F(LongTest, operator_and_with_value)
   {
-    ls::std::boxing::Long x{1};
-    ASSERT_TRUE(x && (ls::std::core::type::long_type) 1);
+    Long x{1};
+    ASSERT_TRUE(x && (type::long_type) 1);
   }
 
   TEST_F(LongTest, operator_and_with_boolean)
   {
-    ls::std::boxing::Long x{1};
+    Long x{1};
     ASSERT_TRUE(x && true);
   }
 
   TEST_F(LongTest, operator_or_with_reference)
   {
-    ls::std::boxing::Long x{};
-    ls::std::boxing::Long y{1};
+    Long x{};
+    Long y{1};
 
     ASSERT_TRUE(x || y);
   }
 
   TEST_F(LongTest, operator_or_with_value)
   {
-    ls::std::boxing::Long x{};
-    ASSERT_TRUE(x || (ls::std::core::type::long_type) 1);
+    Long x{};
+    ASSERT_TRUE(x || (type::long_type) 1);
   }
 
   TEST_F(LongTest, operator_or_with_boolean)
   {
-    ls::std::boxing::Long x{};
+    Long x{};
     ASSERT_TRUE(x || true);
   }
 
@@ -398,7 +401,7 @@ namespace
 
   TEST_F(LongTest, operator_increment)
   {
-    ls::std::boxing::Long x{};
+    Long x{};
     ++x;
 
     ASSERT_EQ(1, x);
@@ -406,7 +409,7 @@ namespace
 
   TEST_F(LongTest, operator_decrement)
   {
-    ls::std::boxing::Long x{};
+    Long x{};
     --x;
 
     ASSERT_EQ(-1, x);
@@ -416,7 +419,7 @@ namespace
 
   TEST_F(LongTest, parse_with_positive_value)
   {
-    ls::std::boxing::Long x{};
+    Long x{};
 
     x.parse("1989");
     ASSERT_EQ(1989, x);
@@ -424,7 +427,7 @@ namespace
 
   TEST_F(LongTest, parse_with_negative_value)
   {
-    ls::std::boxing::Long x{};
+    Long x{};
 
     x.parse("-17");
     ASSERT_EQ(-17, x);
@@ -432,7 +435,7 @@ namespace
 
   TEST_F(LongTest, toString)
   {
-    ls::std::boxing::Long x{112};
+    Long x{112};
     ASSERT_STREQ("112", x.toString().c_str());
   }
 
@@ -440,7 +443,7 @@ namespace
 
   TEST_F(LongTest, getValue)
   {
-    ls::std::boxing::Long x{3};
+    Long x{3};
     ASSERT_EQ(3, x.getValue());
   }
 
@@ -448,7 +451,7 @@ namespace
 
   TEST_F(LongTest, constApproach)
   {
-    const ls::std::boxing::Long x{3};
+    const Long x{3};
     ASSERT_EQ(3, x);
 
     // x = 4; // wouldn't work

+ 40 - 37
test/cases/boxing/StringTest.cpp

@@ -3,13 +3,16 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2022-05-20
+ * Changed:         2022-11-09
  *
  * */
 
 #include <gtest/gtest.h>
 #include <ls_std/ls_std_boxing.hpp>
 
+using namespace ls::std::boxing;
+using namespace ::std;
+
 namespace
 {
   class StringTest : public ::testing::Test
@@ -30,7 +33,7 @@ namespace
 
   TEST_F(StringTest, operator_assignment)
   {
-    ls::std::boxing::String text{};
+    String text{};
     text = "Hi!";
 
     ASSERT_STREQ("Hi!", text.toString().c_str());
@@ -40,9 +43,9 @@ namespace
 
   TEST_F(StringTest, operator_add)
   {
-    ls::std::boxing::String greetings{"Hello! "};
-    ls::std::boxing::String question{"How are you? "};
-    const ::std::string& answer = "I'm good by the way!";
+    String greetings{"Hello! "};
+    String question{"How are you? "};
+    const string& answer = "I'm good by the way!";
 
     greetings = greetings + question + answer;
 
@@ -51,7 +54,7 @@ namespace
 
   TEST_F(StringTest, operator_minus)
   {
-    ls::std::boxing::String text{"abcdefghij"};
+    String text{"abcdefghij"};
     text = text - 5;
 
     ASSERT_STREQ("abcde", text.toString().c_str());
@@ -61,8 +64,8 @@ namespace
 
   TEST_F(StringTest, operator_add_assign_with_reference)
   {
-    ls::std::boxing::String text{};
-    ls::std::boxing::String hello{"Hi!"};
+    String text{};
+    String hello{"Hi!"};
 
     text += hello;
     ASSERT_STREQ("Hi!", text.toString().c_str());
@@ -70,7 +73,7 @@ namespace
 
   TEST_F(StringTest, operator_add_assign_with_value)
   {
-    ls::std::boxing::String text{};
+    String text{};
 
     text += "Hi!";
     ASSERT_STREQ("Hi!", text.toString().c_str());
@@ -80,8 +83,8 @@ namespace
 
   TEST_F(StringTest, operator_equals_with_reference)
   {
-    ls::std::boxing::String text{"Hi!"};
-    ls::std::boxing::String hello{"Hi!"};
+    String text{"Hi!"};
+    String hello{"Hi!"};
 
     ASSERT_TRUE(text == hello);
     ASSERT_TRUE(hello == text);
@@ -89,21 +92,21 @@ namespace
 
   TEST_F(StringTest, operator_equals_with_value)
   {
-    ls::std::boxing::String hello{"Hi!"};
+    String hello{"Hi!"};
     ASSERT_TRUE(hello == "Hi!");
   }
 
   TEST_F(StringTest, operator_not_equals_with_reference)
   {
-    ls::std::boxing::String text{"Hi!"};
-    ls::std::boxing::String hello{"Hello!"};
+    String text{"Hi!"};
+    String hello{"Hello!"};
 
     ASSERT_TRUE(text != hello);
   }
 
   TEST_F(StringTest, operator_not_equals_with_value)
   {
-    ls::std::boxing::String text{"Hi!"};
+    String text{"Hi!"};
     ASSERT_TRUE(text != "Hello!");
   }
 
@@ -111,7 +114,7 @@ namespace
 
   TEST_F(StringTest, parse)
   {
-    ls::std::boxing::String text{};
+    String text{};
     text.parse("Hello!");
 
     ASSERT_STREQ("Hello!", text.toString().c_str());
@@ -119,7 +122,7 @@ namespace
 
   TEST_F(StringTest, toString)
   {
-    ls::std::boxing::String text{"Hello!"};
+    String text{"Hello!"};
     ASSERT_STREQ("Hello!", text.toString().c_str());
   }
 
@@ -127,7 +130,7 @@ namespace
 
   TEST_F(StringTest, contains)
   {
-    ls::std::boxing::String text{};
+    String text{};
     text = "Hey, I'm searching for the keyword 'cake'!";
 
     ASSERT_TRUE(text.contains("cake"));
@@ -135,7 +138,7 @@ namespace
 
   TEST_F(StringTest, contains_does_not_contain_search_word)
   {
-    ls::std::boxing::String text{};
+    String text{};
     text = "Hey, I'm searching for the keyword 'cake'!";
 
     ASSERT_FALSE(text.contains("butter"));
@@ -143,7 +146,7 @@ namespace
 
   TEST_F(StringTest, endsWith)
   {
-    ls::std::boxing::String text{};
+    String text{};
     text = "abcdef";
 
     ASSERT_TRUE(text.endsWith("ef"));
@@ -151,7 +154,7 @@ namespace
 
   TEST_F(StringTest, endsWith_does_not_end_with_pattern)
   {
-    ls::std::boxing::String text{};
+    String text{};
     text = "abcdef";
 
     ASSERT_FALSE(text.endsWith("efg"));
@@ -159,8 +162,8 @@ namespace
 
   TEST_F(StringTest, equalsIgnoreCase)
   {
-    ls::std::boxing::String text{"Hello!"};
-    ls::std::boxing::String hello{"HeLLo!"};
+    String text{"Hello!"};
+    String hello{"HeLLo!"};
 
     ASSERT_TRUE(text.equalsIgnoreCase(hello));
     ASSERT_TRUE(text.equalsIgnoreCase("HeLLO!"));
@@ -168,16 +171,16 @@ namespace
 
   TEST_F(StringTest, getByteData)
   {
-    ls::std::boxing::String text{"Hallo!"};
+    String text{"Hallo!"};
     ASSERT_STREQ("Hallo!", text.getByteData().data());
   }
 
   TEST_F(StringTest, padLeft)
   {
-    ls::std::boxing::String text{"abcdef"};
-    ls::std::boxing::String anotherText{"ab"};
-    ls::std::boxing::String emptyText{};
-    ls::std::boxing::String longText{"This text is too long to fill!"};
+    String text{"abcdef"};
+    String anotherText{"ab"};
+    String emptyText{};
+    String longText{"This text is too long to fill!"};
 
     ASSERT_STREQ("    abcdef", text.padLeft(10, ' ').c_str());
     ASSERT_STREQ("        ab", anotherText.padLeft(10, ' ').c_str());
@@ -187,10 +190,10 @@ namespace
 
   TEST_F(StringTest, padRight)
   {
-    ls::std::boxing::String text{"abcdef"};
-    ls::std::boxing::String anotherText{"ab"};
-    ls::std::boxing::String emptyText{};
-    ls::std::boxing::String longText{"This text is too long to fill!"};
+    String text{"abcdef"};
+    String anotherText{"ab"};
+    String emptyText{};
+    String longText{"This text is too long to fill!"};
 
     ASSERT_STREQ("abcdef    ", text.padRight(10, ' ').c_str());
     ASSERT_STREQ("ab        ", anotherText.padRight(10, ' ').c_str());
@@ -200,7 +203,7 @@ namespace
 
   TEST_F(StringTest, reverse)
   {
-    ls::std::boxing::String text{};
+    String text{};
     text = "abcdef";
 
     ASSERT_STREQ("fedcba", text.reverse().c_str());
@@ -209,7 +212,7 @@ namespace
 
   TEST_F(StringTest, startsWith)
   {
-    ls::std::boxing::String text{};
+    String text{};
     text = "abcdef";
 
     ASSERT_TRUE(text.startsWith("abc"));
@@ -217,7 +220,7 @@ namespace
 
   TEST_F(StringTest, startsWith_does_not_start_with_pattern)
   {
-    ls::std::boxing::String text{};
+    String text{};
     text = "abcdef";
 
     ASSERT_FALSE(text.startsWith("bc"));
@@ -225,7 +228,7 @@ namespace
 
   TEST_F(StringTest, toLowerCase)
   {
-    ls::std::boxing::String text{};
+    String text{};
     text = "aBCdeFgHIJKLmn";
 
     ASSERT_STREQ("abcdefghijklmn", text.toLowerCase().c_str());
@@ -234,7 +237,7 @@ namespace
 
   TEST_F(StringTest, toUpperCase)
   {
-    ls::std::boxing::String text{};
+    String text{};
     text = "aBCdeFgHIJKLmn";
 
     ASSERT_STREQ("ABCDEFGHIJKLMN", text.toUpperCase().c_str());

+ 10 - 6
test/cases/core/ClassTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-16
- * Changed:         2022-05-20
+ * Changed:         2022-11-09
  *
  * */
 
@@ -11,6 +11,10 @@
 #include <ls_std/ls_std_core.hpp>
 #include <ls_std_core_test.hpp>
 
+using namespace ls::std::core;
+using namespace ::std;
+using namespace ls_std_core_test;
+
 namespace
 {
   class ClassTest : public ::testing::Test
@@ -32,24 +36,24 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     ls::std::core::Class object{""};
+                     Class object{""};
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 
   TEST_F(ClassTest, destructor)
   {
-    ::std::shared_ptr<ls_std_core_test::ClassWrapper> object = ::std::make_shared<ls_std_core_test::ClassWrapper>();
+    shared_ptr<ClassWrapper> object = make_shared<ClassWrapper>();
     EXPECT_CALL(*object, Die());
   }
 
   TEST_F(ClassTest, getClassName)
   {
-    ls::std::core::Class object{"Class"};
+    Class object{"Class"};
     ASSERT_STREQ("Class", object.getClassName().c_str());
   }
 

+ 4 - 2
test/cases/core/LibraryVersionTest.cpp

@@ -3,13 +3,15 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-02
- * Changed:         2022-08-09
+ * Changed:         2022-11-09
  *
  * */
 
 #include <gtest/gtest.h>
 #include <ls_std/ls_std_core.hpp>
 
+using namespace ls::std::core;
+
 namespace
 {
   class LibraryVersionTest : public ::testing::Test
@@ -28,6 +30,6 @@ namespace
 
   TEST_F(LibraryVersionTest, getVersion)
   {
-    ASSERT_STREQ("2022.3.0", ls::std::core::getVersion().c_str());
+    ASSERT_STREQ("2022.3.0", getVersion().c_str());
   }
 }

+ 18 - 16
test/cases/core/VersionTest.cpp

@@ -3,13 +3,15 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-28
- * Changed:         2022-05-13
+ * Changed:         2022-11-09
  *
  * */
 
 #include <gtest/gtest.h>
 #include <ls_std/ls_std_core.hpp>
 
+using namespace ls::std::core;
+
 namespace
 {
   class VersionTest : public ::testing::Test
@@ -30,13 +32,13 @@ namespace
 
   TEST_F(VersionTest, marshal)
   {
-    ls::std::core::Version version{2020, 2, 0};
+    Version version{2020, 2, 0};
     ASSERT_STREQ("2020.2.0", version.marshal().c_str());
   }
 
   TEST_F(VersionTest, unmarshal)
   {
-    ls::std::core::Version version{0, 0, 0};
+    Version version{0, 0, 0};
     version.unmarshal("2020.2.13");
 
     ASSERT_EQ(2020, version.getMajorVersion());
@@ -48,44 +50,44 @@ namespace
 
   TEST_F(VersionTest, getMajorVersion)
   {
-    ls::std::core::Version version{13, 2, 4};
+    Version version{13, 2, 4};
     ASSERT_EQ(13, version.getMajorVersion());
   }
 
   TEST_F(VersionTest, getMinorVersion)
   {
-    ls::std::core::Version version{13, 2, 4};
+    Version version{13, 2, 4};
     ASSERT_EQ(2, version.getMinorVersion());
   }
 
   TEST_F(VersionTest, getPatchVersion)
   {
-    ls::std::core::Version version{13, 2, 4};
+    Version version{13, 2, 4};
     ASSERT_EQ(4, version.getPatchVersion());
   }
 
   TEST_F(VersionTest, isValid)
   {
-    ASSERT_TRUE(ls::std::core::Version::isValid("2020.1.2"));
-    ASSERT_TRUE(ls::std::core::Version::isValid("2.5.1"));
+    ASSERT_TRUE(Version::isValid("2020.1.2"));
+    ASSERT_TRUE(Version::isValid("2.5.1"));
   }
 
   TEST_F(VersionTest, isValid_emptyString)
   {
-    ASSERT_FALSE(ls::std::core::Version::isValid(""));
+    ASSERT_FALSE(Version::isValid(""));
   }
 
   TEST_F(VersionTest, isValid_noValidVersionString)
   {
-    ASSERT_FALSE(ls::std::core::Version::isValid("v2020.1.2"));
-    ASSERT_FALSE(ls::std::core::Version::isValid("2.5"));
-    ASSERT_FALSE(ls::std::core::Version::isValid("2020"));
-    ASSERT_FALSE(ls::std::core::Version::isValid("blaaaa"));
+    ASSERT_FALSE(Version::isValid("v2020.1.2"));
+    ASSERT_FALSE(Version::isValid("2.5"));
+    ASSERT_FALSE(Version::isValid("2020"));
+    ASSERT_FALSE(Version::isValid("blaaaa"));
   }
 
   TEST_F(VersionTest, setMajorVersion)
   {
-    ls::std::core::Version version{13, 2, 4};
+    Version version{13, 2, 4};
     ASSERT_EQ(13, version.getMajorVersion());
 
     version.setMajorVersion(14);
@@ -94,7 +96,7 @@ namespace
 
   TEST_F(VersionTest, setMinorVersion)
   {
-    ls::std::core::Version version{13, 2, 4};
+    Version version{13, 2, 4};
     ASSERT_EQ(2, version.getMinorVersion());
 
     version.setMinorVersion(3);
@@ -103,7 +105,7 @@ namespace
 
   TEST_F(VersionTest, setPatchVersion)
   {
-    ls::std::core::Version version{13, 2, 4};
+    Version version{13, 2, 4};
     ASSERT_EQ(4, version.getPatchVersion());
 
     version.setPatchVersion(5);

+ 6 - 4
test/cases/core/exception/EventNotHandledExceptionTest.cpp

@@ -3,13 +3,15 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-27
- * Changed:         2022-05-13
+ * Changed:         2022-11-09
  *
  * */
 
 #include <gtest/gtest.h>
 #include <ls_std/ls_std_core.hpp>
 
+using namespace ls::std::core;
+
 namespace
 {
   class EventNotHandledExceptionTest : public ::testing::Test
@@ -31,13 +33,13 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     throw ls::std::core::EventNotHandledException{};
+                     throw EventNotHandledException{};
                    }
-                   catch (const ls::std::core::EventNotHandledException &_exception)
+                   catch (const EventNotHandledException &_exception)
                    {
                      EXPECT_STREQ("EventNotHandledException thrown - event was not handled - nothing happened!", _exception.what());
                      throw;
                    }
-                 }, ls::std::core::EventNotHandledException);
+                 }, EventNotHandledException);
   }
 }

+ 6 - 4
test/cases/core/exception/EventNotSubscribedExceptionTest.cpp

@@ -3,13 +3,15 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-27
- * Changed:         2022-05-13
+ * Changed:         2022-11-09
  *
  * */
 
 #include <gtest/gtest.h>
 #include <ls_std/ls_std_core.hpp>
 
+using namespace ls::std::core;
+
 namespace
 {
   class EventNotSubscribedExceptionTest : public ::testing::Test
@@ -31,13 +33,13 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     throw ls::std::core::EventNotSubscribedException{};
+                     throw EventNotSubscribedException{};
                    }
-                   catch (const ls::std::core::EventNotSubscribedException &_exception)
+                   catch (const EventNotSubscribedException &_exception)
                    {
                      EXPECT_STREQ("EventNotSubscribedException thrown - event was not subscribed!", _exception.what());
                      throw;
                    }
-                 }, ls::std::core::EventNotSubscribedException);
+                 }, EventNotSubscribedException);
   }
 }

+ 6 - 4
test/cases/core/exception/FileNotFoundExceptionTest.cpp

@@ -3,13 +3,15 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-01
- * Changed:         2022-05-13
+ * Changed:         2022-11-09
  *
  * */
 
 #include <gtest/gtest.h>
 #include <ls_std/ls_std_core.hpp>
 
+using namespace ls::std::core;
+
 namespace
 {
   class FileNotFoundExceptionTest : public ::testing::Test
@@ -31,13 +33,13 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     throw ls::std::core::FileNotFoundException{};
+                     throw FileNotFoundException{};
                    }
-                   catch (const ls::std::core::FileNotFoundException &_exception)
+                   catch (const FileNotFoundException &_exception)
                    {
                      EXPECT_STREQ("FileNotFoundException thrown - file not found!", _exception.what());
                      throw;
                    }
-                 }, ls::std::core::FileNotFoundException);
+                 }, FileNotFoundException);
   }
 }

+ 6 - 4
test/cases/core/exception/FileOperationExceptionTest.cpp

@@ -3,13 +3,15 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-01
- * Changed:         2022-05-13
+ * Changed:         2022-11-09
  *
  * */
 
 #include <gtest/gtest.h>
 #include <ls_std/ls_std_core.hpp>
 
+using namespace ls::std::core;
+
 namespace
 {
   class FileOperationExceptionTest : public ::testing::Test
@@ -31,13 +33,13 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     throw ls::std::core::FileOperationException{};
+                     throw FileOperationException{};
                    }
-                   catch (const ls::std::core::FileOperationException &_exception)
+                   catch (const FileOperationException &_exception)
                    {
                      EXPECT_STREQ("FileOperationException thrown - file operation failed!", _exception.what());
                      throw;
                    }
-                 }, ls::std::core::FileOperationException);
+                 }, FileOperationException);
   }
 }

+ 6 - 4
test/cases/core/exception/IllegalArgumentExceptionTest.cpp

@@ -3,13 +3,15 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-01
- * Changed:         2022-05-13
+ * Changed:         2022-11-09
  *
  * */
 
 #include <gtest/gtest.h>
 #include <ls_std/ls_std_core.hpp>
 
+using namespace ls::std::core;
+
 namespace
 {
   class IllegalArgumentExceptionTest : public ::testing::Test
@@ -31,13 +33,13 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     throw ls::std::core::IllegalArgumentException{};
+                     throw IllegalArgumentException{};
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      EXPECT_STREQ("IllegalArgumentException thrown - passed argument is not valid!", _exception.what());
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 }

+ 6 - 4
test/cases/core/exception/IllegalArithmeticOperationExceptionTest.cpp

@@ -3,13 +3,15 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-01
- * Changed:         2022-05-13
+ * Changed:         2022-11-09
  *
  * */
 
 #include <gtest/gtest.h>
 #include <ls_std/ls_std_core.hpp>
 
+using namespace ls::std::core;
+
 namespace
 {
   class IllegalArithmeticOperationExceptionTest : public ::testing::Test
@@ -31,13 +33,13 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     throw ls::std::core::IllegalArithmeticOperationException{};
+                     throw IllegalArithmeticOperationException{};
                    }
-                   catch (const ls::std::core::IllegalArithmeticOperationException &_exception)
+                   catch (const IllegalArithmeticOperationException &_exception)
                    {
                      EXPECT_STREQ("IllegalArithmeticOperationException thrown - arithmetic operation is not allowed!", _exception.what());
                      throw;
                    }
-                 }, ls::std::core::IllegalArithmeticOperationException);
+                 }, IllegalArithmeticOperationException);
   }
 }

+ 6 - 4
test/cases/core/exception/IncompleteJsonExceptionTest.cpp

@@ -3,13 +3,15 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-01
- * Changed:         2022-05-13
+ * Changed:         2022-11-09
  *
  * */
 
 #include <gtest/gtest.h>
 #include <ls_std/ls_std_core.hpp>
 
+using namespace ls::std::core;
+
 namespace
 {
   class IncompleteJsonExceptionTest : public ::testing::Test
@@ -31,13 +33,13 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     throw ls::std::core::IncompleteJsonException{};
+                     throw IncompleteJsonException{};
                    }
-                   catch (const ls::std::core::IncompleteJsonException &_exception)
+                   catch (const IncompleteJsonException &_exception)
                    {
                      EXPECT_STREQ("IncompleteJsonException thrown - this JSON string is incomplete.", _exception.what());
                      throw;
                    }
-                 }, ls::std::core::IncompleteJsonException);
+                 }, IncompleteJsonException);
   }
 }

+ 6 - 4
test/cases/core/exception/NullPointerExceptionTest.cpp

@@ -3,13 +3,15 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-01
- * Changed:         2022-05-13
+ * Changed:         2022-11-09
  *
  * */
 
 #include <gtest/gtest.h>
 #include <ls_std/ls_std_core.hpp>
 
+using namespace ls::std::core;
+
 namespace
 {
   class NullPointerExceptionTest : public ::testing::Test
@@ -31,13 +33,13 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     throw ls::std::core::NullPointerException{};
+                     throw NullPointerException{};
                    }
-                   catch (const ls::std::core::NullPointerException &_exception)
+                   catch (const NullPointerException &_exception)
                    {
                      EXPECT_STREQ("NullPointerException thrown - reference is null!", _exception.what());
                      throw;
                    }
-                 }, ls::std::core::NullPointerException);
+                 }, NullPointerException);
   }
 }

+ 6 - 3
test/cases/core/utils/RegexUtilsTest.cpp

@@ -3,13 +3,16 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-18
- * Changed:         2022-05-20
+ * Changed:         2022-11-09
  *
  * */
 
 #include <gtest/gtest.h>
 #include <ls_std/ls_std_core.hpp>
 
+using namespace ls::std::core;
+using namespace ::std;
+
 namespace
 {
   class RegexUtilsTest : public ::testing::Test
@@ -28,10 +31,10 @@ namespace
 
   TEST_F(RegexUtilsTest, escapeString)
   {
-    ::std::string escapedString = ls::std::core::RegexUtils::escapeString("Hello?!");
+    string escapedString = RegexUtils::escapeString("Hello?!");
     ASSERT_STREQ(R"(Hello\?!)", escapedString.c_str());
 
-    escapedString = ls::std::core::RegexUtils::escapeString(R"(\)");
+    escapedString = RegexUtils::escapeString(R"(\)");
     ASSERT_STREQ(R"(\\)", escapedString.c_str());
   }
 }

+ 32 - 29
test/cases/core/utils/STLUtilsTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2022-05-20
+ * Changed:         2022-11-09
  *
  * */
 
@@ -13,6 +13,9 @@
 #include <list>
 #include <string>
 
+using namespace ls::std::core;
+using namespace ::std;
+
 namespace
 {
   class STLUtilsTest : public ::testing::Test
@@ -31,52 +34,52 @@ namespace
 
   TEST_F(STLUtilsTest, contains)
   {
-    ::std::vector<int> values{1, 13, 7, 8};
-    ::std::list<::std::string> names{"Tim", "Alex", "Nadine"};
+    vector<int> values{1, 13, 7, 8};
+    list<string> names{"Tim", "Alex", "Nadine"};
 
-    ASSERT_TRUE((ls::std::core::STLUtils::contains(values, 1)));
-    ASSERT_TRUE((ls::std::core::STLUtils::contains(values, 13)));
-    ASSERT_TRUE((ls::std::core::STLUtils::contains(values, 7)));
-    ASSERT_TRUE((ls::std::core::STLUtils::contains(values, 8)));
+    ASSERT_TRUE((STLUtils::contains(values, 1)));
+    ASSERT_TRUE((STLUtils::contains(values, 13)));
+    ASSERT_TRUE((STLUtils::contains(values, 7)));
+    ASSERT_TRUE((STLUtils::contains(values, 8)));
 
-    ASSERT_TRUE((ls::std::core::STLUtils::contains(names, "Tim")));
-    ASSERT_TRUE((ls::std::core::STLUtils::contains(names, "Alex")));
-    ASSERT_TRUE((ls::std::core::STLUtils::contains(names, "Nadine")));
+    ASSERT_TRUE((STLUtils::contains(names, "Tim")));
+    ASSERT_TRUE((STLUtils::contains(names, "Alex")));
+    ASSERT_TRUE((STLUtils::contains(names, "Nadine")));
   }
 
   TEST_F(STLUtilsTest, containsNegative)
   {
-    ::std::vector<int> values{1, 13, 7, 8};
-    ::std::list<::std::string> names{"Tim", "Alex", "Nadine"};
+    vector<int> values{1, 13, 7, 8};
+    list<string> names{"Tim", "Alex", "Nadine"};
 
-    ASSERT_FALSE((ls::std::core::STLUtils::contains(values, 55)));
-    ASSERT_FALSE((ls::std::core::STLUtils::contains(values, 9)));
+    ASSERT_FALSE((STLUtils::contains(values, 55)));
+    ASSERT_FALSE((STLUtils::contains(values, 9)));
 
-    ASSERT_FALSE((ls::std::core::STLUtils::contains(names, "Lena")));
-    ASSERT_FALSE((ls::std::core::STLUtils::contains(names, "Mirco")));
+    ASSERT_FALSE((STLUtils::contains(names, "Lena")));
+    ASSERT_FALSE((STLUtils::contains(names, "Mirco")));
   }
 
   TEST_F(STLUtilsTest, getListElementAt)
   {
-    ::std::list<int> values{1, 13, 7, 8};
-    ::std::list<::std::string> names{"Tim", "Alex", "Nadine"};
+    list<int> values{1, 13, 7, 8};
+    list<string> names{"Tim", "Alex", "Nadine"};
 
-    ASSERT_EQ(1, (ls::std::core::STLUtils::getListElementAt(values, 0)));
-    ASSERT_EQ(13, (ls::std::core::STLUtils::getListElementAt(values, 1)));
-    ASSERT_EQ(7, (ls::std::core::STLUtils::getListElementAt(values, 2)));
-    ASSERT_EQ(8, (ls::std::core::STLUtils::getListElementAt(values, 3)));
+    ASSERT_EQ(1, (STLUtils::getListElementAt(values, 0)));
+    ASSERT_EQ(13, (STLUtils::getListElementAt(values, 1)));
+    ASSERT_EQ(7, (STLUtils::getListElementAt(values, 2)));
+    ASSERT_EQ(8, (STLUtils::getListElementAt(values, 3)));
 
-    ASSERT_STREQ("Tim", ls::std::core::STLUtils::getListElementAt(names, 0).c_str());
-    ASSERT_STREQ("Alex", ls::std::core::STLUtils::getListElementAt(names, 1).c_str());
-    ASSERT_STREQ("Nadine", ls::std::core::STLUtils::getListElementAt(names, 2).c_str());
+    ASSERT_STREQ("Tim", STLUtils::getListElementAt(names, 0).c_str());
+    ASSERT_STREQ("Alex", STLUtils::getListElementAt(names, 1).c_str());
+    ASSERT_STREQ("Nadine", STLUtils::getListElementAt(names, 2).c_str());
   }
 
   TEST_F(STLUtilsTest, getListElementAtNegative)
   {
-    ::std::list<int> values{1, 13, 7, 8};
-    ::std::list<::std::string> names{"Tim", "Alex", "Nadine"};
+    list<int> values{1, 13, 7, 8};
+    list<string> names{"Tim", "Alex", "Nadine"};
 
-    ASSERT_EQ(0, (ls::std::core::STLUtils::getListElementAt(values, 15)));
-    ASSERT_STREQ("", ls::std::core::STLUtils::getListElementAt(names, 15).c_str());
+    ASSERT_EQ(0, (STLUtils::getListElementAt(values, 15)));
+    ASSERT_STREQ("", STLUtils::getListElementAt(names, 15).c_str());
   }
 }

+ 5 - 3
test/cases/encoding/Base64Test.cpp

@@ -3,13 +3,15 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2022-01-08
- * Changed:         2022-05-20
+ * Changed:         2022-11-09
  *
  * */
 
 #include <gtest/gtest.h>
 #include <ls_std/ls_std_encoding.hpp>
 
+using namespace ls::std::encoding;
+
 namespace
 {
   class Base64Test : public ::testing::Test
@@ -28,7 +30,7 @@ namespace
 
   TEST_F(Base64Test, encode)
   {
-    ls::std::encoding::Base64 base64{};
+    Base64 base64{};
 
     ASSERT_STREQ("YWJj", base64.encode("abc").c_str());
     ASSERT_STREQ("YWJjZGU=", base64.encode("abcde").c_str());
@@ -38,7 +40,7 @@ namespace
 
   TEST_F(Base64Test, decode)
   {
-    ls::std::encoding::Base64 base64{};
+    Base64 base64{};
 
     ASSERT_STREQ("abc", base64.decode("YWJj").c_str());
     ASSERT_STREQ("abcde", base64.decode("YWJjZGU=").c_str());

+ 8 - 5
test/cases/event/EventHandlerTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-27
- * Changed:         2022-05-14
+ * Changed:         2022-11-09
  *
  * */
 
@@ -11,6 +11,9 @@
 #include <ls_std/ls_std_core.hpp>
 #include <ls_std/ls_std_event.hpp>
 
+using namespace ls::std::core;
+using namespace ls::std::event;
+
 namespace
 {
   class EventHandlerTest : public ::testing::Test
@@ -32,18 +35,18 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     ls::std::event::EventHandler eventHandler{""};
+                     EventHandler eventHandler{""};
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 
   TEST_F(EventHandlerTest, getId)
   {
-    ls::std::event::EventHandler eventHandler{"EventId"};
+    EventHandler eventHandler{"EventId"};
     ASSERT_STREQ("EventId", eventHandler.getId().c_str());
   }
 }

+ 64 - 58
test/cases/event/EventManagerTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-27
- * Changed:         2022-05-20
+ * Changed:         2022-11-09
  *
  * */
 
@@ -11,6 +11,12 @@
 #include <ls_std/ls_std_event.hpp>
 #include <ls_std_event_test.hpp>
 
+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;
+
 namespace
 {
   class EventManagerTest : public ::testing::Test
@@ -29,7 +35,7 @@ namespace
 
   TEST_F(EventManagerTest, getClassName)
   {
-    ls::std::event::EventManager eventManager{};
+    EventManager eventManager{};
     ASSERT_STREQ("EventManager", eventManager.getClassName().c_str());
   }
 
@@ -38,14 +44,14 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     ls::std::event::EventManager eventManager{};
-                     eventManager.subscribe("", ::std::make_shared<ls_std_event_test::DailyNewsAgency>());
+                     EventManager eventManager{};
+                     eventManager.subscribe("", make_shared<DailyNewsAgency>());
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 
   TEST_F(EventManagerTest, subscribe_no_listener)
@@ -53,14 +59,14 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     ls::std::event::EventManager eventManager{};
+                     EventManager eventManager{};
                      eventManager.subscribe("TMP_ID", nullptr);
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 
   TEST_F(EventManagerTest, subscribe_no_event_handler_available)
@@ -68,14 +74,14 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     ls::std::event::EventManager eventManager{};
-                     eventManager.subscribe("TMP_DIR", ::std::make_shared<ls_std_event_test::DailyNewsAgency>());
+                     EventManager eventManager{};
+                     eventManager.subscribe("TMP_DIR", make_shared<DailyNewsAgency>());
                    }
-                   catch (const ls::std::core::EventNotSubscribedException &_exception)
+                   catch (const EventNotSubscribedException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::EventNotSubscribedException);
+                 }, EventNotSubscribedException);
   }
 
   TEST_F(EventManagerTest, unsubscribe_empty_id)
@@ -83,14 +89,14 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     ls::std::event::EventManager eventManager{};
-                     eventManager.unsubscribe("", ::std::make_shared<ls_std_event_test::DailyNewsAgency>());
+                     EventManager eventManager{};
+                     eventManager.unsubscribe("", make_shared<DailyNewsAgency>());
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 
   TEST_F(EventManagerTest, unsubscribe_no_listener)
@@ -98,27 +104,27 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     ls::std::event::EventManager eventManager{};
+                     EventManager eventManager{};
                      eventManager.unsubscribe("TMP_ID", nullptr);
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 
   TEST_F(EventManagerTest, addEventHandler)
   {
-    ls::std::event::EventManager eventManager{};
-    ASSERT_TRUE(eventManager.addEventHandler(::std::make_shared<ls::std::event::EventHandler>("TMP_ID")));
+    EventManager eventManager{};
+    ASSERT_TRUE(eventManager.addEventHandler(make_shared<EventHandler>("TMP_ID")));
   }
 
   TEST_F(EventManagerTest, addEventHandler_event_handler_already_exists)
   {
-    ls::std::event::EventManager eventManager{};
-    ASSERT_TRUE(eventManager.addEventHandler(::std::make_shared<ls::std::event::EventHandler>("TMP_ID")));
-    ASSERT_FALSE(eventManager.addEventHandler(::std::make_shared<ls::std::event::EventHandler>("TMP_ID")));
+    EventManager eventManager{};
+    ASSERT_TRUE(eventManager.addEventHandler(make_shared<EventHandler>("TMP_ID")));
+    ASSERT_FALSE(eventManager.addEventHandler(make_shared<EventHandler>("TMP_ID")));
   }
 
   TEST_F(EventManagerTest, addEventHandler_no_reference)
@@ -126,14 +132,14 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     ls::std::event::EventManager eventManager{};
+                     EventManager eventManager{};
                      eventManager.addEventHandler(nullptr);
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 
   TEST_F(EventManagerTest, fire_event_handler_not_available)
@@ -141,26 +147,26 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     ls::std::event::EventManager eventManager{};
-                     eventManager.fire(ls::std::event::Event{"TMP_ID"});
+                     EventManager eventManager{};
+                     eventManager.fire(Event{"TMP_ID"});
                    }
-                   catch (const ls::std::core::EventNotHandledException &_exception)
+                   catch (const EventNotHandledException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::EventNotHandledException);
+                 }, EventNotHandledException);
   }
 
   TEST_F(EventManagerTest, hasEventHandler)
   {
-    ls::std::event::EventManager eventManager{};
-    eventManager.addEventHandler(::std::make_shared<ls::std::event::EventHandler>("TMP_ID"));
+    EventManager eventManager{};
+    eventManager.addEventHandler(make_shared<EventHandler>("TMP_ID"));
     ASSERT_TRUE(eventManager.hasEventHandler("TMP_ID"));
   }
 
   TEST_F(EventManagerTest, hasEventHandler_no_event_handler_available)
   {
-    ls::std::event::EventManager eventManager{};
+    EventManager eventManager{};
     ASSERT_FALSE(eventManager.hasEventHandler("TMP_ID"));
   }
 
@@ -169,20 +175,20 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     ls::std::event::EventManager eventManager{};
+                     EventManager eventManager{};
                      eventManager.hasEventHandler("");
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 
   TEST_F(EventManagerTest, removeEventHandler)
   {
-    ls::std::event::EventManager eventManager{};
-    ::std::shared_ptr<ls::std::event::EventHandler> eventHandler = ::std::make_shared<ls::std::event::EventHandler>("TMP_ID");
+    EventManager eventManager{};
+    shared_ptr<EventHandler> eventHandler = make_shared<EventHandler>("TMP_ID");
     eventManager.addEventHandler(eventHandler);
 
     ASSERT_TRUE(eventManager.removeEventHandler(eventHandler));
@@ -190,8 +196,8 @@ namespace
 
   TEST_F(EventManagerTest, removeEventHandler_no_event_handler_available)
   {
-    ls::std::event::EventManager eventManager{};
-    ASSERT_FALSE(eventManager.removeEventHandler(::std::make_shared<ls::std::event::EventHandler>("TMP_ID")));
+    EventManager eventManager{};
+    ASSERT_FALSE(eventManager.removeEventHandler(make_shared<EventHandler>("TMP_ID")));
   }
 
   TEST_F(EventManagerTest, removeEventHandler_no_reference)
@@ -199,41 +205,41 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     ls::std::event::EventManager eventManager{};
+                     EventManager eventManager{};
                      eventManager.removeEventHandler(nullptr);
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 
   TEST_F(EventManagerTest, production_example)
   {
-    ::std::string news, expectedNews{};
-    ls::std::core::type::event_id seriousNewsEventId = ls_std_event_test::SeriousNewsEvent{""}.getId();
-    ls::std::core::type::event_id gossipNewsEventId = ls_std_event_test::GossipNewsEvent{""}.getId();
+    string news, expectedNews{};
+    event_id seriousNewsEventId = SeriousNewsEvent{""}.getId();
+    event_id gossipNewsEventId = GossipNewsEvent{""}.getId();
 
     // create event handler
 
-    ::std::shared_ptr<ls::std::event::EventHandler> seriousNewsEventHandler = ::std::make_shared<ls::std::event::EventHandler>(seriousNewsEventId);   // event id
-    ::std::shared_ptr<ls::std::event::EventHandler> gossipNewsEventHandler = ::std::make_shared<ls::std::event::EventHandler>(gossipNewsEventId);     // event id
+    shared_ptr<EventHandler> seriousNewsEventHandler = make_shared<EventHandler>(seriousNewsEventId);   // event id
+    shared_ptr<EventHandler> gossipNewsEventHandler = make_shared<EventHandler>(gossipNewsEventId);     // event id
 
     // create and fill event manager with handler
 
-    ::std::shared_ptr<ls::std::event::EventManager> eventManager = ::std::make_shared<ls::std::event::EventManager>();
+    shared_ptr<EventManager> eventManager = make_shared<EventManager>();
     eventManager->addEventHandler(seriousNewsEventHandler);
     eventManager->addEventHandler(gossipNewsEventHandler);
 
     // create news agency (listener)
 
-    ::std::shared_ptr<ls_std_event_test::DailyNewsAgency> dailyNews = ::std::make_shared<ls_std_event_test::DailyNewsAgency>();
-    ::std::shared_ptr<ls_std_event_test::GossipNewsAgency> gossipNews = ::std::make_shared<ls_std_event_test::GossipNewsAgency>();
+    shared_ptr<DailyNewsAgency> dailyNews = make_shared<DailyNewsAgency>();
+    shared_ptr<GossipNewsAgency> gossipNews = make_shared<GossipNewsAgency>();
 
     // fire SeriousNewsEvent event with no effect
 
-    eventManager->fire(ls_std_event_test::SeriousNewsEvent(news)); // event call
+    eventManager->fire(SeriousNewsEvent(news)); // event call
     ASSERT_TRUE(dailyNews->getNews().empty());
     ASSERT_TRUE(gossipNews->getNews().empty());
 
@@ -242,7 +248,7 @@ namespace
     eventManager->subscribe(seriousNewsEventId, dailyNews);
     eventManager->subscribe(seriousNewsEventId, gossipNews);
     news = "COVID-19 is still going on!";
-    eventManager->fire(ls_std_event_test::SeriousNewsEvent(news)); // event call
+    eventManager->fire(SeriousNewsEvent(news)); // event call
 
     expectedNews = "DailyNewsAgency: " + news;
     ASSERT_STREQ(expectedNews.c_str(), dailyNews->getNews().c_str());
@@ -255,7 +261,7 @@ namespace
     // unsubscribe SeriousNewsEvent from GossipNewsAgency
 
     eventManager->unsubscribe(seriousNewsEventId, gossipNews);
-    eventManager->fire(ls_std_event_test::SeriousNewsEvent(news)); // event call
+    eventManager->fire(SeriousNewsEvent(news)); // event call
 
     expectedNews = "DailyNewsAgency: " + news;
     ASSERT_STREQ(expectedNews.c_str(), dailyNews->getNews().c_str());
@@ -270,12 +276,12 @@ namespace
     eventManager->subscribe(seriousNewsEventId, gossipNews);
 
     news = "COVID-19 is still going on!";
-    eventManager->fire(ls_std_event_test::SeriousNewsEvent(news)); // event call
+    eventManager->fire(SeriousNewsEvent(news)); // event call
     expectedNews = "GossipNewsAgency: " + news;
     ASSERT_STREQ(expectedNews.c_str(), gossipNews->getNews().c_str());
 
     news = "ape likes banana!";
-    eventManager->fire(ls_std_event_test::GossipNewsEvent(news)); // event call
+    eventManager->fire(GossipNewsEvent(news)); // event call
     expectedNews = "GossipNewsAgency: " + news;
     ASSERT_STREQ(expectedNews.c_str(), gossipNews->getNews().c_str());
   }

+ 28 - 24
test/cases/event/EventTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-26
- * Changed:         2022-05-14
+ * Changed:         2022-11-09
  *
  * */
 
@@ -11,6 +11,10 @@
 #include <ls_std/ls_std_core.hpp>
 #include <ls_std/ls_std_event.hpp>
 
+using namespace ls::std::core;
+using namespace ls::std::core::type;
+using namespace ls::std::event;
+
 namespace
 {
   class EventTest : public ::testing::Test
@@ -31,7 +35,7 @@ namespace
 
   TEST_F(EventTest, getClassName)
   {
-    ls::std::event::Event event{"TMP_ID"};
+    Event event{"TMP_ID"};
     ASSERT_STREQ("Event", event.getClassName().c_str());
   }
 
@@ -40,38 +44,38 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     ls::std::event::Event event{""};
+                     Event event{""};
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 
   TEST_F(EventTest, addParameter)
   {
-    ls::std::event::Event event{"TMP_ID"};
+    Event event{"TMP_ID"};
     ASSERT_TRUE(event.getParameterList().empty());
 
-    ASSERT_TRUE(event.addParameter(ls::std::core::type::event_parameter("key", "yes")));
-    ASSERT_TRUE(event.addParameter(ls::std::core::type::event_parameter("facing_door", "yes")));
+    ASSERT_TRUE(event.addParameter(event_parameter("key", "yes")));
+    ASSERT_TRUE(event.addParameter(event_parameter("facing_door", "yes")));
   }
 
   TEST_F(EventTest, addParameter_element_already_exists)
   {
-    ls::std::event::Event event{"TMP_ID"};
+    Event event{"TMP_ID"};
     ASSERT_TRUE(event.getParameterList().empty());
 
-    ASSERT_TRUE(event.addParameter(ls::std::core::type::event_parameter("key", "yes")));
-    ASSERT_FALSE(event.addParameter(ls::std::core::type::event_parameter("key", "yes")));
+    ASSERT_TRUE(event.addParameter(event_parameter("key", "yes")));
+    ASSERT_FALSE(event.addParameter(event_parameter("key", "yes")));
   }
 
   TEST_F(EventTest, clearParameterList)
   {
-    ls::std::event::Event event{"OPEN_DOOR_EVENT"};
-    event.addParameter(ls::std::core::type::event_parameter("key", "yes"));
-    event.addParameter(ls::std::core::type::event_parameter("facing_door", "yes"));
+    Event event{"OPEN_DOOR_EVENT"};
+    event.addParameter(event_parameter("key", "yes"));
+    event.addParameter(event_parameter("facing_door", "yes"));
     ASSERT_EQ(2, event.getParameterList().size());
 
     event.clearParameterList();
@@ -81,23 +85,23 @@ namespace
 
   TEST_F(EventTest, getId)
   {
-    ls::std::event::Event event{"OPEN_DOOR_EVENT"};
+    Event event{"OPEN_DOOR_EVENT"};
     ASSERT_STREQ("OPEN_DOOR_EVENT", event.getId().c_str());
   }
 
   TEST_F(EventTest, getParameterList)
   {
-    ls::std::event::Event event{"OPEN_DOOR_EVENT"};
+    Event event{"OPEN_DOOR_EVENT"};
     ASSERT_TRUE(event.getParameterList().empty());
   }
 
   TEST_F(EventTest, removeParameter)
   {
-    ls::std::event::Event event{"OPEN_DOOR_EVENT"};
+    Event event{"OPEN_DOOR_EVENT"};
     ASSERT_TRUE(event.getParameterList().empty());
 
-    event.addParameter(ls::std::core::type::event_parameter("key", "yes"));
-    event.addParameter(ls::std::core::type::event_parameter("facing_door", "yes"));
+    event.addParameter(event_parameter("key", "yes"));
+    event.addParameter(event_parameter("facing_door", "yes"));
 
     ASSERT_TRUE(event.removeParameter("key"));
     ASSERT_TRUE(event.removeParameter("facing_door"));
@@ -105,7 +109,7 @@ namespace
 
   TEST_F(EventTest, removeParameter_elenent_does_not_exist)
   {
-    ls::std::event::Event event{"OPEN_DOOR_EVENT"};
+    Event event{"OPEN_DOOR_EVENT"};
 
     ASSERT_FALSE(event.removeParameter("key"));
     ASSERT_FALSE(event.removeParameter("facing_door"));
@@ -113,7 +117,7 @@ namespace
 
   TEST_F(EventTest, setId)
   {
-    ls::std::event::Event event{"OPEN_DOOR_EVENT"};
+    Event event{"OPEN_DOOR_EVENT"};
     ASSERT_STREQ("OPEN_DOOR_EVENT", event.getId().c_str());
 
     event.setId("ANOTHER_EVENT");
@@ -125,13 +129,13 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     ls::std::event::Event event{"TMP_ID"};
+                     Event event{"TMP_ID"};
                      event.setId("");
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 }

+ 42 - 36
test/cases/event/NarratorTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-14
- * Changed:         2022-05-20
+ * Changed:         2022-11-09
  *
  * */
 
@@ -12,6 +12,12 @@
 #include <ls_std/ls_std_event.hpp>
 #include <ls_std_event_test.hpp>
 
+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;
+
 namespace
 {
   class NarratorTest : public ::testing::Test
@@ -27,17 +33,17 @@ namespace
       void TearDown() override
       {}
 
-      ::std::shared_ptr<ls_std_event_test::TestDataMercedesCar> mercedes1{};
-      ::std::shared_ptr<ls_std_event_test::TestDataMercedesCar> mercedes2{};
-      ::std::shared_ptr<ls_std_event_test::TestDataMercedesCar> mercedes3{};
+      shared_ptr<TestDataMercedesCar> mercedes1{};
+      shared_ptr<TestDataMercedesCar> mercedes2{};
+      shared_ptr<TestDataMercedesCar> mercedes3{};
 
       void createCars()
       {
-        this->mercedes1 = ::std::make_shared<ls_std_event_test::TestDataMercedesCar>();
+        this->mercedes1 = make_shared<TestDataMercedesCar>();
         this->mercedes1->setColor("pink");
-        this->mercedes2 = ::std::make_shared<ls_std_event_test::TestDataMercedesCar>();
+        this->mercedes2 = make_shared<TestDataMercedesCar>();
         this->mercedes2->setColor("blue");
-        this->mercedes3 = ::std::make_shared<ls_std_event_test::TestDataMercedesCar>();
+        this->mercedes3 = make_shared<TestDataMercedesCar>();
         this->mercedes3->setColor("red");
       }
   };
@@ -45,20 +51,20 @@ namespace
   TEST_F(NarratorTest, addListener)
   {
     this->createCars();
-    ls::std::event::Narrator paintingMachine{};
+    Narrator paintingMachine{};
 
-    ASSERT_TRUE(paintingMachine.addListener(::std::dynamic_pointer_cast<ls::std::core::interface_type::IListener>(this->mercedes1)));
-    ASSERT_TRUE(paintingMachine.addListener(::std::dynamic_pointer_cast<ls::std::core::interface_type::IListener>(this->mercedes2)));
-    ASSERT_TRUE(paintingMachine.addListener(::std::dynamic_pointer_cast<ls::std::core::interface_type::IListener>(this->mercedes3)));
+    ASSERT_TRUE(paintingMachine.addListener(dynamic_pointer_cast<IListener>(this->mercedes1)));
+    ASSERT_TRUE(paintingMachine.addListener(dynamic_pointer_cast<IListener>(this->mercedes2)));
+    ASSERT_TRUE(paintingMachine.addListener(dynamic_pointer_cast<IListener>(this->mercedes3)));
   }
 
   TEST_F(NarratorTest, addListener_listener_already_exists)
   {
     this->createCars();
-    ls::std::event::Narrator paintingMachine{};
+    Narrator paintingMachine{};
 
-    ASSERT_TRUE(paintingMachine.addListener(::std::dynamic_pointer_cast<ls::std::core::interface_type::IListener>(this->mercedes1)));
-    ASSERT_FALSE(paintingMachine.addListener(::std::dynamic_pointer_cast<ls::std::core::interface_type::IListener>(this->mercedes1)));
+    ASSERT_TRUE(paintingMachine.addListener(dynamic_pointer_cast<IListener>(this->mercedes1)));
+    ASSERT_FALSE(paintingMachine.addListener(dynamic_pointer_cast<IListener>(this->mercedes1)));
   }
 
   TEST_F(NarratorTest, addListener_no_reference)
@@ -66,23 +72,23 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     ls::std::event::Narrator paintingMachine{};
+                     Narrator paintingMachine{};
                      paintingMachine.addListener(nullptr);
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 
   TEST_F(NarratorTest, clear)
   {
     this->createCars();
-    ls::std::event::Narrator paintingMachine{};
-    paintingMachine.addListener(::std::dynamic_pointer_cast<ls::std::core::interface_type::IListener>(this->mercedes1));
-    paintingMachine.addListener(::std::dynamic_pointer_cast<ls::std::core::interface_type::IListener>(this->mercedes2));
-    paintingMachine.addListener(::std::dynamic_pointer_cast<ls::std::core::interface_type::IListener>(this->mercedes3));
+    Narrator paintingMachine{};
+    paintingMachine.addListener(dynamic_pointer_cast<IListener>(this->mercedes1));
+    paintingMachine.addListener(dynamic_pointer_cast<IListener>(this->mercedes2));
+    paintingMachine.addListener(dynamic_pointer_cast<IListener>(this->mercedes3));
 
     ASSERT_FALSE(paintingMachine.getListeners().empty());
     paintingMachine.clear();
@@ -91,17 +97,17 @@ namespace
 
   TEST_F(NarratorTest, getListeners)
   {
-    ls::std::event::Narrator narrator{};
+    Narrator narrator{};
     ASSERT_TRUE(narrator.getListeners().empty());
   }
 
   TEST_F(NarratorTest, removeListener)
   {
     this->createCars();
-    ls::std::event::Narrator paintingMachine{};
-    paintingMachine.addListener(::std::dynamic_pointer_cast<ls::std::core::interface_type::IListener>(this->mercedes1));
-    paintingMachine.addListener(::std::dynamic_pointer_cast<ls::std::core::interface_type::IListener>(this->mercedes2));
-    paintingMachine.addListener(::std::dynamic_pointer_cast<ls::std::core::interface_type::IListener>(this->mercedes3));
+    Narrator paintingMachine{};
+    paintingMachine.addListener(dynamic_pointer_cast<IListener>(this->mercedes1));
+    paintingMachine.addListener(dynamic_pointer_cast<IListener>(this->mercedes2));
+    paintingMachine.addListener(dynamic_pointer_cast<IListener>(this->mercedes3));
 
     ASSERT_TRUE(paintingMachine.removeListener(this->mercedes2));
     ASSERT_TRUE(paintingMachine.removeListener(this->mercedes1));
@@ -112,7 +118,7 @@ namespace
   TEST_F(NarratorTest, removeListener_no_listener_available)
   {
     this->createCars();
-    ls::std::event::Narrator paintingMachine{};
+    Narrator paintingMachine{};
     ASSERT_FALSE(paintingMachine.removeListener(this->mercedes2));
   }
 
@@ -121,30 +127,30 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     ls::std::event::Narrator paintingMachine{};
+                     Narrator paintingMachine{};
                      paintingMachine.removeListener(nullptr);
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 
   TEST_F(NarratorTest, tell)
   {
     this->createCars();
-    ls::std::event::Narrator paintingMachine{};
-    paintingMachine.addListener(::std::dynamic_pointer_cast<ls::std::core::interface_type::IListener>(this->mercedes1));
-    paintingMachine.addListener(::std::dynamic_pointer_cast<ls::std::core::interface_type::IListener>(this->mercedes2));
-    paintingMachine.addListener(::std::dynamic_pointer_cast<ls::std::core::interface_type::IListener>(this->mercedes3));
+    Narrator paintingMachine{};
+    paintingMachine.addListener(dynamic_pointer_cast<IListener>(this->mercedes1));
+    paintingMachine.addListener(dynamic_pointer_cast<IListener>(this->mercedes2));
+    paintingMachine.addListener(dynamic_pointer_cast<IListener>(this->mercedes3));
 
     ASSERT_STREQ("pink", this->mercedes1->getColor().c_str());
     ASSERT_STREQ("blue", this->mercedes2->getColor().c_str());
     ASSERT_STREQ("red", this->mercedes3->getColor().c_str());
 
-    ls_std_event_test::Colour newColor{"black"};
-    paintingMachine.tell(static_cast<const ls::std::core::Class &>(newColor));
+    Colour newColor{"black"};
+    paintingMachine.tell(static_cast<const Class &>(newColor));
 
     ASSERT_STREQ("black", this->mercedes1->getColor().c_str());
     ASSERT_STREQ("black", this->mercedes2->getColor().c_str());

+ 23 - 18
test/cases/event/serialization/SerializableJsonEventTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-12-20
- * Changed:         2022-05-20
+ * Changed:         2022-11-09
  *
  * */
 
@@ -11,6 +11,11 @@
 #include <ls_std/ls_std_core.hpp>
 #include <ls_std/ls_std_event.hpp>
 
+using namespace ls::std::core;
+using namespace ls::std::core::type;
+using namespace ls::std::event;
+using namespace ::std;
+
 namespace
 {
   class SerializableJsonEventTest : public ::testing::Test
@@ -32,38 +37,38 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     ls::std::event::SerializableJsonEvent serializable{nullptr};
+                     SerializableJsonEvent serializable{nullptr};
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 
   TEST_F(SerializableJsonEventTest, marshal)
   {
-    ls::std::event::Event event{"OPEN_DOOR_EVENT"};
-    event.addParameter(ls::std::core::type::event_parameter{"key_available", "true"});
-    event.addParameter(ls::std::core::type::event_parameter{"door_id", "16675"});
+    Event event{"OPEN_DOOR_EVENT"};
+    event.addParameter(event_parameter{"key_available", "true"});
+    event.addParameter(event_parameter{"door_id", "16675"});
 
-    ls::std::event::SerializableJsonEvent serializable{::std::make_shared<ls::std::event::Event>(event)};
+    SerializableJsonEvent serializable{make_shared<Event>(event)};
 
-    ls::std::core::type::byte_field data = serializable.marshal();
+    byte_field data = serializable.marshal();
     ASSERT_FALSE(data.empty());
-    ::std::string expectedString = R"({"id":"OPEN_DOOR_EVENT","parameterList":{"door_id":["door_id","16675"],"key_available":["key_available","true"]}})";
+    string expectedString = R"({"id":"OPEN_DOOR_EVENT","parameterList":{"door_id":["door_id","16675"],"key_available":["key_available","true"]}})";
     ASSERT_STREQ(expectedString.c_str(), data.c_str());
   }
 
   TEST_F(SerializableJsonEventTest, unmarshal)
   {
-    ls::std::event::Event event{"TMP_EVENT"};
-    ls::std::event::SerializableJsonEvent serializable{::std::make_shared<ls::std::event::Event>(event)};
-    ::std::string jsonString = R"({"id":"OPEN_DOOR_EVENT","parameterList":{"door_id":["door_id","16675"],"key_available":["key_available","true"]}})";
+    Event event{"TMP_EVENT"};
+    SerializableJsonEvent serializable{make_shared<Event>(event)};
+    string jsonString = R"({"id":"OPEN_DOOR_EVENT","parameterList":{"door_id":["door_id","16675"],"key_available":["key_available","true"]}})";
 
     serializable.unmarshal(jsonString);
     ASSERT_STREQ("OPEN_DOOR_EVENT", serializable.getValue()->getId().c_str());
-    ls::std::core::type::event_parameter_list parameterList = serializable.getValue()->getParameterList();
+    event_parameter_list parameterList = serializable.getValue()->getParameterList();
 
     ASSERT_FALSE(parameterList.empty());
     ASSERT_EQ(2, parameterList.size());
@@ -73,18 +78,18 @@ namespace
 
   TEST_F(SerializableJsonEventTest, setValue_parameter_not_set)
   {
-    ls::std::event::Event event{"TMP_EVENT"};
-    ls::std::event::SerializableJsonEvent serializable{::std::make_shared<ls::std::event::Event>(event)};
+    Event event{"TMP_EVENT"};
+    SerializableJsonEvent serializable{make_shared<Event>(event)};
 
     EXPECT_THROW({
                    try
                    {
                      serializable.setValue(nullptr);
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 }

+ 26 - 21
test/cases/io/FileOutputStreamTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-20
- * Changed:         2022-05-20
+ * Changed:         2022-11-09
  *
  * */
 
@@ -12,6 +12,11 @@
 #include <ls_std/ls_std_io.hpp>
 #include "TestHelper.hpp"
 
+using namespace ls::std::core;
+using namespace ls::std::io;
+using namespace ::std;
+using namespace ls_std_test;
+
 namespace
 {
   class FileOutputStreamTest : public ::testing::Test
@@ -30,29 +35,29 @@ namespace
 
   TEST_F(FileOutputStreamTest, constructor_file_does_not_exist)
   {
-    ::std::string path = ls_std_test::TestHelper::getResourcesFolderLocation() + "not_existing.txt";
-    ls::std::io::File file{path};
+    string path = TestHelper::getResourcesFolderLocation() + "not_existing.txt";
+    File file{path};
 
     EXPECT_THROW({
                    try
                    {
-                     ls::std::io::FileOutputStream outputStream{file};
+                     FileOutputStream outputStream{file};
                    }
-                   catch (const ls::std::core::FileNotFoundException &_exception)
+                   catch (const FileNotFoundException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::FileNotFoundException);
+                 }, FileNotFoundException);
   }
 
   TEST_F(FileOutputStreamTest, write)
   {
-    ::std::string path = ls_std_test::TestHelper::getResourcesFolderLocation() + "tmp_output_stream.txt";
-    ls::std::io::File file{path};
+    string path = TestHelper::getResourcesFolderLocation() + "tmp_output_stream.txt";
+    File file{path};
     file.createNewFile();
     ASSERT_TRUE(file.exists());
 
-    ls::std::io::FileOutputStream outputStream{file};
+    FileOutputStream outputStream{file};
     ASSERT_TRUE(outputStream.write("Hello! "));
     ASSERT_TRUE(outputStream.write("How are you?"));
     outputStream.close();
@@ -63,27 +68,27 @@ namespace
 
   TEST_F(FileOutputStreamTest, write_with_another_appending_stream)
   {
-    ::std::string path = ls_std_test::TestHelper::getResourcesFolderLocation() + "tmp_output_stream.txt";
-    ls::std::io::File file{path};
+    string path = TestHelper::getResourcesFolderLocation() + "tmp_output_stream.txt";
+    File file{path};
     file.createNewFile();
     ASSERT_TRUE(file.exists());
 
-    ls::std::io::FileOutputStream outputStream{file};
+    FileOutputStream outputStream{file};
     ASSERT_TRUE(outputStream.write("Hello! "));
     ASSERT_TRUE(outputStream.write("How are you?"));
     outputStream.close();
 
-    ls::std::io::FileOutputStream newOutputStream{file, true};
+    FileOutputStream newOutputStream{file, true};
     ASSERT_TRUE(newOutputStream.write(" I'm fine! "));
     ASSERT_TRUE(newOutputStream.write("Thank you!"));
     newOutputStream.close();
 
     // validation
 
-    ls::std::io::FileReader reader{file};
-    ::std::string content{reader.read()};
+    FileReader reader{file};
+    string content{reader.read()};
 
-    ASSERT_TRUE(content.find("Hello! How are you? I'm fine! Thank you!") != ::std::string::npos);
+    ASSERT_TRUE(content.find("Hello! How are you? I'm fine! Thank you!") != string::npos);
 
     file.remove();
     ASSERT_FALSE(file.exists());
@@ -92,23 +97,23 @@ namespace
   TEST_F(FileOutputStreamTest, write_no_permission_to_write)
   {
     #if defined(unix) || defined(__APPLE__)
-    ls::std::io::File file{ls_std_test::TestHelper::getResourcesFolderLocation() + "no_writable.txt"};
+    File file{TestHelper::getResourcesFolderLocation() + "no_writable.txt"};
     #endif
     #ifdef _WIN32
-    ls::std::io::File file{ls_std_test::TestHelper::getResourcesFolderLocation() + "no_writable_windows.txt"};
+    File file{TestHelper::getResourcesFolderLocation() + "no_writable_windows.txt"};
     #endif
 
-    ls::std::io::FileOutputStream outputStream{file};
+    FileOutputStream outputStream{file};
 
     EXPECT_THROW({
                    try
                    {
                      outputStream.write("something");
                    }
-                   catch (const ls::std::core::FileOperationException &_exception)
+                   catch (const FileOperationException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::FileOperationException);
+                 }, FileOperationException);
   }
 }

+ 29 - 23
test/cases/io/FileReaderTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-18
- * Changed:         2022-05-20
+ * Changed:         2022-11-09
  *
  * */
 
@@ -12,6 +12,12 @@
 #include <ls_std/ls_std_io.hpp>
 #include "TestHelper.hpp"
 
+using namespace ls::std::core;
+using namespace ls::std::core::type;
+using namespace ls::std::io;
+using namespace ls_std_test;
+using namespace ::std;
+
 namespace
 {
   class FileReaderTest : public ::testing::Test
@@ -30,64 +36,64 @@ namespace
 
   TEST_F(FileReaderTest, constructor_file_does_not_exist)
   {
-    ls::std::io::File file{ls_std_test::TestHelper::getResourcesFolderLocation() + "does_not_exist.txt"};
+    File file{TestHelper::getResourcesFolderLocation() + "does_not_exist.txt"};
 
     EXPECT_THROW({
                    try
                    {
-                     ls::std::io::FileReader reader{file};
+                     FileReader reader{file};
                    }
-                   catch (const ls::std::core::FileNotFoundException &_exception)
+                   catch (const FileNotFoundException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::FileNotFoundException);
+                 }, FileNotFoundException);
   }
 
   TEST_F(FileReaderTest, read)
   {
-    ls::std::io::File file{ls_std_test::TestHelper::getResourcesFolderLocation() + "simple.txt"};
-    ls::std::io::FileReader reader{file};
-    ::std::string expectedUnix = "Hello!" + ls::std::io::NewLine::getUnixNewLine();
-    ::std::string expectedWindows = "Hello!" + ls::std::io::NewLine::getWindowsNewLine();
+    File file{TestHelper::getResourcesFolderLocation() + "simple.txt"};
+    FileReader reader{file};
+    string expectedUnix = "Hello!" + NewLine::getUnixNewLine();
+    string expectedWindows = "Hello!" + NewLine::getWindowsNewLine();
 
-    ls::std::core::type::byte_field content = reader.read();
+    byte_field content = reader.read();
     ASSERT_TRUE(content == expectedUnix || content == expectedWindows);
   }
 
   TEST_F(FileReaderTest, read_file_gets_lost_in_between)
   {
-    ls::std::io::File file{ls_std_test::TestHelper::getResourcesFolderLocation() + "lost_readable_file.txt"};
+    File file{TestHelper::getResourcesFolderLocation() + "lost_readable_file.txt"};
     file.createNewFile();
-    ls::std::io::FileReader reader{file};
+    FileReader reader{file};
     file.remove();
 
     EXPECT_THROW({
                    try
                    {
-                     ls::std::core::type::byte_field content = reader.read();
+                     byte_field content = reader.read();
                    }
-                   catch (const ls::std::core::FileOperationException &_exception)
+                   catch (const FileOperationException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::FileOperationException);
+                 }, FileOperationException);
   }
 
   TEST_F(FileReaderTest, reset)
   {
-    ls::std::io::File file{ls_std_test::TestHelper::getResourcesFolderLocation() + "simple.txt"};
-    ls::std::io::FileReader reader{file};
-    ::std::string expectedUnix = "Hello!" + ls::std::io::NewLine::getUnixNewLine();
-    ::std::string expectedWindows = "Hello!" + ls::std::io::NewLine::getWindowsNewLine();
+    File file{TestHelper::getResourcesFolderLocation() + "simple.txt"};
+    FileReader reader{file};
+    string expectedUnix = "Hello!" + NewLine::getUnixNewLine();
+    string expectedWindows = "Hello!" + NewLine::getWindowsNewLine();
 
-    ls::std::core::type::byte_field content = reader.read();
+    byte_field content = reader.read();
     ASSERT_TRUE(content == expectedUnix || content == expectedWindows);
 
-    ls::std::io::File anotherFile{ls_std_test::TestHelper::getResourcesFolderLocation() + "list_test/bla.txt"};
+    File anotherFile{TestHelper::getResourcesFolderLocation() + "list_test/bla.txt"};
     reader.reset(anotherFile);
-    expectedUnix = "nothing to say!" + ls::std::io::NewLine::getUnixNewLine();
-    expectedWindows = "nothing to say!" + ls::std::io::NewLine::getWindowsNewLine();
+    expectedUnix = "nothing to say!" + NewLine::getUnixNewLine();
+    expectedWindows = "nothing to say!" + NewLine::getWindowsNewLine();
 
     content = reader.read();
     ASSERT_TRUE(content == expectedUnix || content == expectedWindows);

+ 84 - 79
test/cases/io/FileTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-15
- * Changed:         2022-05-20
+ * Changed:         2022-11-09
  *
  * */
 
@@ -12,6 +12,11 @@
 #include <ls_std/ls_std_io.hpp>
 #include "TestHelper.hpp"
 
+using namespace ls::std::core;
+using namespace ls::std::io;
+using namespace ls_std_test;
+using namespace ::std;
+
 namespace
 {
   class FileTest : public ::testing::Test
@@ -21,7 +26,7 @@ namespace
       FileTest() = default;
       ~FileTest() override = default;
 
-      ::std::string fileLocation = ls_std_test::TestHelper::getResourcesFolderLocation() + "simple.txt";
+      string fileLocation = TestHelper::getResourcesFolderLocation() + "simple.txt";
 
       void SetUp() override
       {}
@@ -34,10 +39,10 @@ namespace
 
   TEST_F(FileTest, operator_equals)
   {
-    ls::std::io::File file{this->fileLocation};
-    ls::std::io::File file2{this->fileLocation};
-    ls::std::io::File file3{"/home/bla/text.txt"};
-    ls::std::io::File file4{"\\home/bla\\text.txt"};
+    File file{this->fileLocation};
+    File file2{this->fileLocation};
+    File file3{"/home/bla/text.txt"};
+    File file4{"\\home/bla\\text.txt"};
 
     ASSERT_TRUE(file == file2);
     ASSERT_TRUE(file2 == file);
@@ -47,8 +52,8 @@ namespace
 
   TEST_F(FileTest, operator_not_equals)
   {
-    ls::std::io::File file{this->fileLocation};
-    ls::std::io::File file2{ls_std_test::TestHelper::getResourcesFolderLocation() + "app.exe"};
+    File file{this->fileLocation};
+    File file2{TestHelper::getResourcesFolderLocation() + "app.exe"};
 
     ASSERT_TRUE(file != file2);
     ASSERT_TRUE(file2 != file);
@@ -59,10 +64,10 @@ namespace
   TEST_F(FileTest, canExecute)
   {
     #ifdef _WIN32
-    ls::std::io::File executableFile{ls_std_test::TestHelper::getResourcesFolderLocation() + "app.exe"};
+    File executableFile{TestHelper::getResourcesFolderLocation() + "app.exe"};
     #endif
     #if defined(unix) || defined(__APPLE__)
-    ls::std::io::File executableFile{ls_std_test::TestHelper::getResourcesFolderLocation() + "app"};
+    File executableFile{TestHelper::getResourcesFolderLocation() + "app"};
     #endif
 
     ASSERT_TRUE(executableFile.canExecute());
@@ -70,53 +75,53 @@ namespace
 
   TEST_F(FileTest, canExecute_not_executable)
   {
-    ls::std::io::File file{this->fileLocation};
+    File file{this->fileLocation};
     ASSERT_FALSE(file.canExecute());
   }
 
   TEST_F(FileTest, canRead)
   {
-    ls::std::io::File readableFile{this->fileLocation};
+    File readableFile{this->fileLocation};
     ASSERT_TRUE(readableFile.canRead());
   }
 
   TEST_F(FileTest, canRead_file_does_not_exist)
   {
-    ls::std::io::File file{""};
+    File file{""};
 
     EXPECT_THROW({
                    try
                    {
                      file.canRead();
                    }
-                   catch (const ls::std::core::FileOperationException &_exception)
+                   catch (const FileOperationException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::FileOperationException);
+                 }, FileOperationException);
   }
 
   TEST_F(FileTest, canWrite)
   {
-    ls::std::io::File readableFile{this->fileLocation};
+    File readableFile{this->fileLocation};
     ASSERT_TRUE(readableFile.canWrite());
   }
 
   TEST_F(FileTest, canWrite_not_writable)
   {
     #if defined(unix) || defined(__APPLE__)
-    ls::std::io::File noWritableFile{ls_std_test::TestHelper::getResourcesFolderLocation() + "no_writable.txt"};
+    File noWritableFile{TestHelper::getResourcesFolderLocation() + "no_writable.txt"};
     ASSERT_FALSE(noWritableFile.canWrite());
     #endif
     #ifdef _WIN32
-    ls::std::io::File noWritableFile{ls_std_test::TestHelper::getResourcesFolderLocation() + "no_writable_windows.txt"};
+    File noWritableFile{TestHelper::getResourcesFolderLocation() + "no_writable_windows.txt"};
     ASSERT_FALSE(noWritableFile.canWrite());
     #endif
   }
 
   TEST_F(FileTest, createNewFile)
   {
-    ls::std::io::File file{ls_std_test::TestHelper::getResourcesFolderLocation() + "tmp.txt"};
+    File file{TestHelper::getResourcesFolderLocation() + "tmp.txt"};
     ASSERT_FALSE(file.exists());
 
     file.createNewFile();
@@ -128,24 +133,24 @@ namespace
 
   TEST_F(FileTest, createNewFile_file_does_already_exist)
   {
-    ls::std::io::File file{ls_std_test::TestHelper::getResourcesFolderLocation() + "simple.txt"};
+    File file{TestHelper::getResourcesFolderLocation() + "simple.txt"};
 
     EXPECT_THROW({
                    try
                    {
                      file.createNewFile();
                    }
-                   catch (const ls::std::core::FileOperationException &_exception)
+                   catch (const FileOperationException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::FileOperationException);
+                 }, FileOperationException);
   }
 
   TEST_F(FileTest, exists)
   {
-    ls::std::io::File file{this->fileLocation};
-    ls::std::io::File directory{ls_std_test::TestHelper::getResourcesFolderLocation()};
+    File file{this->fileLocation};
+    File directory{TestHelper::getResourcesFolderLocation()};
 
     ASSERT_TRUE(file.exists());
     ASSERT_TRUE(directory.exists());
@@ -153,28 +158,28 @@ namespace
 
   TEST_F(FileTest, exists_does_not_exist)
   {
-    ls::std::io::File file{ls_std_test::TestHelper::getResourcesFolderLocation() + "bla.txt"};
+    File file{TestHelper::getResourcesFolderLocation() + "bla.txt"};
     ASSERT_FALSE(file.exists());
   }
 
   TEST_F(FileTest, getAbsoluteFilePath)
   {
-    ls::std::io::File file{this->fileLocation};
+    File file{this->fileLocation};
     ASSERT_STREQ(this->fileLocation.c_str(), file.getAbsoluteFilePath().c_str());
-    ::std::string s = {ls::std::io::FilePathSeparator::get()};
+    string s = {FilePathSeparator::get()};
 
-    ::std::string wrongFilePath = "home" + s + s + s + "user" + s + "bla" + s + s + "sub_folder";
-    ::std::string expectedFilePath = "home" + s + "user" + s + "bla" + s + "sub_folder";
-    ls::std::io::File anotherFile{wrongFilePath};
+    string wrongFilePath = "home" + s + s + s + "user" + s + "bla" + s + s + "sub_folder";
+    string expectedFilePath = "home" + s + "user" + s + "bla" + s + "sub_folder";
+    File anotherFile{wrongFilePath};
     ASSERT_STREQ(expectedFilePath.c_str(), anotherFile.getAbsoluteFilePath().c_str());
   }
 
   TEST_F(FileTest, getName)
   {
-    ls::std::io::File file{this->fileLocation};
-    ls::std::io::File executableFile{ls_std_test::TestHelper::getResourcesFolderLocation() + "app.exe"};
-    ls::std::io::File anotherFile{"bla.txt"};
-    ls::std::io::File directory{ls_std_test::TestHelper::getResourcesFolderLocation()};
+    File file{this->fileLocation};
+    File executableFile{TestHelper::getResourcesFolderLocation() + "app.exe"};
+    File anotherFile{"bla.txt"};
+    File directory{TestHelper::getResourcesFolderLocation()};
 
     ASSERT_STREQ("simple.txt", file.getName().c_str());
     ASSERT_STREQ("app.exe", executableFile.getName().c_str());
@@ -184,19 +189,19 @@ namespace
 
   TEST_F(FileTest, getParent)
   {
-    ls::std::io::File file{this->fileLocation};
-    ASSERT_STREQ(ls_std_test::TestHelper::getResourcesFolderLocation().c_str(), file.getParent().c_str());
+    File file{this->fileLocation};
+    ASSERT_STREQ(TestHelper::getResourcesFolderLocation().c_str(), file.getParent().c_str());
   }
 
   TEST_F(FileTest, getWorkingDirectory)
   {
-    ::std::string workingDirectory = ls::std::io::File::getWorkingDirectory();
+    string workingDirectory = File::getWorkingDirectory();
     ASSERT_FALSE(workingDirectory.empty());
   }
 
   TEST_F(FileTest, getSize)
   {
-    ls::std::io::File file{this->fileLocation};
+    File file{this->fileLocation};
     size_t size = file.getSize();
 
     ASSERT_TRUE(size == 7 || size == 8); // different OS specific new lines
@@ -204,45 +209,45 @@ namespace
 
   TEST_F(FileTest, isDirectory)
   {
-    ls::std::io::File directory{ls_std_test::TestHelper::getResourcesFolderLocation()};
+    File directory{TestHelper::getResourcesFolderLocation()};
     ASSERT_TRUE(directory.isDirectory());
   }
 
   TEST_F(FileTest, isDirectory_is_a_file)
   {
-    ls::std::io::File file{this->fileLocation};
+    File file{this->fileLocation};
     ASSERT_FALSE(file.isDirectory());
   }
 
   TEST_F(FileTest, isFile)
   {
-    const char separator = ls::std::io::FilePathSeparator::get();
+    const char separator = FilePathSeparator::get();
 
-    ls::std::io::File file{this->fileLocation};
+    File file{this->fileLocation};
     ASSERT_TRUE(file.isFile());
 
-    ls::std::io::File file2{ls_std_test::TestHelper::getResourcesFolderLocation() + "list_test" + separator + "bla.txt"};
+    File file2{TestHelper::getResourcesFolderLocation() + "list_test" + separator + "bla.txt"};
     ASSERT_TRUE(file2.isFile());
   }
 
   TEST_F(FileTest, isFile_is_a_directory)
   {
-    ls::std::io::File directory{ls_std_test::TestHelper::getResourcesFolderLocation()};
+    File directory{TestHelper::getResourcesFolderLocation()};
     ASSERT_FALSE(directory.isFile());
   }
 
   TEST_F(FileTest, lastModified)
   {
-    ls::std::io::File file{this->fileLocation};
+    File file{this->fileLocation};
     ASSERT_TRUE(file.lastModified() > 1590000000);
   }
 
   TEST_F(FileTest, list)
   {
-    ls::std::io::File file{ls_std_test::TestHelper::getResourcesFolderLocation() + "list_test"};
-    ::std::list<std::string> filesInDirectory = file.list();
-    ::std::string expectedFile{};
-    const char separator = ls::std::io::FilePathSeparator::get();
+    File file{TestHelper::getResourcesFolderLocation() + "list_test"};
+    list<string> filesInDirectory = file.list();
+    string expectedFile{};
+    const char separator = FilePathSeparator::get();
 
     auto filesIterator = filesInDirectory.begin();
 
@@ -250,44 +255,44 @@ namespace
     ASSERT_EQ(7, filesInDirectory.size());
 
     expectedFile = file.getAbsoluteFilePath() + separator + ".";
-    ASSERT_TRUE((ls::std::core::STLUtils::contains(filesInDirectory, expectedFile)));
+    ASSERT_TRUE((STLUtils::contains(filesInDirectory, expectedFile)));
     expectedFile = file.getAbsoluteFilePath() + separator + "..";
-    ASSERT_TRUE((ls::std::core::STLUtils::contains(filesInDirectory, expectedFile)));
+    ASSERT_TRUE((STLUtils::contains(filesInDirectory, expectedFile)));
     expectedFile = file.getAbsoluteFilePath() + separator + "another_file.txt";
-    ASSERT_TRUE((ls::std::core::STLUtils::contains(filesInDirectory, expectedFile)));
+    ASSERT_TRUE((STLUtils::contains(filesInDirectory, expectedFile)));
     expectedFile = file.getAbsoluteFilePath() + separator + "bla.txt";
-    ASSERT_TRUE((ls::std::core::STLUtils::contains(filesInDirectory, expectedFile)));
+    ASSERT_TRUE((STLUtils::contains(filesInDirectory, expectedFile)));
     expectedFile = file.getAbsoluteFilePath() + separator + "hello.txt";
-    ASSERT_TRUE((ls::std::core::STLUtils::contains(filesInDirectory, expectedFile)));
+    ASSERT_TRUE((STLUtils::contains(filesInDirectory, expectedFile)));
     expectedFile = file.getAbsoluteFilePath() + separator + "list_test_sub";
-    ASSERT_TRUE((ls::std::core::STLUtils::contains(filesInDirectory, expectedFile)));
+    ASSERT_TRUE((STLUtils::contains(filesInDirectory, expectedFile)));
     expectedFile = file.getAbsoluteFilePath() + separator + ".hidden_file.txt";
-    ASSERT_TRUE((ls::std::core::STLUtils::contains(filesInDirectory, expectedFile)));
+    ASSERT_TRUE((STLUtils::contains(filesInDirectory, expectedFile)));
   }
 
   TEST_F(FileTest, listFiles)
   {
-    ls::std::io::File file{ls_std_test::TestHelper::getResourcesFolderLocation() + "list_test"};
-    ::std::list<::std::string> filesInDirectory = file.listFiles();
-    ::std::string expectedFile{};
-    const char separator = ls::std::io::FilePathSeparator::get();
+    File file{TestHelper::getResourcesFolderLocation() + "list_test"};
+    list<string> filesInDirectory = file.listFiles();
+    string expectedFile{};
+    const char separator = FilePathSeparator::get();
 
     ASSERT_FALSE(filesInDirectory.empty());
     ASSERT_EQ(4, filesInDirectory.size());
 
     expectedFile = file.getAbsoluteFilePath() + separator + "another_file.txt";
-    ASSERT_TRUE((ls::std::core::STLUtils::contains(filesInDirectory, expectedFile)));
+    ASSERT_TRUE((STLUtils::contains(filesInDirectory, expectedFile)));
     expectedFile = file.getAbsoluteFilePath() + separator + "bla.txt";
-    ASSERT_TRUE((ls::std::core::STLUtils::contains(filesInDirectory, expectedFile)));
+    ASSERT_TRUE((STLUtils::contains(filesInDirectory, expectedFile)));
     expectedFile = file.getAbsoluteFilePath() + separator + "hello.txt";
-    ASSERT_TRUE((ls::std::core::STLUtils::contains(filesInDirectory, expectedFile)));
+    ASSERT_TRUE((STLUtils::contains(filesInDirectory, expectedFile)));
     expectedFile = file.getAbsoluteFilePath() + separator + ".hidden_file.txt";
-    ASSERT_TRUE((ls::std::core::STLUtils::contains(filesInDirectory, expectedFile)));
+    ASSERT_TRUE((STLUtils::contains(filesInDirectory, expectedFile)));
   }
 
   TEST_F(FileTest, makeDirectory)
   {
-    ls::std::io::File directory{ls_std_test::TestHelper::getResourcesFolderLocation() + "testDir"};
+    File directory{TestHelper::getResourcesFolderLocation() + "testDir"};
     ASSERT_FALSE(directory.exists());
 
     directory.makeDirectory();
@@ -299,23 +304,23 @@ namespace
 
   TEST_F(FileTest, makeDirectory_directory_already_exists)
   {
-    ls::std::io::File directory{ls_std_test::TestHelper::getResourcesFolderLocation() + "list_test"};
+    File directory{TestHelper::getResourcesFolderLocation() + "list_test"};
 
     EXPECT_THROW({
                    try
                    {
                      directory.makeDirectory();
                    }
-                   catch (const ls::std::core::FileOperationException &_exception)
+                   catch (const FileOperationException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::FileOperationException);
+                 }, FileOperationException);
   }
 
   TEST_F(FileTest, makeDirectories)
   {
-    ls::std::io::File directory{ls_std_test::TestHelper::getResourcesFolderLocation() + "testDir/sub/tmp/bla"};
+    File directory{TestHelper::getResourcesFolderLocation() + "testDir/sub/tmp/bla"};
     ASSERT_FALSE(directory.exists());
 
     directory.makeDirectories();
@@ -324,18 +329,18 @@ namespace
     // clean up
 
     directory.remove();
-    directory = ls::std::io::File(ls_std_test::TestHelper::getResourcesFolderLocation() + "testDir/sub/tmp");
+    directory = File(TestHelper::getResourcesFolderLocation() + "testDir/sub/tmp");
     directory.remove();
-    directory = ls::std::io::File(ls_std_test::TestHelper::getResourcesFolderLocation() + "testDir/sub");
+    directory = File(TestHelper::getResourcesFolderLocation() + "testDir/sub");
     directory.remove();
-    directory = ls::std::io::File(ls_std_test::TestHelper::getResourcesFolderLocation() + "testDir");
+    directory = File(TestHelper::getResourcesFolderLocation() + "testDir");
     directory.remove();
   }
 
   TEST_F(FileTest, remove)
   {
-    ::std::string fileName = ls_std_test::TestHelper::getResourcesFolderLocation() + "removable_file.txt";
-    ls::std::io::File file{fileName};
+    string fileName = TestHelper::getResourcesFolderLocation() + "removable_file.txt";
+    File file{fileName};
     file.createNewFile();
 
     ASSERT_TRUE(file.exists());
@@ -346,10 +351,10 @@ namespace
 
   TEST_F(FileTest, renameTo)
   {
-    ::std::string currentName = ls_std_test::TestHelper::getResourcesFolderLocation() + "tmp_rename_to.txt";
-    ::std::string newName = ls_std_test::TestHelper::getResourcesFolderLocation() + "tmp_rename_to_better_name.txt";
+    string currentName = TestHelper::getResourcesFolderLocation() + "tmp_rename_to.txt";
+    string newName = TestHelper::getResourcesFolderLocation() + "tmp_rename_to_better_name.txt";
 
-    ls::std::io::File file{currentName};
+    File file{currentName};
     file.createNewFile();
 
     ASSERT_TRUE(file.exists());
@@ -364,10 +369,10 @@ namespace
 
   TEST_F(FileTest, reset)
   {
-    ls::std::io::File file{this->fileLocation};
+    File file{this->fileLocation};
     ASSERT_TRUE(file.exists());
 
-    file.reset(ls_std_test::TestHelper::getResourcesFolderLocation() + "list_test/hello.txt");
+    file.reset(TestHelper::getResourcesFolderLocation() + "list_test/hello.txt");
     ASSERT_TRUE(file.exists());
   }
 }

+ 19 - 14
test/cases/io/FileWriterTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2022-05-20
+ * Changed:         2022-11-09
  *
  * */
 
@@ -12,6 +12,11 @@
 #include <ls_std/ls_std_io.hpp>
 #include "TestHelper.hpp"
 
+using namespace ls::std::core;
+using namespace ls::std::io;
+using namespace ::std;
+using namespace ls_std_test;
+
 namespace
 {
   class FileWriterTest : public ::testing::Test
@@ -30,33 +35,33 @@ namespace
 
   TEST_F(FileWriterTest, constructor_file_does_not_exist)
   {
-    ::std::string path = ls_std_test::TestHelper::getResourcesFolderLocation() + "not_existing_file.txt";
-    ls::std::io::File file{path};
+    string path = TestHelper::getResourcesFolderLocation() + "not_existing_file.txt";
+    File file{path};
 
     EXPECT_THROW({
                    try
                    {
-                     ls::std::io::FileWriter writer{file};
+                     FileWriter writer{file};
                    }
-                   catch (const ls::std::core::FileNotFoundException &_exception)
+                   catch (const FileNotFoundException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::FileNotFoundException);
+                 }, FileNotFoundException);
   }
 
   TEST_F(FileWriterTest, reset)
   {
-    ::std::string path = ls_std_test::TestHelper::getResourcesFolderLocation() + "tmp_file_writer_test.txt";
-    ls::std::io::File file{path};
+    string path = TestHelper::getResourcesFolderLocation() + "tmp_file_writer_test.txt";
+    File file{path};
     file.createNewFile();
-    ls::std::io::FileWriter writer{file};
+    FileWriter writer{file};
     ASSERT_TRUE(writer.write("Testing something!\n"));
 
     // reset
 
-    path = ls_std_test::TestHelper::getResourcesFolderLocation() + "tmp_file_writer_test2.txt";
-    ls::std::io::File anotherFile{path};
+    path = TestHelper::getResourcesFolderLocation() + "tmp_file_writer_test2.txt";
+    File anotherFile{path};
     anotherFile.createNewFile();
 
     writer.reset(anotherFile);
@@ -72,14 +77,14 @@ namespace
 
   TEST_F(FileWriterTest, write)
   {
-    ::std::string path = ls_std_test::TestHelper::getResourcesFolderLocation() + "tmp_file_writer_test.txt";
-    ls::std::io::File file{path};
+    string path = TestHelper::getResourcesFolderLocation() + "tmp_file_writer_test.txt";
+    File file{path};
 
     ASSERT_FALSE(file.exists());
     file.createNewFile();
     ASSERT_TRUE(file.exists());
 
-    ls::std::io::FileWriter writer{file};
+    FileWriter writer{file};
     ASSERT_TRUE(writer.write("Testing something!\n"));
 
     file.remove();

+ 4 - 3
test/cases/io/StandardOutputWriterTest.cpp

@@ -3,14 +3,15 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-09-18
- * Changed:         2022-05-14
+ * Changed:         2022-11-09
  *
  * */
 
 #include <gtest/gtest.h>
-#include <ls_std/ls_std_core.hpp>
 #include <ls_std/ls_std_io.hpp>
 
+using namespace ls::std::io;
+
 namespace
 {
   class StandardOutputWriterTest : public ::testing::Test
@@ -29,7 +30,7 @@ namespace
 
   TEST_F(StandardOutputWriterTest, write)
   {
-    ls::std::io::StandardOutputWriter writer{};
+    StandardOutputWriter writer{};
     ASSERT_TRUE(writer.write("Try something!"));
   }
 }

+ 26 - 20
test/cases/io/StorableFileTest.cpp

@@ -3,14 +3,20 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-19
- * Changed:         2022-05-20
+ * Changed:         2022-11-09
  *
  * */
 
 #include <gtest/gtest.h>
+#include <ls_std/ls_std_core.hpp>
 #include <ls_std/ls_std_io.hpp>
 #include "TestHelper.hpp"
 
+using namespace ls::std::core::type;
+using namespace ls::std::io;
+using namespace ls_std_test;
+using namespace ::std;
+
 namespace
 {
   class StorableFileTest : public ::testing::Test
@@ -20,7 +26,7 @@ namespace
       StorableFileTest() = default;
       ~StorableFileTest() override = default;
 
-      ::std::string fileLocation = ls_std_test::TestHelper::getResourcesFolderLocation() + "simple.txt";
+      string fileLocation = TestHelper::getResourcesFolderLocation() + "simple.txt";
 
       void SetUp() override
       {}
@@ -31,55 +37,55 @@ namespace
 
   TEST_F(StorableFileTest, getFile)
   {
-    ls::std::io::StorableFile storableFile{this->fileLocation};
+    StorableFile storableFile{this->fileLocation};
     ASSERT_STREQ(this->fileLocation.c_str(), storableFile.getFile()->getAbsoluteFilePath().c_str());
   }
 
   TEST_F(StorableFileTest, load)
   {
-    ls::std::io::StorableFile storableFile{this->fileLocation};
-    ls::std::core::type::byte_field content = storableFile.load();
+    StorableFile storableFile{this->fileLocation};
+    byte_field content = storableFile.load();
 
-    ::std::string expectedUnix = "Hello!" + ls::std::io::NewLine::getUnixNewLine();
-    ::std::string expectedWindows = "Hello!" + ls::std::io::NewLine::getWindowsNewLine();
+    string expectedUnix = "Hello!" + NewLine::getUnixNewLine();
+    string expectedWindows = "Hello!" + NewLine::getWindowsNewLine();
 
     ASSERT_TRUE(content == expectedUnix || content == expectedWindows);
   }
 
   TEST_F(StorableFileTest, reset)
   {
-    ls::std::io::StorableFile storableFile{this->fileLocation};
-    ls::std::core::type::byte_field content = storableFile.load();
+    StorableFile storableFile{this->fileLocation};
+    byte_field content = storableFile.load();
 
-    ::std::string expectedUnix = "Hello!" + ls::std::io::NewLine::getUnixNewLine();
-    ::std::string expectedWindows = "Hello!" + ls::std::io::NewLine::getWindowsNewLine();
+    string expectedUnix = "Hello!" + NewLine::getUnixNewLine();
+    string expectedWindows = "Hello!" + NewLine::getWindowsNewLine();
 
     ASSERT_TRUE(content == expectedUnix || content == expectedWindows);
 
     // reset
 
-    ::std::string anotherFileLocation = ls_std_test::TestHelper::getResourcesFolderLocation() + "list_test/bla.txt";
+    string anotherFileLocation = TestHelper::getResourcesFolderLocation() + "list_test/bla.txt";
     storableFile.reset(anotherFileLocation);
     content = storableFile.load();
 
-    expectedUnix = "nothing to say!" + ls::std::io::NewLine::getUnixNewLine();
-    expectedWindows = "nothing to say!" + ls::std::io::NewLine::getWindowsNewLine();
+    expectedUnix = "nothing to say!" + NewLine::getUnixNewLine();
+    expectedWindows = "nothing to say!" + NewLine::getWindowsNewLine();
 
     ASSERT_TRUE(content == expectedUnix || content == expectedWindows);
   }
 
   TEST_F(StorableFileTest, save)
   {
-    ::std::string path = ls_std_test::TestHelper::getResourcesFolderLocation() + "tmp_storable_file.txt";
-    ls::std::io::File file{path};
+    string path = TestHelper::getResourcesFolderLocation() + "tmp_storable_file.txt";
+    File file{path};
     file.createNewFile();
 
-    ls::std::io::StorableFile storableFile{path};
-    ls::std::core::type::byte_field textUnix = "Testing save method!" + ls::std::io::NewLine::getUnixNewLine();
-    ls::std::core::type::byte_field textWindows = "Testing save method!" + ls::std::io::NewLine::getWindowsNewLine();
+    StorableFile storableFile{path};
+    byte_field textUnix = "Testing save method!" + NewLine::getUnixNewLine();
+    byte_field textWindows = "Testing save method!" + NewLine::getWindowsNewLine();
 
     storableFile.save(textUnix);
-    ls::std::core::type::byte_field content = storableFile.load();
+    byte_field content = storableFile.load();
     ASSERT_TRUE(content == textUnix || content == textWindows);
 
     file.remove();

+ 18 - 16
test/cases/io/kv/KvDocumentTest.cpp

@@ -3,13 +3,15 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-12-25
- * Changed:         2022-05-14
+ * Changed:         2022-11-09
  *
  * */
 
 #include <gtest/gtest.h>
 #include <ls_std/ls_std_io.hpp>
 
+using namespace ls::std::io;
+
 namespace
 {
   class KvDocumentTest : public ::testing::Test
@@ -28,8 +30,8 @@ namespace
 
   TEST_F(KvDocumentTest, addPair)
   {
-    ls::std::io::KvDocument document{};
-    ls::std::io::KvPair pair{"port", "13088"};
+    KvDocument document{};
+    KvPair pair{"port", "13088"};
 
     ASSERT_TRUE(document.addPair(pair));
     ASSERT_EQ(1, document.getPairs().size());
@@ -37,8 +39,8 @@ namespace
 
   TEST_F(KvDocumentTest, addPair_retry_to_add_pair)
   {
-    ls::std::io::KvDocument document{};
-    ls::std::io::KvPair pair{"port", "13088"};
+    KvDocument document{};
+    KvPair pair{"port", "13088"};
 
     ASSERT_TRUE(document.addPair(pair));
     ASSERT_FALSE(document.addPair(pair));
@@ -48,8 +50,8 @@ namespace
   {
     // preparation
 
-    ls::std::io::KvDocument document{};
-    ls::std::io::KvPair pair{"port", "13088"};
+    KvDocument document{};
+    KvPair pair{"port", "13088"};
     document.addPair(pair);
 
     // check
@@ -61,21 +63,21 @@ namespace
 
   TEST_F(KvDocumentTest, getPairs)
   {
-    ls::std::io::KvDocument document{};
+    KvDocument document{};
     ASSERT_TRUE(document.getPairs().empty());
   }
 
   TEST_F(KvDocumentTest, hasPair)
   {
-    ls::std::io::KvDocument document{};
-    document.addPair(ls::std::io::KvPair{"port", "80"});
+    KvDocument document{};
+    document.addPair(KvPair{"port", "80"});
 
     ASSERT_TRUE(document.hasPair("port"));
   }
 
   TEST_F(KvDocumentTest, hasPair_no_pairs_available)
   {
-    ls::std::io::KvDocument document{};
+    KvDocument document{};
     ASSERT_FALSE(document.hasPair("port"));
   }
 
@@ -83,10 +85,10 @@ namespace
   {
     // preparation
 
-    ls::std::io::KvDocument document{};
-    document.addPair(ls::std::io::KvPair{"port", "80"});
-    document.addPair(ls::std::io::KvPair{"host", "localhost"});
-    document.addPair(ls::std::io::KvPair{"protocol", "TCP"});
+    KvDocument document{};
+    document.addPair(KvPair{"port", "80"});
+    document.addPair(KvPair{"host", "localhost"});
+    document.addPair(KvPair{"protocol", "TCP"});
 
     // remove pair and check
 
@@ -98,7 +100,7 @@ namespace
 
   TEST_F(KvDocumentTest, removePair_no_pair_available)
   {
-    ls::std::io::KvDocument document{};
+    KvDocument document{};
     ASSERT_FALSE(document.removePair("port"));
   }
 }

+ 29 - 24
test/cases/io/kv/KvFileReaderTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-12-25
- * Changed:         2022-05-20
+ * Changed:         2022-11-09
  *
  * */
 
@@ -12,6 +12,11 @@
 #include <ls_std/ls_std_io.hpp>
 #include "TestHelper.hpp"
 
+using namespace ls::std::core;
+using namespace ls::std::io;
+using namespace ::std;
+using namespace ls_std_test;
+
 namespace
 {
   class KvFileReaderTest : public ::testing::Test
@@ -27,12 +32,12 @@ namespace
       void TearDown() override
       {}
 
-      static std::shared_ptr<ls::std::io::KvFileReader> createTestKVFileReader()
+      static shared_ptr<KvFileReader> createTestKVFileReader()
       {
-        ::std::string kvPath = ls_std_test::TestHelper::getResourcesFolderLocation() + "server_settings.kv";
-        ::std::shared_ptr<ls::std::io::KvDocument> document = ::std::make_shared<ls::std::io::KvDocument>();
+        string kvPath = TestHelper::getResourcesFolderLocation() + "server_settings.kv";
+        shared_ptr<KvDocument> document = make_shared<KvDocument>();
 
-        return ::std::make_shared<ls::std::io::KvFileReader>(document, kvPath);
+        return make_shared<KvFileReader>(document, kvPath);
       }
   };
 
@@ -41,14 +46,14 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     ::std::string kvPath = ls_std_test::TestHelper::getResourcesFolderLocation() + "server_settings.kv";
-                     ls::std::io::KvFileReader reader = ls::std::io::KvFileReader(nullptr, kvPath);
+                     string kvPath = TestHelper::getResourcesFolderLocation() + "server_settings.kv";
+                     KvFileReader reader = KvFileReader(nullptr, kvPath);
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 
   TEST_F(KvFileReaderTest, constructor_invalid_file_path)
@@ -56,18 +61,18 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     ls::std::io::KvFileReader reader = ls::std::io::KvFileReader(::std::make_shared<ls::std::io::KvDocument>(), "invalid_path");
+                     KvFileReader reader = KvFileReader(make_shared<KvDocument>(), "invalid_path");
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 
   TEST_F(KvFileReaderTest, getDocument)
   {
-    const ::std::shared_ptr<ls::std::io::KvFileReader> &reader = createTestKVFileReader();
+    const shared_ptr<KvFileReader> &reader = createTestKVFileReader();
     ASSERT_TRUE(reader->getDocument() != nullptr);
   }
 
@@ -75,12 +80,12 @@ namespace
   {
     // preparation
 
-    const ::std::shared_ptr<ls::std::io::KvFileReader> &reader = createTestKVFileReader();
+    const shared_ptr<KvFileReader> &reader = createTestKVFileReader();
 
     // read file and check
 
     reader->read();
-    const ::std::shared_ptr<ls::std::io::KvDocument> &document = reader->getDocument();
+    const shared_ptr<KvDocument> &document = reader->getDocument();
 
     ASSERT_EQ(3, document->getPairs().size());
     ASSERT_TRUE(document->hasPair("port"));
@@ -94,46 +99,46 @@ namespace
 
   TEST_F(KvFileReaderTest, setFile_no_existing_file)
   {
-    const ::std::shared_ptr<ls::std::io::KvFileReader> &reader = createTestKVFileReader();
+    const shared_ptr<KvFileReader> &reader = createTestKVFileReader();
 
     EXPECT_THROW({
                    try
                    {
-                     reader->setFile(ls::std::io::File{"invalid_path"});
+                     reader->setFile(File{"invalid_path"});
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 
   TEST_F(KvFileReaderTest, setDocument)
   {
     // preparation
 
-    const ::std::shared_ptr<ls::std::io::KvFileReader> &reader = createTestKVFileReader();
+    const shared_ptr<KvFileReader> &reader = createTestKVFileReader();
 
     // set new document and check
 
-    ::std::shared_ptr<ls::std::io::KvDocument> newDocument = ::std::make_shared<ls::std::io::KvDocument>();
+    shared_ptr<KvDocument> newDocument = make_shared<KvDocument>();
     reader->setDocument(newDocument);
     ASSERT_TRUE(reader->getDocument() == newDocument);
   }
 
   TEST_F(KvFileReaderTest, setDocument_no_reference)
   {
-    const ::std::shared_ptr<ls::std::io::KvFileReader> &reader = createTestKVFileReader();
+    const shared_ptr<KvFileReader> &reader = createTestKVFileReader();
 
     EXPECT_THROW({
                    try
                    {
                      reader->setDocument(nullptr);
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 }

+ 10 - 7
test/cases/io/kv/KvPairTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-12-25
- * Changed:         2022-05-14
+ * Changed:         2022-11-09
  *
  * */
 
@@ -11,6 +11,9 @@
 #include <ls_std/ls_std_core.hpp>
 #include <ls_std/ls_std_io.hpp>
 
+using namespace ls::std::core;
+using namespace ls::std::io;
+
 namespace
 {
   class KvPairTest : public ::testing::Test
@@ -33,30 +36,30 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     ls::std::io::KvPair pair = ls::std::io::KvPair("", "1989");
+                     KvPair pair = KvPair("", "1989");
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 
   TEST_F(KvPairTest, getKey)
   {
-    ls::std::io::KvPair pair{"port", "13088"};
+    KvPair pair{"port", "13088"};
     ASSERT_STREQ("port", pair.getKey().c_str());
   }
 
   TEST_F(KvPairTest, getValue)
   {
-    ls::std::io::KvPair pair{"port", "13088"};
+    KvPair pair{"port", "13088"};
     ASSERT_STREQ("13088", pair.getValue().c_str());
   }
 
   TEST_F(KvPairTest, setValue)
   {
-    ls::std::io::KvPair pair{"port", "13088"};
+    KvPair pair{"port", "13088"};
     ASSERT_STREQ("13088", pair.getValue().c_str());
 
     pair.setValue("8080");

+ 20 - 15
test/cases/io/kv/KvParserTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-12-25
- * Changed:         2022-05-20
+ * Changed:         2022-11-09
  *
  * */
 
@@ -11,6 +11,11 @@
 #include <ls_std/ls_std_core.hpp>
 #include <ls_std/ls_std_io.hpp>
 
+using namespace ls::std::core;
+using namespace ls::std::core::type;
+using namespace ls::std::io;
+using namespace ::std;
+
 namespace
 {
   class KvParserTest : public ::testing::Test
@@ -32,26 +37,26 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     ls::std::io::KvParser parser{nullptr};
+                     KvParser parser{nullptr};
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 
   TEST_F(KvParserTest, getDocument)
   {
-    ls::std::io::KvParser parser{::std::make_shared<ls::std::io::KvDocument>()};
+    KvParser parser{make_shared<KvDocument>()};
     ASSERT_TRUE(parser.getDocument() != nullptr);
   }
 
   TEST_F(KvParserTest, parse)
   {
-    ::std::shared_ptr<ls::std::io::KvDocument> document = ::std::make_shared<ls::std::io::KvDocument>();
-    ls::std::io::KvParser parser{document};
-    ls::std::core::type::byte_field data = "# starting comment\n\nport=8080; # some comment\nhost=localhost;\nservice-name=deamon;";
+    shared_ptr<KvDocument> document = make_shared<KvDocument>();
+    KvParser parser{document};
+    byte_field data = "# starting comment\n\nport=8080; # some comment\nhost=localhost;\nservice-name=deamon;";
     parser.parse(data);
 
     ASSERT_EQ(3, document->getPairs().size());
@@ -68,30 +73,30 @@ namespace
   {
     // preparation
 
-    ::std::shared_ptr<ls::std::io::KvDocument> document = ::std::make_shared<ls::std::io::KvDocument>();
-    ls::std::io::KvParser parser{document};
+    shared_ptr<KvDocument> document = make_shared<KvDocument>();
+    KvParser parser{document};
 
     // set and check
 
-    ::std::shared_ptr<ls::std::io::KvDocument> newDocument = ::std::make_shared<ls::std::io::KvDocument>();
+    shared_ptr<KvDocument> newDocument = make_shared<KvDocument>();
     parser.setDocument(newDocument);
     ASSERT_TRUE(parser.getDocument() == newDocument);
   }
 
   TEST_F(KvParserTest, setDocument_no_reference)
   {
-    ::std::shared_ptr<ls::std::io::KvDocument> document = ::std::make_shared<ls::std::io::KvDocument>();
-    ls::std::io::KvParser parser{document};
+    shared_ptr<KvDocument> document = make_shared<KvDocument>();
+    KvParser parser{document};
 
     EXPECT_THROW({
                    try
                    {
                      parser.setDocument(nullptr);
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 }

+ 59 - 56
test/cases/io/logging/LogLevelTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-02
- * Changed:         2022-05-14
+ * Changed:         2022-11-09
  *
  * */
 
@@ -11,6 +11,9 @@
 #include <ls_std/ls_std_core.hpp>
 #include <ls_std/ls_std_io.hpp>
 
+using namespace ls::std::core;
+using namespace ls::std::io;
+
 namespace
 {
   class LogLevelTest : public ::testing::Test
@@ -29,150 +32,150 @@ namespace
 
   TEST_F(LogLevelTest, constructor_with_log_level_value_parameter)
   {
-    ls::std::io::LogLevel logLevel{ls::std::io::LogLevelValue::INFO};
-    ASSERT_EQ(ls::std::io::LogLevelValue::INFO, logLevel);
+    LogLevel logLevel{LogLevelValue::INFO};
+    ASSERT_EQ(LogLevelValue::INFO, logLevel);
   }
 
   TEST_F(LogLevelTest, constructor_default)
   {
-    ls::std::io::LogLevel logLevel{};
-    ASSERT_EQ(ls::std::io::LogLevelValue::FATAL, logLevel);
+    LogLevel logLevel{};
+    ASSERT_EQ(LogLevelValue::FATAL, logLevel);
   }
 
   TEST_F(LogLevelTest, operator_assign)
   {
-    ls::std::io::LogLevel logLevel{ls::std::io::LogLevelValue::DEBUG};
-    logLevel = ls::std::io::LogLevelValue::INFO;
+    LogLevel logLevel{LogLevelValue::DEBUG};
+    logLevel = LogLevelValue::INFO;
 
-    ASSERT_EQ(ls::std::io::LogLevelValue::INFO, logLevel);
+    ASSERT_EQ(LogLevelValue::INFO, logLevel);
   }
 
   TEST_F(LogLevelTest, operator_lessThan)
   {
-    ls::std::io::LogLevel logLevel{}; // default is FATAL
+    LogLevel logLevel{}; // default is FATAL
 
-    ASSERT_TRUE(logLevel < ls::std::io::LogLevelValue::ERR);
-    ASSERT_TRUE(logLevel < ls::std::io::LogLevelValue::WARN);
-    ASSERT_TRUE(logLevel < ls::std::io::LogLevelValue::INFO);
-    ASSERT_TRUE(logLevel < ls::std::io::LogLevelValue::DEBUG);
-    ASSERT_TRUE(logLevel < ls::std::io::LogLevelValue::TRACE);
+    ASSERT_TRUE(logLevel < LogLevelValue::ERR);
+    ASSERT_TRUE(logLevel < LogLevelValue::WARN);
+    ASSERT_TRUE(logLevel < LogLevelValue::INFO);
+    ASSERT_TRUE(logLevel < LogLevelValue::DEBUG);
+    ASSERT_TRUE(logLevel < LogLevelValue::TRACE);
   }
 
   TEST_F(LogLevelTest, operator_lessThan_not_less_than)
   {
-    ls::std::io::LogLevel logLevel{ls::std::io::LogLevelValue::DEBUG};
-    ASSERT_FALSE(logLevel < ls::std::io::LogLevelValue::ERR);
+    LogLevel logLevel{LogLevelValue::DEBUG};
+    ASSERT_FALSE(logLevel < LogLevelValue::ERR);
   }
 
   TEST_F(LogLevelTest, operator_less_than_equals)
   {
-    ls::std::io::LogLevel logLevel{}; // default is FATAL
+    LogLevel logLevel{}; // default is FATAL
 
-    ASSERT_TRUE(logLevel <= ls::std::io::LogLevelValue::FATAL);
-    ASSERT_TRUE(logLevel <= ls::std::io::LogLevelValue::ERR);
-    ASSERT_TRUE(logLevel <= ls::std::io::LogLevelValue::WARN);
-    ASSERT_TRUE(logLevel <= ls::std::io::LogLevelValue::INFO);
-    ASSERT_TRUE(logLevel <= ls::std::io::LogLevelValue::DEBUG);
-    ASSERT_TRUE(logLevel <= ls::std::io::LogLevelValue::TRACE);
+    ASSERT_TRUE(logLevel <= LogLevelValue::FATAL);
+    ASSERT_TRUE(logLevel <= LogLevelValue::ERR);
+    ASSERT_TRUE(logLevel <= LogLevelValue::WARN);
+    ASSERT_TRUE(logLevel <= LogLevelValue::INFO);
+    ASSERT_TRUE(logLevel <= LogLevelValue::DEBUG);
+    ASSERT_TRUE(logLevel <= LogLevelValue::TRACE);
   }
 
   TEST_F(LogLevelTest, operator_less_than_equals_not_less_than_equals)
   {
-    ls::std::io::LogLevel logLevel{ls::std::io::LogLevelValue::DEBUG};
-    ASSERT_FALSE(logLevel <= ls::std::io::LogLevelValue::ERR);
+    LogLevel logLevel{LogLevelValue::DEBUG};
+    ASSERT_FALSE(logLevel <= LogLevelValue::ERR);
   }
 
   TEST_F(LogLevelTest, operator_greater_than)
   {
-    ls::std::io::LogLevel logLevel{ls::std::io::LogLevelValue::DEBUG};
-    ASSERT_TRUE(logLevel > ls::std::io::LogLevelValue::ERR);
+    LogLevel logLevel{LogLevelValue::DEBUG};
+    ASSERT_TRUE(logLevel > LogLevelValue::ERR);
   }
 
   TEST_F(LogLevelTest, operator_greater_than_not_greater_than)
   {
-    ls::std::io::LogLevel logLevel{ls::std::io::LogLevelValue::DEBUG};
-    ASSERT_FALSE(logLevel > ls::std::io::LogLevelValue::DEBUG);
+    LogLevel logLevel{LogLevelValue::DEBUG};
+    ASSERT_FALSE(logLevel > LogLevelValue::DEBUG);
   }
 
   TEST_F(LogLevelTest, operator_greater_than_equals)
   {
-    ls::std::io::LogLevel logLevel{ls::std::io::LogLevelValue::DEBUG};
-    ASSERT_TRUE(logLevel >= ls::std::io::LogLevelValue::ERR);
+    LogLevel logLevel{LogLevelValue::DEBUG};
+    ASSERT_TRUE(logLevel >= LogLevelValue::ERR);
   }
 
   TEST_F(LogLevelTest, operator_greater_than_equals_not_greater_than_equals)
   {
-    ls::std::io::LogLevel logLevel{};
-    ASSERT_FALSE(logLevel >= ls::std::io::LogLevelValue::ERR);
+    LogLevel logLevel{};
+    ASSERT_FALSE(logLevel >= LogLevelValue::ERR);
   }
 
   TEST_F(LogLevelTest, operator_equals)
   {
-    ls::std::io::LogLevel logLevel{ls::std::io::LogLevelValue::DEBUG};
-    ASSERT_TRUE(logLevel == ls::std::io::LogLevelValue::DEBUG);
+    LogLevel logLevel{LogLevelValue::DEBUG};
+    ASSERT_TRUE(logLevel == LogLevelValue::DEBUG);
   }
 
   TEST_F(LogLevelTest, operator_equals_not_equals)
   {
-    ls::std::io::LogLevel logLevel{ls::std::io::LogLevelValue::TRACE};
-    ASSERT_FALSE(logLevel == ls::std::io::LogLevelValue::DEBUG);
+    LogLevel logLevel{LogLevelValue::TRACE};
+    ASSERT_FALSE(logLevel == LogLevelValue::DEBUG);
   }
 
   TEST_F(LogLevelTest, setLogLevel_with_log_level_value)
   {
-    ls::std::io::LogLevel logLevel{};
-    logLevel.setLogLevel(ls::std::io::LogLevelValue::INFO);
+    LogLevel logLevel{};
+    logLevel.setLogLevel(LogLevelValue::INFO);
 
-    ASSERT_EQ(ls::std::io::LogLevelValue::INFO, logLevel);
+    ASSERT_EQ(LogLevelValue::INFO, logLevel);
   }
 
   TEST_F(LogLevelTest, setLogLevel_with_string)
   {
-    ls::std::io::LogLevel logLevel{};
+    LogLevel logLevel{};
 
     logLevel.setLogLevel("FATAL");
-    ASSERT_EQ(ls::std::io::LogLevelValue::FATAL, logLevel);
+    ASSERT_EQ(LogLevelValue::FATAL, logLevel);
     logLevel.setLogLevel("ERROR");
-    ASSERT_EQ(ls::std::io::LogLevelValue::ERR, logLevel);
+    ASSERT_EQ(LogLevelValue::ERR, logLevel);
     logLevel.setLogLevel("WARN");
-    ASSERT_EQ(ls::std::io::LogLevelValue::WARN, logLevel);
+    ASSERT_EQ(LogLevelValue::WARN, logLevel);
     logLevel.setLogLevel("INFO");
-    ASSERT_EQ(ls::std::io::LogLevelValue::INFO, logLevel);
+    ASSERT_EQ(LogLevelValue::INFO, logLevel);
     logLevel.setLogLevel("DEBUG");
-    ASSERT_EQ(ls::std::io::LogLevelValue::DEBUG, logLevel);
+    ASSERT_EQ(LogLevelValue::DEBUG, logLevel);
     logLevel.setLogLevel("TRACE");
-    ASSERT_EQ(ls::std::io::LogLevelValue::TRACE, logLevel);
+    ASSERT_EQ(LogLevelValue::TRACE, logLevel);
   }
 
   TEST_F(LogLevelTest, setLogLevel_string_no_valid_string)
   {
-    ls::std::io::LogLevel logLevel{};
+    LogLevel logLevel{};
 
     EXPECT_THROW({
                    try
                    {
                      logLevel.setLogLevel("This is not a valid log level!");
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 
   TEST_F(LogLevelTest, toString)
   {
-    ls::std::io::LogLevel logLevel{};
+    LogLevel logLevel{};
     ASSERT_STREQ("FATAL", logLevel.toString().c_str());
-    logLevel.setLogLevel(ls::std::io::LogLevelValue::ERR);
+    logLevel.setLogLevel(LogLevelValue::ERR);
     ASSERT_STREQ("ERROR", logLevel.toString().c_str());
-    logLevel.setLogLevel(ls::std::io::LogLevelValue::WARN);
+    logLevel.setLogLevel(LogLevelValue::WARN);
     ASSERT_STREQ("WARN", logLevel.toString().c_str());
-    logLevel.setLogLevel(ls::std::io::LogLevelValue::INFO);
+    logLevel.setLogLevel(LogLevelValue::INFO);
     ASSERT_STREQ("INFO", logLevel.toString().c_str());
-    logLevel.setLogLevel(ls::std::io::LogLevelValue::DEBUG);
+    logLevel.setLogLevel(LogLevelValue::DEBUG);
     ASSERT_STREQ("DEBUG", logLevel.toString().c_str());
-    logLevel.setLogLevel(ls::std::io::LogLevelValue::TRACE);
+    logLevel.setLogLevel(LogLevelValue::TRACE);
     ASSERT_STREQ("TRACE", logLevel.toString().c_str());
   }
 }

+ 95 - 89
test/cases/io/logging/LoggerTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-20
- * Changed:         2022-05-20
+ * Changed:         2022-11-09
  *
  * */
 
@@ -12,6 +12,12 @@
 #include <ls_std/ls_std_io.hpp>
 #include "TestHelper.hpp"
 
+using namespace ls::std::core;
+using namespace ls::std::core::interface_type;
+using namespace ls::std::io;
+using namespace ::std;
+using namespace ls_std_test;
+
 namespace
 {
   class LoggerTest : public ::testing::Test
@@ -27,26 +33,26 @@ namespace
       void TearDown() override
       {}
 
-      static ::std::shared_ptr<ls::std::core::interface_type::IWriter> createFileLogger(const ::std::string &_logName)
+      static shared_ptr<IWriter> createFileLogger(const string &_logName)
       {
-        ::std::string path = ls_std_test::TestHelper::getResourcesFolderLocation() + _logName;
-        ls::std::io::File file{path};
+        string path = TestHelper::getResourcesFolderLocation() + _logName;
+        File file{path};
 
         if (!file.exists())
         {
           file.createNewFile();
         }
 
-        ::std::shared_ptr<ls::std::core::interface_type::IWriter> writer = ::std::dynamic_pointer_cast<ls::std::core::interface_type::IWriter>(::std::make_shared<ls::std::io::FileOutputStream>(file));
+        shared_ptr<IWriter> writer = dynamic_pointer_cast<IWriter>(make_shared<FileOutputStream>(file));
 
         return writer;
       }
 
-      static ::std::string getContentFromLogFile(const ::std::string &_logName)
+      static string getContentFromLogFile(const string &_logName)
       {
-        ls::std::io::File file{ls_std_test::TestHelper::getResourcesFolderLocation() + _logName};
-        ls::std::io::FileReader reader{file};
-        ::std::string content{reader.read()};
+        File file{TestHelper::getResourcesFolderLocation() + _logName};
+        FileReader reader{file};
+        string content{reader.read()};
         file.remove();
 
         return content;
@@ -58,24 +64,24 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     ls::std::io::Logger logger{nullptr};
+                     Logger logger{nullptr};
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 
   TEST_F(LoggerTest, debug)
   {
     // write to log file
 
-    ::std::string logName = "output_debug.log";
-    ::std::shared_ptr<ls::std::core::interface_type::IWriter> writer = createFileLogger(logName);
+    string logName = "output_debug.log";
+    shared_ptr<IWriter> writer = createFileLogger(logName);
 
-    ls::std::io::Logger logger{writer};
-    logger.setLogLevel(ls::std::io::LogLevelValue::DEBUG);
+    Logger logger{writer};
+    logger.setLogLevel(LogLevelValue::DEBUG);
     logger.debug("1. line!");
     logger.info("2. line!");
     logger.error("3. line!");
@@ -85,26 +91,26 @@ namespace
 
     // get content and check
 
-    ::std::dynamic_pointer_cast<ls::std::io::FileOutputStream>(writer)->close();
-    ::std::string content = getContentFromLogFile(logName);
+    dynamic_pointer_cast<FileOutputStream>(writer)->close();
+    string content = getContentFromLogFile(logName);
 
-    ASSERT_TRUE(content.find("1. line!") != ::std::string::npos);
-    ASSERT_TRUE(content.find("2. line!") != ::std::string::npos);
-    ASSERT_TRUE(content.find("3. line!") != ::std::string::npos);
-    ASSERT_TRUE(content.find("4. line!") != ::std::string::npos);
-    ASSERT_TRUE(content.find("5. line!") != ::std::string::npos);
-    ASSERT_FALSE(content.find("6. line!") != ::std::string::npos);
+    ASSERT_TRUE(content.find("1. line!") != string::npos);
+    ASSERT_TRUE(content.find("2. line!") != string::npos);
+    ASSERT_TRUE(content.find("3. line!") != string::npos);
+    ASSERT_TRUE(content.find("4. line!") != string::npos);
+    ASSERT_TRUE(content.find("5. line!") != string::npos);
+    ASSERT_FALSE(content.find("6. line!") != string::npos);
   }
 
   TEST_F(LoggerTest, error)
   {
     // write to log file
 
-    ::std::string logName = "output_error.log";
-    ::std::shared_ptr<ls::std::core::interface_type::IWriter> writer = createFileLogger(logName);
+    string logName = "output_error.log";
+    shared_ptr<IWriter> writer = createFileLogger(logName);
 
-    ls::std::io::Logger logger{writer};
-    logger.setLogLevel(ls::std::io::LogLevelValue::ERR);
+    Logger logger{writer};
+    logger.setLogLevel(LogLevelValue::ERR);
     logger.debug("1. line!");
     logger.info("2. line!");
     logger.error("3. line!");
@@ -114,26 +120,26 @@ namespace
 
     // get content and check
 
-    ::std::dynamic_pointer_cast<ls::std::io::FileOutputStream>(writer)->close();
-    ::std::string content = getContentFromLogFile(logName);
+    dynamic_pointer_cast<FileOutputStream>(writer)->close();
+    string content = getContentFromLogFile(logName);
 
-    ASSERT_FALSE(content.find("1. line!") != ::std::string::npos);
-    ASSERT_FALSE(content.find("2. line!") != ::std::string::npos);
-    ASSERT_TRUE(content.find("3. line!") != ::std::string::npos);
-    ASSERT_TRUE(content.find("4. line!") != ::std::string::npos);
-    ASSERT_FALSE(content.find("5. line!") != ::std::string::npos);
-    ASSERT_FALSE(content.find("6. line!") != ::std::string::npos);
+    ASSERT_FALSE(content.find("1. line!") != string::npos);
+    ASSERT_FALSE(content.find("2. line!") != string::npos);
+    ASSERT_TRUE(content.find("3. line!") != string::npos);
+    ASSERT_TRUE(content.find("4. line!") != string::npos);
+    ASSERT_FALSE(content.find("5. line!") != string::npos);
+    ASSERT_FALSE(content.find("6. line!") != string::npos);
   }
 
   TEST_F(LoggerTest, fatal)
   {
     // write to log file
 
-    ::std::string logName = "output_fatal.log";
-    ::std::shared_ptr<ls::std::core::interface_type::IWriter> writer = createFileLogger(logName);
+    string logName = "output_fatal.log";
+    shared_ptr<IWriter> writer = createFileLogger(logName);
 
-    ls::std::io::Logger logger{writer};
-    logger.setLogLevel(ls::std::io::LogLevelValue::FATAL);
+    Logger logger{writer};
+    logger.setLogLevel(LogLevelValue::FATAL);
     logger.debug("1. line!");
     logger.info("2. line!");
     logger.error("3. line!");
@@ -143,32 +149,32 @@ namespace
 
     // get content and check
 
-    ::std::dynamic_pointer_cast<ls::std::io::FileOutputStream>(writer)->close();
-    ::std::string content = getContentFromLogFile(logName);
+    dynamic_pointer_cast<FileOutputStream>(writer)->close();
+    string content = getContentFromLogFile(logName);
 
-    ASSERT_FALSE(content.find("1. line!") != ::std::string::npos);
-    ASSERT_FALSE(content.find("2. line!") != ::std::string::npos);
-    ASSERT_FALSE(content.find("3. line!") != ::std::string::npos);
-    ASSERT_TRUE(content.find("4. line!") != ::std::string::npos);
-    ASSERT_FALSE(content.find("5. line!") != ::std::string::npos);
-    ASSERT_FALSE(content.find("6. line!") != ::std::string::npos);
+    ASSERT_FALSE(content.find("1. line!") != string::npos);
+    ASSERT_FALSE(content.find("2. line!") != string::npos);
+    ASSERT_FALSE(content.find("3. line!") != string::npos);
+    ASSERT_TRUE(content.find("4. line!") != string::npos);
+    ASSERT_FALSE(content.find("5. line!") != string::npos);
+    ASSERT_FALSE(content.find("6. line!") != string::npos);
   }
 
   TEST_F(LoggerTest, getLogLevel)
   {
-    ls::std::io::Logger logger{createFileLogger("output.log")};
-    ASSERT_EQ(ls::std::io::LogLevelValue::INFO, logger.getLogLevel());
+    Logger logger{createFileLogger("output.log")};
+    ASSERT_EQ(LogLevelValue::INFO, logger.getLogLevel());
   }
 
   TEST_F(LoggerTest, info)
   {
     // write to log file
 
-    ::std::string logName = "output_info.log";
-    ::std::shared_ptr<ls::std::core::interface_type::IWriter> writer = createFileLogger(logName);
+    string logName = "output_info.log";
+    shared_ptr<IWriter> writer = createFileLogger(logName);
 
-    ls::std::io::Logger logger{writer};
-    logger.setLogLevel(ls::std::io::LogLevelValue::INFO);
+    Logger logger{writer};
+    logger.setLogLevel(LogLevelValue::INFO);
     logger.fatal("1. line!");
     logger.error("2. line!");
     logger.warn("3. line!");
@@ -178,34 +184,34 @@ namespace
 
     // get content and check
 
-    ::std::dynamic_pointer_cast<ls::std::io::FileOutputStream>(writer)->close();
-    ::std::string content = getContentFromLogFile(logName);
+    dynamic_pointer_cast<FileOutputStream>(writer)->close();
+    string content = getContentFromLogFile(logName);
 
-    ASSERT_TRUE(content.find("1. line!") != ::std::string::npos);
-    ASSERT_TRUE(content.find("2. line!") != ::std::string::npos);
-    ASSERT_TRUE(content.find("3. line!") != ::std::string::npos);
-    ASSERT_TRUE(content.find("4. line!") != ::std::string::npos);
-    ASSERT_FALSE(content.find("5. line!") != ::std::string::npos);
-    ASSERT_FALSE(content.find("6. line!") != ::std::string::npos);
+    ASSERT_TRUE(content.find("1. line!") != string::npos);
+    ASSERT_TRUE(content.find("2. line!") != string::npos);
+    ASSERT_TRUE(content.find("3. line!") != string::npos);
+    ASSERT_TRUE(content.find("4. line!") != string::npos);
+    ASSERT_FALSE(content.find("5. line!") != string::npos);
+    ASSERT_FALSE(content.find("6. line!") != string::npos);
   }
 
   TEST_F(LoggerTest, setLogLevel)
   {
-    ls::std::io::Logger logger{createFileLogger("output.log")};
-    logger.setLogLevel(ls::std::io::LogLevelValue::ERR);
+    Logger logger{createFileLogger("output.log")};
+    logger.setLogLevel(LogLevelValue::ERR);
 
-    ASSERT_EQ(ls::std::io::LogLevelValue::ERR, logger.getLogLevel());
+    ASSERT_EQ(LogLevelValue::ERR, logger.getLogLevel());
   }
 
   TEST_F(LoggerTest, trace)
   {
     // write to log file
 
-    ::std::string logName = "output_trace.log";
-    ::std::shared_ptr<ls::std::core::interface_type::IWriter> writer = createFileLogger(logName);
+    string logName = "output_trace.log";
+    shared_ptr<IWriter> writer = createFileLogger(logName);
 
-    ls::std::io::Logger logger{writer};
-    logger.setLogLevel(ls::std::io::LogLevelValue::TRACE);
+    Logger logger{writer};
+    logger.setLogLevel(LogLevelValue::TRACE);
     logger.fatal("1. line!");
     logger.error("2. line!");
     logger.warn("3. line!");
@@ -215,26 +221,26 @@ namespace
 
     // get content and check
 
-    ::std::dynamic_pointer_cast<ls::std::io::FileOutputStream>(writer)->close();
-    ::std::string content = getContentFromLogFile(logName);
+    dynamic_pointer_cast<FileOutputStream>(writer)->close();
+    string content = getContentFromLogFile(logName);
 
-    ASSERT_TRUE(content.find("1. line!") != ::std::string::npos);
-    ASSERT_TRUE(content.find("2. line!") != ::std::string::npos);
-    ASSERT_TRUE(content.find("3. line!") != ::std::string::npos);
-    ASSERT_TRUE(content.find("4. line!") != ::std::string::npos);
-    ASSERT_TRUE(content.find("5. line!") != ::std::string::npos);
-    ASSERT_TRUE(content.find("6. line!") != ::std::string::npos);
+    ASSERT_TRUE(content.find("1. line!") != string::npos);
+    ASSERT_TRUE(content.find("2. line!") != string::npos);
+    ASSERT_TRUE(content.find("3. line!") != string::npos);
+    ASSERT_TRUE(content.find("4. line!") != string::npos);
+    ASSERT_TRUE(content.find("5. line!") != string::npos);
+    ASSERT_TRUE(content.find("6. line!") != string::npos);
   }
 
   TEST_F(LoggerTest, warn)
   {
     // write to log file
 
-    ::std::string logName = "output_warn.log";
-    ::std::shared_ptr<ls::std::core::interface_type::IWriter> writer = createFileLogger(logName);
+    string logName = "output_warn.log";
+    shared_ptr<IWriter> writer = createFileLogger(logName);
 
-    ls::std::io::Logger logger{writer};
-    logger.setLogLevel(ls::std::io::LogLevelValue::WARN);
+    Logger logger{writer};
+    logger.setLogLevel(LogLevelValue::WARN);
     logger.fatal("1. line!");
     logger.error("2. line!");
     logger.warn("3. line!");
@@ -244,14 +250,14 @@ namespace
 
     // get content and check
 
-    ::std::dynamic_pointer_cast<ls::std::io::FileOutputStream>(writer)->close();
-    ::std::string content = getContentFromLogFile(logName);
+    dynamic_pointer_cast<FileOutputStream>(writer)->close();
+    string content = getContentFromLogFile(logName);
 
-    ASSERT_TRUE(content.find("1. line!") != ::std::string::npos);
-    ASSERT_TRUE(content.find("2. line!") != ::std::string::npos);
-    ASSERT_TRUE(content.find("3. line!") != ::std::string::npos);
-    ASSERT_FALSE(content.find("4. line!") != ::std::string::npos);
-    ASSERT_FALSE(content.find("5. line!") != ::std::string::npos);
-    ASSERT_FALSE(content.find("6. line!") != ::std::string::npos);
+    ASSERT_TRUE(content.find("1. line!") != string::npos);
+    ASSERT_TRUE(content.find("2. line!") != string::npos);
+    ASSERT_TRUE(content.find("3. line!") != string::npos);
+    ASSERT_FALSE(content.find("4. line!") != string::npos);
+    ASSERT_FALSE(content.find("5. line!") != string::npos);
+    ASSERT_FALSE(content.find("6. line!") != string::npos);
   }
 }

+ 18 - 15
test/cases/io/xml/XmlAttributeTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-23
- * Changed:         2022-05-14
+ * Changed:         2022-11-09
  *
  * */
 
@@ -11,6 +11,9 @@
 #include <ls_std/ls_std_core.hpp>
 #include <ls_std/ls_std_io.hpp>
 
+using namespace ls::std::core;
+using namespace ls::std::io;
+
 namespace
 {
   class XmlAttributeTest : public ::testing::Test
@@ -32,30 +35,30 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     ls::std::io::XmlAttribute attribute{""};
+                     XmlAttribute attribute{""};
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 
   TEST_F(XmlAttributeTest, getName)
   {
-    ls::std::io::XmlAttribute attribute{"id"};
+    XmlAttribute attribute{"id"};
     ASSERT_STREQ("id", attribute.getName().c_str());
   }
 
   TEST_F(XmlAttributeTest, getValue)
   {
-    ls::std::io::XmlAttribute attribute{"id"};
+    XmlAttribute attribute{"id"};
     ASSERT_TRUE(attribute.getValue().empty());
   }
 
   TEST_F(XmlAttributeTest, setName)
   {
-    ls::std::io::XmlAttribute attribute{"id"};
+    XmlAttribute attribute{"id"};
     attribute.setName("id2");
 
     ASSERT_STREQ("id2", attribute.getName().c_str());
@@ -66,19 +69,19 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     ls::std::io::XmlAttribute attribute{"id"};
+                     XmlAttribute attribute{"id"};
                      attribute.setName("");
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 
   TEST_F(XmlAttributeTest, setValue)
   {
-    ls::std::io::XmlAttribute attribute{"id"};
+    XmlAttribute attribute{"id"};
     attribute.setValue("some_content");
 
     ASSERT_STREQ("some_content", attribute.getValue().c_str());
@@ -89,19 +92,19 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     ls::std::io::XmlAttribute attribute{"id"};
+                     XmlAttribute attribute{"id"};
                      attribute.setValue("");
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 
   TEST_F(XmlAttributeTest, toXml)
   {
-    ls::std::io::XmlAttribute attribute{"id"};
+    XmlAttribute attribute{"id"};
     attribute.setValue("some_content");
 
     ASSERT_STREQ(R"(id="some_content")", attribute.toXml().c_str());

+ 23 - 20
test/cases/io/xml/XmlDeclarationTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-29
- * Changed:         2022-05-14
+ * Changed:         2022-11-09
  *
  * */
 
@@ -11,6 +11,9 @@
 #include <ls_std/ls_std_core.hpp>
 #include <ls_std/ls_std_io.hpp>
 
+using namespace ls::std::core;
+using namespace ls::std::io;
+
 namespace
 {
   class XmlDeclarationTest : public ::testing::Test
@@ -32,36 +35,36 @@ namespace
     EXPECT_THROW({
                    try
                    {
-                     ls::std::io::XmlDeclaration declaration{""};
+                     XmlDeclaration declaration{""};
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 
   TEST_F(XmlDeclarationTest, getEncoding)
   {
-    ls::std::io::XmlDeclaration declaration{"1.0"};
+    XmlDeclaration declaration{"1.0"};
     ASSERT_TRUE(declaration.getEncoding().empty());
   }
 
   TEST_F(XmlDeclarationTest, getStandalone)
   {
-    ls::std::io::XmlDeclaration declaration{"1.0"};
+    XmlDeclaration declaration{"1.0"};
     ASSERT_TRUE(declaration.getStandalone().empty());
   }
 
   TEST_F(XmlDeclarationTest, getVersion)
   {
-    ls::std::io::XmlDeclaration declaration{"1.0"};
+    XmlDeclaration declaration{"1.0"};
     ASSERT_STREQ("1.0", declaration.getVersion().c_str());
   }
 
   TEST_F(XmlDeclarationTest, setEncoding)
   {
-    ls::std::io::XmlDeclaration declaration{"1.0"};
+    XmlDeclaration declaration{"1.0"};
 
     ASSERT_TRUE(declaration.getEncoding().empty());
 
@@ -71,23 +74,23 @@ namespace
 
   TEST_F(XmlDeclarationTest, setEncoding_empty_encoding)
   {
-    ls::std::io::XmlDeclaration declaration{"1.0"};
+    XmlDeclaration declaration{"1.0"};
 
     EXPECT_THROW({
                    try
                    {
                      declaration.setEncoding("");
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 
   TEST_F(XmlDeclarationTest, setStandalone)
   {
-    ls::std::io::XmlDeclaration declaration{"1.0"};
+    XmlDeclaration declaration{"1.0"};
 
     ASSERT_TRUE(declaration.getStandalone().empty());
 
@@ -97,23 +100,23 @@ namespace
 
   TEST_F(XmlDeclarationTest, setStandalone_empty_standalone)
   {
-    ls::std::io::XmlDeclaration declaration{"1.0"};
+    XmlDeclaration declaration{"1.0"};
 
     EXPECT_THROW({
                    try
                    {
                      declaration.setStandalone("");
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 
   TEST_F(XmlDeclarationTest, setVersion)
   {
-    ls::std::io::XmlDeclaration declaration{"1.0"};
+    XmlDeclaration declaration{"1.0"};
 
     ASSERT_FALSE(declaration.getVersion().empty());
     ASSERT_STREQ("1.0", declaration.getVersion().c_str());
@@ -124,23 +127,23 @@ namespace
 
   TEST_F(XmlDeclarationTest, setVersion_empty_version)
   {
-    ls::std::io::XmlDeclaration declaration{"1.0"};
+    XmlDeclaration declaration{"1.0"};
 
     EXPECT_THROW({
                    try
                    {
                      declaration.setVersion("");
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 
   TEST_F(XmlDeclarationTest, toXml)
   {
-    ls::std::io::XmlDeclaration declaration{"1.0"};
+    XmlDeclaration declaration{"1.0"};
     ASSERT_STREQ(R"(<?xml version="1.0" ?>)", declaration.toXml().c_str());
 
     declaration.setStandalone("yes");

+ 26 - 21
test/cases/io/xml/XmlDocumentTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-30
- * Changed:         2022-05-20
+ * Changed:         2022-11-09
  *
  * */
 
@@ -12,6 +12,11 @@
 #include <ls_std/ls_std_io.hpp>
 #include <ls_std_io_test.hpp>
 
+using namespace ls::std::core;
+using namespace ls::std::io;
+using namespace ::std;
+using namespace ls_std_io_test;
+
 namespace
 {
   class XmlDocumentTest : public ::testing::Test
@@ -30,85 +35,85 @@ namespace
 
   TEST_F(XmlDocumentTest, getDeclaration)
   {
-    ls::std::io::XmlDocument document{};
+    XmlDocument document{};
     ASSERT_TRUE(document.getDeclaration() == nullptr);
   }
 
   TEST_F(XmlDocumentTest, getRootElement)
   {
-    ls::std::io::XmlDocument document{};
+    XmlDocument document{};
     ASSERT_TRUE(document.getRootElement() == nullptr);
   }
 
   TEST_F(XmlDocumentTest, setDeclaration)
   {
-    ls::std::io::XmlDocument document{};
+    XmlDocument document{};
     ASSERT_TRUE(document.getDeclaration() == nullptr);
 
-    ls::std::io::XmlDeclaration declaration{"1.0"};
-    document.setDeclaration(::std::make_shared<ls::std::io::XmlDeclaration>(declaration));
+    XmlDeclaration declaration{"1.0"};
+    document.setDeclaration(make_shared<XmlDeclaration>(declaration));
     ASSERT_TRUE(document.getDeclaration() != nullptr);
     ASSERT_STREQ("1.0", document.getDeclaration()->getVersion().c_str());
   }
 
   TEST_F(XmlDocumentTest, setDeclaration_no_reference)
   {
-    ls::std::io::XmlDocument document{};
+    XmlDocument document{};
 
     EXPECT_THROW({
                    try
                    {
                      document.setDeclaration(nullptr);
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 
   TEST_F(XmlDocumentTest, setRootElement)
   {
-    ls::std::io::XmlDocument document{};
+    XmlDocument document{};
     ASSERT_TRUE(document.getRootElement() == nullptr);
 
-    ls::std::io::XmlDeclaration declaration{"1.0"};
-    document.setRootElement(ls_std_io_test::TestDataFactory::createXmlContent());
+    XmlDeclaration declaration{"1.0"};
+    document.setRootElement(TestDataFactory::createXmlContent());
     ASSERT_TRUE(document.getRootElement() != nullptr);
     ASSERT_STREQ("dialog", document.getRootElement()->getName().c_str());
   }
 
   TEST_F(XmlDocumentTest, setRootElement_no_reference)
   {
-    ls::std::io::XmlDocument document{};
+    XmlDocument document{};
 
     EXPECT_THROW({
                    try
                    {
                      document.setRootElement(nullptr);
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 
   TEST_F(XmlDocumentTest, toXml)
   {
-    ls::std::io::XmlDocument document{};
+    XmlDocument document{};
 
-    ls::std::io::XmlDeclaration declaration{"1.0"};
+    XmlDeclaration declaration{"1.0"};
     declaration.setEncoding("UTF-8");
     declaration.setStandalone("yes");
-    document.setDeclaration(::std::make_shared<ls::std::io::XmlDeclaration>(declaration));
+    document.setDeclaration(make_shared<XmlDeclaration>(declaration));
 
-    document.setRootElement(ls_std_io_test::TestDataFactory::createXmlContent());
-    ::std::string xmlStream = document.toXml();
+    document.setRootElement(TestDataFactory::createXmlContent());
+    string xmlStream = document.toXml();
 
     ASSERT_TRUE(!xmlStream.empty());
 
-    ::std::string expectedXmlString = R"(<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+    string expectedXmlString = R"(<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
 <dialog name="dungeon_001">
     <dialogUnit id="001">
         <text>Hello!</text>

Разница между файлами не показана из-за своего большого размера
+ 258 - 253
test/cases/io/xml/XmlNodeTest.cpp


+ 144 - 138
test/cases/io/xml/XmlParserTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-26
- * Changed:         2022-05-20
+ * Changed:         2022-11-09
  *
  * */
 
@@ -12,6 +12,12 @@
 #include <ls_std/ls_std_io.hpp>
 #include "TestHelper.hpp"
 
+using namespace ls::std::core;
+using namespace ls::std::core::type;
+using namespace ls::std::io;
+using namespace ::std;
+using namespace ls_std_test;
+
 namespace
 {
   class XmlParserTest : public ::testing::Test
@@ -21,11 +27,11 @@ namespace
       XmlParserTest() = default;
       ~XmlParserTest() override = default;
 
-      static ls::std::core::type::byte_field readXmlStateMachine()
+      static byte_field readXmlStateMachine()
       {
-        ::std::string xmlPath = ls_std_test::TestHelper::getResourcesFolderLocation() + "state_machine_test.xml";
-        ls::std::io::File file{xmlPath};
-        ls::std::core::type::byte_field data = ls::std::io::FileReader{file}.read();
+        string xmlPath = TestHelper::getResourcesFolderLocation() + "state_machine_test.xml";
+        File file{xmlPath};
+        byte_field data = FileReader{file}.read();
 
         return data;
       }
@@ -39,27 +45,27 @@ namespace
 
   TEST_F(XmlParserTest, constructor)
   {
-    ::std::shared_ptr<ls::std::io::XmlDocument> document{};
+    shared_ptr<XmlDocument> document{};
 
     EXPECT_THROW({
                    try
                    {
-                     ls::std::io::XmlParser xmlParser{document};
+                     XmlParser xmlParser{document};
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 
   TEST_F(XmlParserTest, read)
   {
-    ls::std::io::XmlParser xmlParser{::std::make_shared<ls::std::io::XmlDocument>()};
-    ::std::list<::std::shared_ptr<ls::std::io::XmlNode>> children, statesChildren, memoryChildren, connectionChildren{};
-    ::std::list<::std::shared_ptr<ls::std::io::XmlAttribute>> attributes{};
+    XmlParser xmlParser{make_shared<XmlDocument>()};
+    list<shared_ptr<XmlNode>> children, statesChildren, memoryChildren, connectionChildren{};
+    list<shared_ptr<XmlAttribute>> attributes{};
 
-    ls::std::core::type::byte_field data = readXmlStateMachine();
+    byte_field data = readXmlStateMachine();
     xmlParser.parse(data);
 
     // check declaration
@@ -70,7 +76,7 @@ namespace
 
     // check root element
 
-    ::std::shared_ptr<ls::std::io::XmlNode> root = xmlParser.getDocument()->getRootElement();
+    shared_ptr<XmlNode> root = xmlParser.getDocument()->getRootElement();
     ASSERT_STREQ("stateMachine", root->getName().c_str());
     ASSERT_STREQ("name", root->getAttributes().front()->getName().c_str());
     ASSERT_EQ(1, root->getAttributes().size());
@@ -80,180 +86,180 @@ namespace
 
     children = root->getChildren();
     ASSERT_EQ(3, children.size());
-    ASSERT_STREQ("states", ls::std::core::STLUtils::getListElementAt(children, 0)->getName().c_str());
-    ASSERT_TRUE(ls::std::core::STLUtils::getListElementAt(children, 0)->getAttributes().empty());
-    ASSERT_STREQ("currentState", ls::std::core::STLUtils::getListElementAt(children, 1)->getName().c_str());
-    ASSERT_TRUE(ls::std::core::STLUtils::getListElementAt(children, 1)->getAttributes().empty());
-    ASSERT_STREQ("memory", ls::std::core::STLUtils::getListElementAt(children, 2)->getName().c_str());
-    ASSERT_TRUE(ls::std::core::STLUtils::getListElementAt(children, 2)->getAttributes().empty());
+    ASSERT_STREQ("states", STLUtils::getListElementAt(children, 0)->getName().c_str());
+    ASSERT_TRUE(STLUtils::getListElementAt(children, 0)->getAttributes().empty());
+    ASSERT_STREQ("currentState", STLUtils::getListElementAt(children, 1)->getName().c_str());
+    ASSERT_TRUE(STLUtils::getListElementAt(children, 1)->getAttributes().empty());
+    ASSERT_STREQ("memory", STLUtils::getListElementAt(children, 2)->getName().c_str());
+    ASSERT_TRUE(STLUtils::getListElementAt(children, 2)->getAttributes().empty());
 
     // states
 
-    statesChildren = ls::std::core::STLUtils::getListElementAt(children, 0)->getChildren();
+    statesChildren = STLUtils::getListElementAt(children, 0)->getChildren();
     ASSERT_EQ(5, statesChildren.size());
 
-    ASSERT_STREQ("state", ls::std::core::STLUtils::getListElementAt(statesChildren, 0)->getName().c_str());
-    ASSERT_EQ(1, ls::std::core::STLUtils::getListElementAt(statesChildren, 0)->getAttributes().size());
-    ASSERT_STREQ("id", ls::std::core::STLUtils::getListElementAt(statesChildren, 0)->getAttributes().front()->getName().c_str());
-    ASSERT_STREQ("A", ls::std::core::STLUtils::getListElementAt(statesChildren, 0)->getAttributes().front()->getValue().c_str());
-    ASSERT_TRUE(ls::std::core::STLUtils::getListElementAt(statesChildren, 0)->getValue().empty());
-    ASSERT_EQ(1, ls::std::core::STLUtils::getListElementAt(statesChildren, 0)->getChildren().size());
-    ASSERT_STREQ("connections", ls::std::core::STLUtils::getListElementAt(statesChildren, 0)->getChildren().front()->getName().c_str());
-    ASSERT_TRUE(ls::std::core::STLUtils::getListElementAt(statesChildren, 0)->getChildren().front()->getValue().empty());
-    ASSERT_TRUE(ls::std::core::STLUtils::getListElementAt(statesChildren, 0)->getChildren().front()->getAttributes().empty());
-    connectionChildren = ls::std::core::STLUtils::getListElementAt(statesChildren, 0)->getChildren().front()->getChildren();
+    ASSERT_STREQ("state", STLUtils::getListElementAt(statesChildren, 0)->getName().c_str());
+    ASSERT_EQ(1, STLUtils::getListElementAt(statesChildren, 0)->getAttributes().size());
+    ASSERT_STREQ("id", STLUtils::getListElementAt(statesChildren, 0)->getAttributes().front()->getName().c_str());
+    ASSERT_STREQ("A", STLUtils::getListElementAt(statesChildren, 0)->getAttributes().front()->getValue().c_str());
+    ASSERT_TRUE(STLUtils::getListElementAt(statesChildren, 0)->getValue().empty());
+    ASSERT_EQ(1, STLUtils::getListElementAt(statesChildren, 0)->getChildren().size());
+    ASSERT_STREQ("connections", STLUtils::getListElementAt(statesChildren, 0)->getChildren().front()->getName().c_str());
+    ASSERT_TRUE(STLUtils::getListElementAt(statesChildren, 0)->getChildren().front()->getValue().empty());
+    ASSERT_TRUE(STLUtils::getListElementAt(statesChildren, 0)->getChildren().front()->getAttributes().empty());
+    connectionChildren = STLUtils::getListElementAt(statesChildren, 0)->getChildren().front()->getChildren();
     ASSERT_EQ(1, connectionChildren.size());
-    ASSERT_STREQ("connection", ls::std::core::STLUtils::getListElementAt(connectionChildren, 0)->getName().c_str());
-    ASSERT_TRUE(ls::std::core::STLUtils::getListElementAt(connectionChildren, 0)->getValue().empty());
-    attributes = ls::std::core::STLUtils::getListElementAt(connectionChildren, 0)->getAttributes();
+    ASSERT_STREQ("connection", STLUtils::getListElementAt(connectionChildren, 0)->getName().c_str());
+    ASSERT_TRUE(STLUtils::getListElementAt(connectionChildren, 0)->getValue().empty());
+    attributes = STLUtils::getListElementAt(connectionChildren, 0)->getAttributes();
     ASSERT_EQ(3, attributes.size());
-    ASSERT_STREQ("connectionId", ls::std::core::STLUtils::getListElementAt(attributes, 0)->getName().c_str());
-    ASSERT_STREQ("AB", ls::std::core::STLUtils::getListElementAt(attributes, 0)->getValue().c_str());
-    ASSERT_STREQ("condition", ls::std::core::STLUtils::getListElementAt(attributes, 1)->getName().c_str());
-    ASSERT_STREQ("false", ls::std::core::STLUtils::getListElementAt(attributes, 1)->getValue().c_str());
-    ASSERT_STREQ("id", ls::std::core::STLUtils::getListElementAt(attributes, 2)->getName().c_str());
-    ASSERT_STREQ("B", ls::std::core::STLUtils::getListElementAt(attributes, 2)->getValue().c_str());
-
-    ASSERT_STREQ("state", ls::std::core::STLUtils::getListElementAt(statesChildren, 1)->getName().c_str());
-    ASSERT_EQ(1, ls::std::core::STLUtils::getListElementAt(statesChildren, 1)->getAttributes().size());
-    ASSERT_STREQ("id", ls::std::core::STLUtils::getListElementAt(statesChildren, 1)->getAttributes().front()->getName().c_str());
-    ASSERT_STREQ("B", ls::std::core::STLUtils::getListElementAt(statesChildren, 1)->getAttributes().front()->getValue().c_str());
-    ASSERT_TRUE(ls::std::core::STLUtils::getListElementAt(statesChildren, 1)->getValue().empty());
-    ASSERT_EQ(1, ls::std::core::STLUtils::getListElementAt(statesChildren, 1)->getChildren().size());
-    ASSERT_STREQ("connections", ls::std::core::STLUtils::getListElementAt(statesChildren, 1)->getChildren().front()->getName().c_str());
-    ASSERT_TRUE(ls::std::core::STLUtils::getListElementAt(statesChildren, 1)->getChildren().front()->getValue().empty());
-    ASSERT_TRUE(ls::std::core::STLUtils::getListElementAt(statesChildren, 1)->getChildren().front()->getAttributes().empty());
-    connectionChildren = ls::std::core::STLUtils::getListElementAt(statesChildren, 1)->getChildren().front()->getChildren();
+    ASSERT_STREQ("connectionId", STLUtils::getListElementAt(attributes, 0)->getName().c_str());
+    ASSERT_STREQ("AB", STLUtils::getListElementAt(attributes, 0)->getValue().c_str());
+    ASSERT_STREQ("condition", STLUtils::getListElementAt(attributes, 1)->getName().c_str());
+    ASSERT_STREQ("false", STLUtils::getListElementAt(attributes, 1)->getValue().c_str());
+    ASSERT_STREQ("id", STLUtils::getListElementAt(attributes, 2)->getName().c_str());
+    ASSERT_STREQ("B", STLUtils::getListElementAt(attributes, 2)->getValue().c_str());
+
+    ASSERT_STREQ("state", STLUtils::getListElementAt(statesChildren, 1)->getName().c_str());
+    ASSERT_EQ(1, STLUtils::getListElementAt(statesChildren, 1)->getAttributes().size());
+    ASSERT_STREQ("id", STLUtils::getListElementAt(statesChildren, 1)->getAttributes().front()->getName().c_str());
+    ASSERT_STREQ("B", STLUtils::getListElementAt(statesChildren, 1)->getAttributes().front()->getValue().c_str());
+    ASSERT_TRUE(STLUtils::getListElementAt(statesChildren, 1)->getValue().empty());
+    ASSERT_EQ(1, STLUtils::getListElementAt(statesChildren, 1)->getChildren().size());
+    ASSERT_STREQ("connections", STLUtils::getListElementAt(statesChildren, 1)->getChildren().front()->getName().c_str());
+    ASSERT_TRUE(STLUtils::getListElementAt(statesChildren, 1)->getChildren().front()->getValue().empty());
+    ASSERT_TRUE(STLUtils::getListElementAt(statesChildren, 1)->getChildren().front()->getAttributes().empty());
+    connectionChildren = STLUtils::getListElementAt(statesChildren, 1)->getChildren().front()->getChildren();
     ASSERT_EQ(2, connectionChildren.size());
-    ASSERT_STREQ("connection", ls::std::core::STLUtils::getListElementAt(connectionChildren, 0)->getName().c_str());
-    ASSERT_TRUE(ls::std::core::STLUtils::getListElementAt(connectionChildren, 0)->getValue().empty());
-    attributes = ls::std::core::STLUtils::getListElementAt(connectionChildren, 0)->getAttributes();
+    ASSERT_STREQ("connection", STLUtils::getListElementAt(connectionChildren, 0)->getName().c_str());
+    ASSERT_TRUE(STLUtils::getListElementAt(connectionChildren, 0)->getValue().empty());
+    attributes = STLUtils::getListElementAt(connectionChildren, 0)->getAttributes();
     ASSERT_EQ(3, attributes.size());
-    ASSERT_STREQ("connectionId", ls::std::core::STLUtils::getListElementAt(attributes, 0)->getName().c_str());
-    ASSERT_STREQ("BC", ls::std::core::STLUtils::getListElementAt(attributes, 0)->getValue().c_str());
-    ASSERT_STREQ("condition", ls::std::core::STLUtils::getListElementAt(attributes, 1)->getName().c_str());
-    ASSERT_STREQ("false", ls::std::core::STLUtils::getListElementAt(attributes, 1)->getValue().c_str());
-    ASSERT_STREQ("id", ls::std::core::STLUtils::getListElementAt(attributes, 2)->getName().c_str());
-    ASSERT_STREQ("C", ls::std::core::STLUtils::getListElementAt(attributes, 2)->getValue().c_str());
-    ASSERT_STREQ("connection", ls::std::core::STLUtils::getListElementAt(connectionChildren, 1)->getName().c_str());
-    ASSERT_TRUE(ls::std::core::STLUtils::getListElementAt(connectionChildren, 1)->getValue().empty());
-    attributes = ls::std::core::STLUtils::getListElementAt(connectionChildren, 1)->getAttributes();
+    ASSERT_STREQ("connectionId", STLUtils::getListElementAt(attributes, 0)->getName().c_str());
+    ASSERT_STREQ("BC", STLUtils::getListElementAt(attributes, 0)->getValue().c_str());
+    ASSERT_STREQ("condition", STLUtils::getListElementAt(attributes, 1)->getName().c_str());
+    ASSERT_STREQ("false", STLUtils::getListElementAt(attributes, 1)->getValue().c_str());
+    ASSERT_STREQ("id", STLUtils::getListElementAt(attributes, 2)->getName().c_str());
+    ASSERT_STREQ("C", STLUtils::getListElementAt(attributes, 2)->getValue().c_str());
+    ASSERT_STREQ("connection", STLUtils::getListElementAt(connectionChildren, 1)->getName().c_str());
+    ASSERT_TRUE(STLUtils::getListElementAt(connectionChildren, 1)->getValue().empty());
+    attributes = STLUtils::getListElementAt(connectionChildren, 1)->getAttributes();
     ASSERT_EQ(3, attributes.size());
-    ASSERT_STREQ("connectionId", ls::std::core::STLUtils::getListElementAt(attributes, 0)->getName().c_str());
-    ASSERT_STREQ("BD", ls::std::core::STLUtils::getListElementAt(attributes, 0)->getValue().c_str());
-    ASSERT_STREQ("condition", ls::std::core::STLUtils::getListElementAt(attributes, 1)->getName().c_str());
-    ASSERT_STREQ("false", ls::std::core::STLUtils::getListElementAt(attributes, 1)->getValue().c_str());
-    ASSERT_STREQ("id", ls::std::core::STLUtils::getListElementAt(attributes, 2)->getName().c_str());
-    ASSERT_STREQ("D", ls::std::core::STLUtils::getListElementAt(attributes, 2)->getValue().c_str());
-
-    ASSERT_STREQ("state", ls::std::core::STLUtils::getListElementAt(statesChildren, 2)->getName().c_str());
-    ASSERT_EQ(1, ls::std::core::STLUtils::getListElementAt(statesChildren, 2)->getAttributes().size());
-    ASSERT_STREQ("id", ls::std::core::STLUtils::getListElementAt(statesChildren, 2)->getAttributes().front()->getName().c_str());
-    ASSERT_STREQ("C", ls::std::core::STLUtils::getListElementAt(statesChildren, 2)->getAttributes().front()->getValue().c_str());
-    ASSERT_TRUE(ls::std::core::STLUtils::getListElementAt(statesChildren, 2)->getValue().empty());
-    ASSERT_EQ(1, ls::std::core::STLUtils::getListElementAt(statesChildren, 2)->getChildren().size());
-    ASSERT_STREQ("connections", ls::std::core::STLUtils::getListElementAt(statesChildren, 2)->getChildren().front()->getName().c_str());
-    ASSERT_TRUE(ls::std::core::STLUtils::getListElementAt(statesChildren, 2)->getChildren().front()->getValue().empty());
-    ASSERT_TRUE(ls::std::core::STLUtils::getListElementAt(statesChildren, 2)->getChildren().front()->getAttributes().empty());
-    connectionChildren = ls::std::core::STLUtils::getListElementAt(statesChildren, 2)->getChildren().front()->getChildren();
+    ASSERT_STREQ("connectionId", STLUtils::getListElementAt(attributes, 0)->getName().c_str());
+    ASSERT_STREQ("BD", STLUtils::getListElementAt(attributes, 0)->getValue().c_str());
+    ASSERT_STREQ("condition", STLUtils::getListElementAt(attributes, 1)->getName().c_str());
+    ASSERT_STREQ("false", STLUtils::getListElementAt(attributes, 1)->getValue().c_str());
+    ASSERT_STREQ("id", STLUtils::getListElementAt(attributes, 2)->getName().c_str());
+    ASSERT_STREQ("D", STLUtils::getListElementAt(attributes, 2)->getValue().c_str());
+
+    ASSERT_STREQ("state", STLUtils::getListElementAt(statesChildren, 2)->getName().c_str());
+    ASSERT_EQ(1, STLUtils::getListElementAt(statesChildren, 2)->getAttributes().size());
+    ASSERT_STREQ("id", STLUtils::getListElementAt(statesChildren, 2)->getAttributes().front()->getName().c_str());
+    ASSERT_STREQ("C", STLUtils::getListElementAt(statesChildren, 2)->getAttributes().front()->getValue().c_str());
+    ASSERT_TRUE(STLUtils::getListElementAt(statesChildren, 2)->getValue().empty());
+    ASSERT_EQ(1, STLUtils::getListElementAt(statesChildren, 2)->getChildren().size());
+    ASSERT_STREQ("connections", STLUtils::getListElementAt(statesChildren, 2)->getChildren().front()->getName().c_str());
+    ASSERT_TRUE(STLUtils::getListElementAt(statesChildren, 2)->getChildren().front()->getValue().empty());
+    ASSERT_TRUE(STLUtils::getListElementAt(statesChildren, 2)->getChildren().front()->getAttributes().empty());
+    connectionChildren = STLUtils::getListElementAt(statesChildren, 2)->getChildren().front()->getChildren();
     ASSERT_EQ(1, connectionChildren.size());
-    ASSERT_STREQ("connection", ls::std::core::STLUtils::getListElementAt(connectionChildren, 0)->getName().c_str());
-    ASSERT_TRUE(ls::std::core::STLUtils::getListElementAt(connectionChildren, 0)->getValue().empty());
-    attributes = ls::std::core::STLUtils::getListElementAt(connectionChildren, 0)->getAttributes();
+    ASSERT_STREQ("connection", STLUtils::getListElementAt(connectionChildren, 0)->getName().c_str());
+    ASSERT_TRUE(STLUtils::getListElementAt(connectionChildren, 0)->getValue().empty());
+    attributes = STLUtils::getListElementAt(connectionChildren, 0)->getAttributes();
     ASSERT_EQ(3, attributes.size());
-    ASSERT_STREQ("connectionId", ls::std::core::STLUtils::getListElementAt(attributes, 0)->getName().c_str());
-    ASSERT_STREQ("CE", ls::std::core::STLUtils::getListElementAt(attributes, 0)->getValue().c_str());
-    ASSERT_STREQ("condition", ls::std::core::STLUtils::getListElementAt(attributes, 1)->getName().c_str());
-    ASSERT_STREQ("false", ls::std::core::STLUtils::getListElementAt(attributes, 1)->getValue().c_str());
-    ASSERT_STREQ("id", ls::std::core::STLUtils::getListElementAt(attributes, 2)->getName().c_str());
-    ASSERT_STREQ("E", ls::std::core::STLUtils::getListElementAt(attributes, 2)->getValue().c_str());
-
-    ASSERT_STREQ("state", ls::std::core::STLUtils::getListElementAt(statesChildren, 3)->getName().c_str());
-    ASSERT_EQ(1, ls::std::core::STLUtils::getListElementAt(statesChildren, 3)->getAttributes().size());
-    ASSERT_STREQ("id", ls::std::core::STLUtils::getListElementAt(statesChildren, 3)->getAttributes().front()->getName().c_str());
-    ASSERT_STREQ("D", ls::std::core::STLUtils::getListElementAt(statesChildren, 3)->getAttributes().front()->getValue().c_str());
-    ASSERT_TRUE(ls::std::core::STLUtils::getListElementAt(statesChildren, 3)->getChildren().front()->getAttributes().empty());
-    connectionChildren = ls::std::core::STLUtils::getListElementAt(statesChildren, 3)->getChildren().front()->getChildren();
+    ASSERT_STREQ("connectionId", STLUtils::getListElementAt(attributes, 0)->getName().c_str());
+    ASSERT_STREQ("CE", STLUtils::getListElementAt(attributes, 0)->getValue().c_str());
+    ASSERT_STREQ("condition", STLUtils::getListElementAt(attributes, 1)->getName().c_str());
+    ASSERT_STREQ("false", STLUtils::getListElementAt(attributes, 1)->getValue().c_str());
+    ASSERT_STREQ("id", STLUtils::getListElementAt(attributes, 2)->getName().c_str());
+    ASSERT_STREQ("E", STLUtils::getListElementAt(attributes, 2)->getValue().c_str());
+
+    ASSERT_STREQ("state", STLUtils::getListElementAt(statesChildren, 3)->getName().c_str());
+    ASSERT_EQ(1, STLUtils::getListElementAt(statesChildren, 3)->getAttributes().size());
+    ASSERT_STREQ("id", STLUtils::getListElementAt(statesChildren, 3)->getAttributes().front()->getName().c_str());
+    ASSERT_STREQ("D", STLUtils::getListElementAt(statesChildren, 3)->getAttributes().front()->getValue().c_str());
+    ASSERT_TRUE(STLUtils::getListElementAt(statesChildren, 3)->getChildren().front()->getAttributes().empty());
+    connectionChildren = STLUtils::getListElementAt(statesChildren, 3)->getChildren().front()->getChildren();
     ASSERT_EQ(1, connectionChildren.size());
-    ASSERT_STREQ("connection", ls::std::core::STLUtils::getListElementAt(connectionChildren, 0)->getName().c_str());
-    ASSERT_TRUE(ls::std::core::STLUtils::getListElementAt(connectionChildren, 0)->getValue().empty());
-    attributes = ls::std::core::STLUtils::getListElementAt(connectionChildren, 0)->getAttributes();
+    ASSERT_STREQ("connection", STLUtils::getListElementAt(connectionChildren, 0)->getName().c_str());
+    ASSERT_TRUE(STLUtils::getListElementAt(connectionChildren, 0)->getValue().empty());
+    attributes = STLUtils::getListElementAt(connectionChildren, 0)->getAttributes();
     ASSERT_EQ(3, attributes.size());
-    ASSERT_STREQ("connectionId", ls::std::core::STLUtils::getListElementAt(attributes, 0)->getName().c_str());
-    ASSERT_STREQ("DE", ls::std::core::STLUtils::getListElementAt(attributes, 0)->getValue().c_str());
-    ASSERT_STREQ("condition", ls::std::core::STLUtils::getListElementAt(attributes, 1)->getName().c_str());
-    ASSERT_STREQ("false", ls::std::core::STLUtils::getListElementAt(attributes, 1)->getValue().c_str());
-    ASSERT_STREQ("id", ls::std::core::STLUtils::getListElementAt(attributes, 2)->getName().c_str());
-    ASSERT_STREQ("E", ls::std::core::STLUtils::getListElementAt(attributes, 2)->getValue().c_str());
-
-    ASSERT_STREQ("state", ls::std::core::STLUtils::getListElementAt(statesChildren, 4)->getName().c_str());
-    ASSERT_EQ(1, ls::std::core::STLUtils::getListElementAt(statesChildren, 4)->getAttributes().size());
-    ASSERT_STREQ("id", ls::std::core::STLUtils::getListElementAt(statesChildren, 4)->getAttributes().front()->getName().c_str());
-    ASSERT_STREQ("E", ls::std::core::STLUtils::getListElementAt(statesChildren, 4)->getAttributes().front()->getValue().c_str());
-    ASSERT_TRUE(ls::std::core::STLUtils::getListElementAt(statesChildren, 4)->getChildren().empty());
+    ASSERT_STREQ("connectionId", STLUtils::getListElementAt(attributes, 0)->getName().c_str());
+    ASSERT_STREQ("DE", STLUtils::getListElementAt(attributes, 0)->getValue().c_str());
+    ASSERT_STREQ("condition", STLUtils::getListElementAt(attributes, 1)->getName().c_str());
+    ASSERT_STREQ("false", STLUtils::getListElementAt(attributes, 1)->getValue().c_str());
+    ASSERT_STREQ("id", STLUtils::getListElementAt(attributes, 2)->getName().c_str());
+    ASSERT_STREQ("E", STLUtils::getListElementAt(attributes, 2)->getValue().c_str());
+
+    ASSERT_STREQ("state", STLUtils::getListElementAt(statesChildren, 4)->getName().c_str());
+    ASSERT_EQ(1, STLUtils::getListElementAt(statesChildren, 4)->getAttributes().size());
+    ASSERT_STREQ("id", STLUtils::getListElementAt(statesChildren, 4)->getAttributes().front()->getName().c_str());
+    ASSERT_STREQ("E", STLUtils::getListElementAt(statesChildren, 4)->getAttributes().front()->getValue().c_str());
+    ASSERT_TRUE(STLUtils::getListElementAt(statesChildren, 4)->getChildren().empty());
 
     // current state
 
-    ASSERT_STREQ("currentState", ls::std::core::STLUtils::getListElementAt(children, 1)->getName().c_str());
-    ASSERT_STREQ("A", ls::std::core::STLUtils::getListElementAt(children, 1)->getValue().c_str());
-    ASSERT_TRUE(ls::std::core::STLUtils::getListElementAt(children, 1)->getChildren().empty());
-    ASSERT_TRUE(ls::std::core::STLUtils::getListElementAt(children, 1)->getAttributes().empty());
+    ASSERT_STREQ("currentState", STLUtils::getListElementAt(children, 1)->getName().c_str());
+    ASSERT_STREQ("A", STLUtils::getListElementAt(children, 1)->getValue().c_str());
+    ASSERT_TRUE(STLUtils::getListElementAt(children, 1)->getChildren().empty());
+    ASSERT_TRUE(STLUtils::getListElementAt(children, 1)->getAttributes().empty());
 
     // memory
 
-    memoryChildren = ls::std::core::STLUtils::getListElementAt(children, 2)->getChildren();
+    memoryChildren = STLUtils::getListElementAt(children, 2)->getChildren();
     ASSERT_EQ(3, memoryChildren.size());
 
-    ASSERT_STREQ("location", ls::std::core::STLUtils::getListElementAt(memoryChildren, 0)->getName().c_str());
-    ASSERT_STREQ("A", ls::std::core::STLUtils::getListElementAt(memoryChildren, 0)->getValue().c_str());
-    ASSERT_TRUE(ls::std::core::STLUtils::getListElementAt(memoryChildren, 0)->getChildren().empty());
-    ASSERT_TRUE(ls::std::core::STLUtils::getListElementAt(memoryChildren, 0)->getAttributes().empty());
+    ASSERT_STREQ("location", STLUtils::getListElementAt(memoryChildren, 0)->getName().c_str());
+    ASSERT_STREQ("A", STLUtils::getListElementAt(memoryChildren, 0)->getValue().c_str());
+    ASSERT_TRUE(STLUtils::getListElementAt(memoryChildren, 0)->getChildren().empty());
+    ASSERT_TRUE(STLUtils::getListElementAt(memoryChildren, 0)->getAttributes().empty());
 
-    ASSERT_STREQ("location", ls::std::core::STLUtils::getListElementAt(memoryChildren, 1)->getName().c_str());
-    ASSERT_STREQ("B", ls::std::core::STLUtils::getListElementAt(memoryChildren, 1)->getValue().c_str());
-    ASSERT_TRUE(ls::std::core::STLUtils::getListElementAt(memoryChildren, 1)->getChildren().empty());
-    ASSERT_TRUE(ls::std::core::STLUtils::getListElementAt(memoryChildren, 1)->getAttributes().empty());
+    ASSERT_STREQ("location", STLUtils::getListElementAt(memoryChildren, 1)->getName().c_str());
+    ASSERT_STREQ("B", STLUtils::getListElementAt(memoryChildren, 1)->getValue().c_str());
+    ASSERT_TRUE(STLUtils::getListElementAt(memoryChildren, 1)->getChildren().empty());
+    ASSERT_TRUE(STLUtils::getListElementAt(memoryChildren, 1)->getAttributes().empty());
 
-    ASSERT_STREQ("location", ls::std::core::STLUtils::getListElementAt(memoryChildren, 2)->getName().c_str());
-    ASSERT_STREQ("C", ls::std::core::STLUtils::getListElementAt(memoryChildren, 2)->getValue().c_str());
-    ASSERT_TRUE(ls::std::core::STLUtils::getListElementAt(memoryChildren, 2)->getChildren().empty());
-    ASSERT_TRUE(ls::std::core::STLUtils::getListElementAt(memoryChildren, 2)->getAttributes().empty());
+    ASSERT_STREQ("location", STLUtils::getListElementAt(memoryChildren, 2)->getName().c_str());
+    ASSERT_STREQ("C", STLUtils::getListElementAt(memoryChildren, 2)->getValue().c_str());
+    ASSERT_TRUE(STLUtils::getListElementAt(memoryChildren, 2)->getChildren().empty());
+    ASSERT_TRUE(STLUtils::getListElementAt(memoryChildren, 2)->getAttributes().empty());
   }
 
   TEST_F(XmlParserTest, getDocument)
   {
-    ::std::string xmlPath = ls_std_test::TestHelper::getResourcesFolderLocation() + "state_machine_test.xml";
-    ls::std::io::XmlParser xmlParser{::std::make_shared<ls::std::io::XmlDocument>()};
+    string xmlPath = TestHelper::getResourcesFolderLocation() + "state_machine_test.xml";
+    XmlParser xmlParser{make_shared<XmlDocument>()};
 
     ASSERT_TRUE(xmlParser.getDocument() != nullptr);
   }
 
   TEST_F(XmlParserTest, setDocument)
   {
-    ::std::string xmlPath = ls_std_test::TestHelper::getResourcesFolderLocation() + "state_machine_test.xml";
-    ::std::shared_ptr<ls::std::io::XmlDocument> document = ::std::make_shared<ls::std::io::XmlDocument>();
-    ls::std::io::XmlParser xmlParser{document};
+    string xmlPath = TestHelper::getResourcesFolderLocation() + "state_machine_test.xml";
+    shared_ptr<XmlDocument> document = make_shared<XmlDocument>();
+    XmlParser xmlParser{document};
     ASSERT_TRUE(xmlParser.getDocument() == document);
 
-    document = ::std::make_shared<ls::std::io::XmlDocument>();
+    document = make_shared<XmlDocument>();
     xmlParser.setDocument(document);
     ASSERT_TRUE(xmlParser.getDocument() == document);
   }
 
   TEST_F(XmlParserTest, setDocument_no_reference)
   {
-    ::std::shared_ptr<ls::std::io::XmlDocument> document = ::std::make_shared<ls::std::io::XmlDocument>();
-    ls::std::io::XmlParser xmlParser{document};
+    shared_ptr<XmlDocument> document = make_shared<XmlDocument>();
+    XmlParser xmlParser{document};
 
     EXPECT_THROW({
                    try
                    {
                      xmlParser.setDocument(nullptr);
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 }

+ 12 - 9
test/cases/io/xml/XmlParserTestWrapperTest.cpp

@@ -3,13 +3,16 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-10-18
- * Changed:         2021-05-20
+ * Changed:         2021-11-09
  *
  * */
 
 #include <gtest/gtest.h>
 #include <ls_std_io_test.hpp>
 
+using namespace ls_std_io_test;
+using namespace ::std;
+
 namespace
 {
   class XmlParserTestWrapperTest : public ::testing::Test
@@ -28,11 +31,11 @@ namespace
 
   TEST_F(XmlParserTestWrapperTest, readAttribute)
   {
-    ::std::pair<::std::string, ::std::string> attribute = ls_std_io_test::XmlParserTestWrapper::readAttribute(R"(name="tim")");
+    pair<string, string> attribute = XmlParserTestWrapper::readAttribute(R"(name="tim")");
     ASSERT_TRUE(attribute.first == "name");
     ASSERT_TRUE(attribute.second == "tim");
 
-    attribute = ls_std_io_test::XmlParserTestWrapper::readAttribute(R"(id="dialog_001")");
+    attribute = XmlParserTestWrapper::readAttribute(R"(id="dialog_001")");
     ASSERT_TRUE(attribute.first == "id");
     ASSERT_TRUE(attribute.second == "dialog_001");
   }
@@ -41,27 +44,27 @@ namespace
   {
     // first case
 
-    ::std::string tag = R"(<?xml version="1.0" encoding="UTF-8" ?>)";
-    ::std::list<::std::pair<::std::string, ::std::string>> attributes = ls_std_io_test::XmlParserTestWrapper::readAttributes(tag);
+    string tag = R"(<?xml version="1.0" encoding="UTF-8" ?>)";
+    list<pair<string, string>> attributes = XmlParserTestWrapper::readAttributes(tag);
 
     ASSERT_EQ(2, attributes.size());
 
-    auto iterator = ::std::next(attributes.begin(), 0);
+    auto iterator = next(attributes.begin(), 0);
     ASSERT_TRUE(iterator->first == "version");
     ASSERT_TRUE(iterator->second == "1.0");
 
-    iterator = ::std::next(attributes.begin(), 1);
+    iterator = next(attributes.begin(), 1);
     ASSERT_TRUE(iterator->first == "encoding");
     ASSERT_TRUE(iterator->second == "UTF-8");
 
     // second case
 
     tag = R"(<stateMachine name="test_machine">)";
-    attributes = ls_std_io_test::XmlParserTestWrapper::readAttributes(tag);
+    attributes = XmlParserTestWrapper::readAttributes(tag);
 
     ASSERT_EQ(1, attributes.size());
 
-    iterator = ::std::next(attributes.begin(), 0);
+    iterator = next(attributes.begin(), 0);
     ASSERT_TRUE(iterator->first == "name");
     ASSERT_TRUE(iterator->second == "test_machine");
   }

+ 28 - 23
test/cases/io/xml/XmlReaderTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-10-10
- * Changed:         2022-05-20
+ * Changed:         2022-11-09
  *
  * */
 
@@ -12,6 +12,11 @@
 #include <ls_std/ls_std_io.hpp>
 #include "TestHelper.hpp"
 
+using namespace ls::std::core;
+using namespace ls::std::io;
+using namespace ::std;
+using namespace ls_std_test;
+
 namespace
 {
   class XmlReaderTest : public ::testing::Test
@@ -30,55 +35,55 @@ namespace
 
   TEST_F(XmlReaderTest, read)
   {
-    ::std::string xmlPath = ls_std_test::TestHelper::getResourcesFolderLocation() + "state_machine_test.xml";
-    ls::std::io::XmlReader xmlReader{::std::make_shared<ls::std::io::XmlDocument>(), xmlPath};
+    string xmlPath = TestHelper::getResourcesFolderLocation() + "state_machine_test.xml";
+    XmlReader xmlReader{make_shared<XmlDocument>(), xmlPath};
 
     ASSERT_TRUE(!xmlReader.read().empty());
   }
 
   TEST_F(XmlReaderTest, getDocument)
   {
-    ::std::string xmlPath = ls_std_test::TestHelper::getResourcesFolderLocation() + "state_machine_test.xml";
-    ls::std::io::XmlReader xmlReader{::std::make_shared<ls::std::io::XmlDocument>(), xmlPath};
+    string xmlPath = TestHelper::getResourcesFolderLocation() + "state_machine_test.xml";
+    XmlReader xmlReader{make_shared<XmlDocument>(), xmlPath};
 
     ASSERT_TRUE(xmlReader.getDocument() != nullptr);
   }
 
   TEST_F(XmlReaderTest, setDocument)
   {
-    ::std::string xmlPath = ls_std_test::TestHelper::getResourcesFolderLocation() + "state_machine_test.xml";
-    ::std::shared_ptr<ls::std::io::XmlDocument> document = ::std::make_shared<ls::std::io::XmlDocument>();
-    ls::std::io::XmlReader xmlReader{document, xmlPath};
+    string xmlPath = TestHelper::getResourcesFolderLocation() + "state_machine_test.xml";
+    shared_ptr<XmlDocument> document = make_shared<XmlDocument>();
+    XmlReader xmlReader{document, xmlPath};
     ASSERT_TRUE(xmlReader.getDocument() == document);
 
-    document = ::std::make_shared<ls::std::io::XmlDocument>();
+    document = make_shared<XmlDocument>();
     xmlReader.setDocument(document);
     ASSERT_TRUE(xmlReader.getDocument() == document);
   }
 
   TEST_F(XmlReaderTest, setDocument_no_reference)
   {
-    ::std::string xmlPath = ls_std_test::TestHelper::getResourcesFolderLocation() + "state_machine_test.xml";
-    ::std::shared_ptr<ls::std::io::XmlDocument> document = ::std::make_shared<ls::std::io::XmlDocument>();
-    ls::std::io::XmlReader xmlReader{document, xmlPath};
+    string xmlPath = TestHelper::getResourcesFolderLocation() + "state_machine_test.xml";
+    shared_ptr<XmlDocument> document = make_shared<XmlDocument>();
+    XmlReader xmlReader{document, xmlPath};
 
     EXPECT_THROW({
                    try
                    {
                      xmlReader.setDocument(nullptr);
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 
   TEST_F(XmlReaderTest, setFile)
   {
-    ::std::string xmlPath = ls_std_test::TestHelper::getResourcesFolderLocation() + "state_machine_test.xml";
-    ls::std::io::XmlReader xmlReader{::std::make_shared<ls::std::io::XmlDocument>(), xmlPath};
-    ls::std::io::File xmlFile{xmlPath};
+    string xmlPath = TestHelper::getResourcesFolderLocation() + "state_machine_test.xml";
+    XmlReader xmlReader{make_shared<XmlDocument>(), xmlPath};
+    File xmlFile{xmlPath};
     xmlReader.setFile(xmlFile);
 
     ASSERT_TRUE(true);
@@ -86,19 +91,19 @@ namespace
 
   TEST_F(XmlReaderTest, setFile_does_not_exist)
   {
-    ::std::string xmlPath = ls_std_test::TestHelper::getResourcesFolderLocation() + "state_machine_test.xml";
-    ls::std::io::XmlReader xmlReader{::std::make_shared<ls::std::io::XmlDocument>(), xmlPath};
-    ls::std::io::File xmlFile{xmlPath};
+    string xmlPath = TestHelper::getResourcesFolderLocation() + "state_machine_test.xml";
+    XmlReader xmlReader{make_shared<XmlDocument>(), xmlPath};
+    File xmlFile{xmlPath};
 
     EXPECT_THROW({
                    try
                    {
-                     xmlReader.setFile(ls::std::io::File{""});
+                     xmlReader.setFile(File{""});
                    }
-                   catch (const ls::std::core::IllegalArgumentException &_exception)
+                   catch (const IllegalArgumentException &_exception)
                    {
                      throw;
                    }
-                 }, ls::std::core::IllegalArgumentException);
+                 }, IllegalArgumentException);
   }
 }

+ 5 - 3
test/cases/serialization/JsonTest.cpp

@@ -3,12 +3,14 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2022-07-15
+ * Changed:         2022-11-09
  *
  * */
 
 #include <gtest/gtest.h>
-#include <ls_std/core/types/Types.hpp>
+#include <ls_std/ls_std_core.hpp>
+
+using namespace ls::std::core::type;
 
 namespace
 {
@@ -28,7 +30,7 @@ namespace
 
   TEST_F(JsonTest, simpleSerialization)
   {
-    ls::std::core::type::json jsonObject{};
+    json jsonObject{};
     jsonObject["value"] = 1989;
 
     ASSERT_STREQ(R"({"value":1989})", jsonObject.dump().c_str());

+ 33 - 30
test/cases/time/DateTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2022-05-20
+ * Changed:         2022-11-09
  *
  * */
 
@@ -11,6 +11,9 @@
 #include <regex>
 #include <ls_std/ls_std_time.hpp>
 
+using namespace ls::std::time;
+using namespace ::std;
+
 namespace
 {
   class DateTest : public ::testing::Test
@@ -31,7 +34,7 @@ namespace
 
   TEST_F(DateTest, operator_add)
   {
-    ls::std::time::Date date{};
+    Date date{};
     time_t timestamp = date.getTime();
 
     date = date + 1;
@@ -40,7 +43,7 @@ namespace
 
   TEST_F(DateTest, operator_add_with_negative_value)
   {
-    ls::std::time::Date date{};
+    Date date{};
     time_t timestamp = date.getTime();
 
     date = date + (-1);
@@ -49,7 +52,7 @@ namespace
 
   TEST_F(DateTest, operator_subtraction)
   {
-    ls::std::time::Date date{};
+    Date date{};
     time_t timestamp = date.getTime();
 
     date = date - 1;
@@ -58,7 +61,7 @@ namespace
 
   TEST_F(DateTest, operator_subtraction_with_negative_value)
   {
-    ls::std::time::Date date{};
+    Date date{};
     time_t timestamp = date.getTime();
 
     date = date - (-1);
@@ -67,7 +70,7 @@ namespace
 
   TEST_F(DateTest, operator_plus_equals)
   {
-    ls::std::time::Date date{};
+    Date date{};
     time_t timestamp = date.getTime();
 
     date += 2;
@@ -77,7 +80,7 @@ namespace
 
   TEST_F(DateTest, operator_plus_equals_with_negative_value)
   {
-    ls::std::time::Date date{};
+    Date date{};
     time_t timestamp = date.getTime();
 
     date += -2;
@@ -87,7 +90,7 @@ namespace
 
   TEST_F(DateTest, operator_minus_equals)
   {
-    ls::std::time::Date date{};
+    Date date{};
     time_t timestamp = date.getTime();
 
     date -= 2;
@@ -97,7 +100,7 @@ namespace
 
   TEST_F(DateTest, operator_minus_equals_with_negative_value)
   {
-    ls::std::time::Date date{};
+    Date date{};
     time_t timestamp = date.getTime();
 
     date -= -2;
@@ -109,9 +112,9 @@ namespace
 
   TEST_F(DateTest, after)
   {
-    ls::std::time::Date date{}; // today
+    Date date{}; // today
 
-    ls::std::time::Date referenceDate{};
+    Date referenceDate{};
     referenceDate = referenceDate - 1; // yesterday
 
     ASSERT_TRUE(date.after(referenceDate));
@@ -119,8 +122,8 @@ namespace
 
   TEST_F(DateTest, after_is_before_refernce_date)
   {
-    ls::std::time::Date date{}; // is today
-    ls::std::time::Date referenceDate{};
+    Date date{}; // is today
+    Date referenceDate{};
 
     referenceDate = referenceDate + 1; // is tomorrow
 
@@ -129,18 +132,18 @@ namespace
 
   TEST_F(DateTest, before)
   {
-    ls::std::time::Date date{};
+    Date date{};
     date = date - 1; // yesterday
 
-    ls::std::time::Date referenceDate{}; // today
+    Date referenceDate{}; // today
 
     ASSERT_TRUE(date.before(referenceDate));
   }
 
   TEST_F(DateTest, before_is_after_reference_date)
   {
-    ls::std::time::Date date{}; // today
-    ls::std::time::Date referenceDate{};
+    Date date{}; // today
+    Date referenceDate{};
 
     referenceDate = referenceDate - 1; // yesterday
 
@@ -149,7 +152,7 @@ namespace
 
   TEST_F(DateTest, getDay)
   {
-    ls::std::time::Date date{};
+    Date date{};
     date.setTime(1597433693);
 
     ASSERT_EQ(14, date.getDay());
@@ -157,7 +160,7 @@ namespace
 
   TEST_F(DateTest, getHour)
   {
-    ls::std::time::Date date{};
+    Date date{};
     date.setTime(1597433693);
 
     ASSERT_EQ(21, date.getHour());
@@ -165,7 +168,7 @@ namespace
 
   TEST_F(DateTest, getMinute)
   {
-    ls::std::time::Date date{};
+    Date date{};
     date.setTime(1597433693);
 
     ASSERT_EQ(34, date.getMinute());
@@ -173,7 +176,7 @@ namespace
 
   TEST_F(DateTest, getMonth)
   {
-    ls::std::time::Date date{};
+    Date date{};
     date.setTime(1597433693);
 
     ASSERT_EQ(8, date.getMonth());
@@ -181,7 +184,7 @@ namespace
 
   TEST_F(DateTest, getSecond)
   {
-    ls::std::time::Date date{};
+    Date date{};
     date.setTime(1597433693);
 
     ASSERT_EQ(53, date.getSecond());
@@ -189,13 +192,13 @@ namespace
 
   TEST_F(DateTest, getTime)
   {
-    ls::std::time::Date date{};
+    Date date{};
     ASSERT_TRUE(date.getTime() > 0);
   }
 
   TEST_F(DateTest, getYear)
   {
-    ls::std::time::Date date{};
+    Date date{};
     date.setTime(1597433693);
 
     ASSERT_EQ(2020, date.getYear());
@@ -203,7 +206,7 @@ namespace
 
   TEST_F(DateTest, setTime)
   {
-    ls::std::time::Date date{};
+    Date date{};
     ASSERT_TRUE(date.getTime() > 1000000);
 
     date.setTime(1000);
@@ -212,11 +215,11 @@ namespace
 
   TEST_F(DateTest, toString)
   {
-    ls::std::time::Date date{};
-    ::std::string regexSearchString = R"((\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}))";
-    ::std::regex _regex{regexSearchString};
-    ::std::string dateString = date.toString();
+    Date date{};
+    string regexSearchString = R"((\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}))";
+    regex _regex{regexSearchString};
+    string dateString = date.toString();
 
-    ASSERT_TRUE(::std::regex_match(dateString, _regex));
+    ASSERT_TRUE(regex_match(dateString, _regex));
   }
 }

Некоторые файлы не были показаны из-за большого количества измененных файлов