/* * Author: Patrick-Christopher Mattulat * Company: Lynar Studios * E-Mail: webmaster@lynarstudios.com * Created: 2022-05-14 * Changed: 2022-05-14 * * */ #include "TestDataFactory.hpp" std::shared_ptr ls_std_io_test::TestDataFactory::createXmlContent() { std::shared_ptr root = std::make_shared("dialog"); std::shared_ptr attribute{}; std::shared_ptr child{}; std::shared_ptr text{}; attribute = std::make_shared("name"); attribute->setValue("dungeon_001"); root->addAttributeToEnd(attribute); child = std::make_shared("dialogUnit"); attribute = std::make_shared("id"); attribute->setValue("001"); child->addAttributeToEnd(attribute); text = std::make_shared("text"); text->setValue("Hello!"); child->addChildToEnd(text); root->addChildToEnd(child); child = std::make_shared("dialogUnit"); attribute = std::make_shared("id"); attribute->setValue("002"); child->addAttributeToEnd(attribute); text = std::make_shared("text"); text->setValue("Hello again!"); child->addChildToEnd(text); root->addChildToEnd(child); return root; }