Parcourir la source

Rename STLUtils class

Patrick-Christopher Mattulat il y a 2 ans
Parent
commit
546eb3e24c

+ 1 - 1
CMakeLists.txt

@@ -208,7 +208,7 @@ if (${LS_STD_BUILD_WITH_TESTS})
             ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/exception/IncompleteJsonExceptionTest.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/exception/NullPointerExceptionTest.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/utils/RegexUtilsTest.cpp
-            ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/utils/STLUtilsTest.cpp
+            ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/utils/StlUtilsTest.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/ClassTest.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/LibraryVersionTest.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/VersionTest.cpp)

+ 3 - 3
include/ls-std/core/utils/STLUtils.hpp → include/ls-std/core/utils/StlUtils.hpp

@@ -15,12 +15,12 @@
 
 namespace ls::std::core
 {
-  class STLUtils
+  class StlUtils
   {
     public:
 
-      STLUtils() = default;
-      ~STLUtils() = default;
+      StlUtils() = default;
+      ~StlUtils() = default;
 
       template<class container, class dataType>
       static bool contains(container _container, const dataType &_value)

+ 1 - 1
include/ls-std/ls-std-core.hpp

@@ -33,7 +33,7 @@
 #include <ls-std/core/types/Types.hpp>
 
 #include <ls-std/core/utils/RegexUtils.hpp>
-#include <ls-std/core/utils/STLUtils.hpp>
+#include <ls-std/core/utils/StlUtils.hpp>
 #if _WIN32
 #include <ls-std/core/utils/WindowsUtils.hpp>
 #endif

+ 3 - 3
source/ls-std/event/Narrator.cpp

@@ -7,7 +7,7 @@
  *
  * */
 
-#include <ls-std/core/utils/STLUtils.hpp>
+#include <ls-std/core/utils/StlUtils.hpp>
 #include <ls-std/event/Narrator.hpp>
 #include <ls-std/core/exception/IllegalArgumentException.hpp>
 
@@ -24,7 +24,7 @@ bool ls::std::event::Narrator::addListener(const ::std::shared_ptr<ls::std::core
   }
   else
   {
-    if (!ls::std::core::STLUtils::contains(this->listeners, _listener))
+    if (!ls::std::core::StlUtils::contains(this->listeners, _listener))
     {
       this->listeners.push_back(_listener);
       wasAdded = true;
@@ -54,7 +54,7 @@ bool ls::std::event::Narrator::removeListener(const ::std::shared_ptr<ls::std::c
   }
   else
   {
-    if (ls::std::core::STLUtils::contains(this->listeners, _listener))
+    if (ls::std::core::StlUtils::contains(this->listeners, _listener))
     {
       this->listeners.remove(_listener);
       wasRemoved = true;

+ 2 - 2
source/ls-std/io/xml/XmlNode.cpp

@@ -8,7 +8,7 @@
  * */
 
 #include <ls-std/io/xml/XmlNode.hpp>
-#include <ls-std/core/utils/STLUtils.hpp>
+#include <ls-std/core/utils/StlUtils.hpp>
 #include <ls-std/core/exception/IllegalArgumentException.hpp>
 
 ls::std::io::XmlNode::XmlNode(::std::string _name)
@@ -390,7 +390,7 @@ bool ls::std::io::XmlNode::_hasAttribute(const ::std::string &_name)
 bool ls::std::io::XmlNode::_hasChild(const ::std::shared_ptr<ls::std::io::XmlNode> &_child)
 {
   _checkIfNodeReferenceIsValid(_child);
-  return ls::std::core::STLUtils::contains(this->children, _child);
+  return ls::std::core::StlUtils::contains(this->children, _child);
 }
 
 bool ls::std::io::XmlNode::_hasChild(const ::std::string &_name)

+ 0 - 85
test/cases/core/utils/STLUtilsTest.cpp

@@ -1,85 +0,0 @@
-/*
- * Author:          Patrick-Christopher Mattulat
- * Company:         Lynar Studios
- * E-Mail:          webmaster@lynarstudios.com
- * Created:         2020-08-17
- * Changed:         2023-02-03
- *
- * */
-
-#include <gtest/gtest.h>
-#include <ls-std/ls-std-core.hpp>
-#include <vector>
-#include <list>
-#include <string>
-
-using namespace ls::std::core;
-using namespace ::std;
-
-namespace
-{
-  class STLUtilsTest : public ::testing::Test
-  {
-    protected:
-
-      STLUtilsTest() = default;
-      ~STLUtilsTest() override = default;
-
-      void SetUp() override
-      {}
-
-      void TearDown() override
-      {}
-  };
-
-  TEST_F(STLUtilsTest, contains)
-  {
-    vector<int> values{1, 13, 7, 8};
-    list<string> names{"Tim", "Alex", "Nadine"};
-
-    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((STLUtils::contains(names, "Tim")));
-    ASSERT_TRUE((STLUtils::contains(names, "Alex")));
-    ASSERT_TRUE((STLUtils::contains(names, "Nadine")));
-  }
-
-  TEST_F(STLUtilsTest, containsNegative)
-  {
-    vector<int> values{1, 13, 7, 8};
-    list<string> names{"Tim", "Alex", "Nadine"};
-
-    ASSERT_FALSE((STLUtils::contains(values, 55)));
-    ASSERT_FALSE((STLUtils::contains(values, 9)));
-
-    ASSERT_FALSE((STLUtils::contains(names, "Lena")));
-    ASSERT_FALSE((STLUtils::contains(names, "Mirco")));
-  }
-
-  TEST_F(STLUtilsTest, getListElementAt)
-  {
-    list<int> values{1, 13, 7, 8};
-    list<string> names{"Tim", "Alex", "Nadine"};
-
-    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", 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)
-  {
-    list<int> values{1, 13, 7, 8};
-    list<string> names{"Tim", "Alex", "Nadine"};
-
-    ASSERT_EQ(0, (STLUtils::getListElementAt(values, 15)));
-    ASSERT_STREQ("", STLUtils::getListElementAt(names, 15).c_str());
-  }
-}

+ 85 - 0
test/cases/core/utils/StlUtilsTest.cpp

@@ -0,0 +1,85 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2020-08-17
+ * Changed:         2023-02-03
+ *
+ * */
+
+#include <gtest/gtest.h>
+#include <ls-std/ls-std-core.hpp>
+#include <vector>
+#include <list>
+#include <string>
+
+using namespace ls::std::core;
+using namespace ::std;
+
+namespace
+{
+  class StlUtilsTest : public ::testing::Test
+  {
+    protected:
+
+      StlUtilsTest() = default;
+      ~StlUtilsTest() override = default;
+
+      void SetUp() override
+      {}
+
+      void TearDown() override
+      {}
+  };
+
+  TEST_F(StlUtilsTest, contains)
+  {
+    vector<int> values{1, 13, 7, 8};
+    list<string> names{"Tim", "Alex", "Nadine"};
+
+    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((StlUtils::contains(names, "Tim")));
+    ASSERT_TRUE((StlUtils::contains(names, "Alex")));
+    ASSERT_TRUE((StlUtils::contains(names, "Nadine")));
+  }
+
+  TEST_F(StlUtilsTest, containsNegative)
+  {
+    vector<int> values{1, 13, 7, 8};
+    list<string> names{"Tim", "Alex", "Nadine"};
+
+    ASSERT_FALSE((StlUtils::contains(values, 55)));
+    ASSERT_FALSE((StlUtils::contains(values, 9)));
+
+    ASSERT_FALSE((StlUtils::contains(names, "Lena")));
+    ASSERT_FALSE((StlUtils::contains(names, "Mirco")));
+  }
+
+  TEST_F(StlUtilsTest, getListElementAt)
+  {
+    list<int> values{1, 13, 7, 8};
+    list<string> names{"Tim", "Alex", "Nadine"};
+
+    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", 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)
+  {
+    list<int> values{1, 13, 7, 8};
+    list<string> names{"Tim", "Alex", "Nadine"};
+
+    ASSERT_EQ(0, (StlUtils::getListElementAt(values, 15)));
+    ASSERT_STREQ("", StlUtils::getListElementAt(names, 15).c_str());
+  }
+}

+ 11 - 11
test/cases/io/FileTest.cpp

@@ -255,19 +255,19 @@ namespace
     ASSERT_EQ(7, filesInDirectory.size());
 
     expectedFile = file.getAbsoluteFilePath() + separator + ".";
-    ASSERT_TRUE((STLUtils::contains(filesInDirectory, expectedFile)));
+    ASSERT_TRUE((StlUtils::contains(filesInDirectory, expectedFile)));
     expectedFile = file.getAbsoluteFilePath() + separator + "..";
-    ASSERT_TRUE((STLUtils::contains(filesInDirectory, expectedFile)));
+    ASSERT_TRUE((StlUtils::contains(filesInDirectory, expectedFile)));
     expectedFile = file.getAbsoluteFilePath() + separator + "another-file.txt";
-    ASSERT_TRUE((STLUtils::contains(filesInDirectory, expectedFile)));
+    ASSERT_TRUE((StlUtils::contains(filesInDirectory, expectedFile)));
     expectedFile = file.getAbsoluteFilePath() + separator + "bla.txt";
-    ASSERT_TRUE((STLUtils::contains(filesInDirectory, expectedFile)));
+    ASSERT_TRUE((StlUtils::contains(filesInDirectory, expectedFile)));
     expectedFile = file.getAbsoluteFilePath() + separator + "hello.txt";
-    ASSERT_TRUE((STLUtils::contains(filesInDirectory, expectedFile)));
+    ASSERT_TRUE((StlUtils::contains(filesInDirectory, expectedFile)));
     expectedFile = file.getAbsoluteFilePath() + separator + "list-test-sub";
-    ASSERT_TRUE((STLUtils::contains(filesInDirectory, expectedFile)));
+    ASSERT_TRUE((StlUtils::contains(filesInDirectory, expectedFile)));
     expectedFile = file.getAbsoluteFilePath() + separator + ".hidden-file.txt";
-    ASSERT_TRUE((STLUtils::contains(filesInDirectory, expectedFile)));
+    ASSERT_TRUE((StlUtils::contains(filesInDirectory, expectedFile)));
   }
 
   TEST_F(FileTest, listFiles)
@@ -281,13 +281,13 @@ namespace
     ASSERT_EQ(4, filesInDirectory.size());
 
     expectedFile = file.getAbsoluteFilePath() + separator + "another-file.txt";
-    ASSERT_TRUE((STLUtils::contains(filesInDirectory, expectedFile)));
+    ASSERT_TRUE((StlUtils::contains(filesInDirectory, expectedFile)));
     expectedFile = file.getAbsoluteFilePath() + separator + "bla.txt";
-    ASSERT_TRUE((STLUtils::contains(filesInDirectory, expectedFile)));
+    ASSERT_TRUE((StlUtils::contains(filesInDirectory, expectedFile)));
     expectedFile = file.getAbsoluteFilePath() + separator + "hello.txt";
-    ASSERT_TRUE((STLUtils::contains(filesInDirectory, expectedFile)));
+    ASSERT_TRUE((StlUtils::contains(filesInDirectory, expectedFile)));
     expectedFile = file.getAbsoluteFilePath() + separator + ".hidden-file.txt";
-    ASSERT_TRUE((STLUtils::contains(filesInDirectory, expectedFile)));
+    ASSERT_TRUE((StlUtils::contains(filesInDirectory, expectedFile)));
   }
 
   TEST_F(FileTest, makeDirectory)

+ 114 - 114
test/cases/io/xml/XmlParserTest.cpp

@@ -86,144 +86,144 @@ namespace
 
     children = root->getChildren();
     ASSERT_EQ(3, children.size());
-    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());
+    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 = STLUtils::getListElementAt(children, 0)->getChildren();
+    statesChildren = StlUtils::getListElementAt(children, 0)->getChildren();
     ASSERT_EQ(5, statesChildren.size());
 
-    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_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", STLUtils::getListElementAt(connectionChildren, 0)->getName().c_str());
-    ASSERT_TRUE(STLUtils::getListElementAt(connectionChildren, 0)->getValue().empty());
-    attributes = 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", 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_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", STLUtils::getListElementAt(connectionChildren, 0)->getName().c_str());
-    ASSERT_TRUE(STLUtils::getListElementAt(connectionChildren, 0)->getValue().empty());
-    attributes = 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", 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_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", 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_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", STLUtils::getListElementAt(connectionChildren, 0)->getName().c_str());
-    ASSERT_TRUE(STLUtils::getListElementAt(connectionChildren, 0)->getValue().empty());
-    attributes = 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", 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_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", STLUtils::getListElementAt(connectionChildren, 0)->getName().c_str());
-    ASSERT_TRUE(STLUtils::getListElementAt(connectionChildren, 0)->getValue().empty());
-    attributes = 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", 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());
+    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", 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());
+    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 = STLUtils::getListElementAt(children, 2)->getChildren();
+    memoryChildren = StlUtils::getListElementAt(children, 2)->getChildren();
     ASSERT_EQ(3, memoryChildren.size());
 
-    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", 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", 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", 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", 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());
+    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)