|
@@ -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)
|