void Admintest::test_addToMessage() { MapType data; m_account->addToMessage(data); ASSERT_NOT_EQUAL(data.find("character_types"), data.end()); ASSERT_EQUAL(data["character_types"], ListType()); }
void Admintest::test_addToMessage_tree() { Inheritance::instance().addChild(atlasClass("character", "root")); Inheritance::instance().addChild(atlasClass("human", "character")); Inheritance::instance().addChild(atlasClass("settler", "human")); Inheritance::instance().addChild(atlasClass("goblin", "character")); MapType data; m_account->addToMessage(data); ListType expected_character_types; expected_character_types.push_back("character"); expected_character_types.push_back("human"); expected_character_types.push_back("settler"); expected_character_types.push_back("goblin"); // FIXME How do we know this order is consistent ASSERT_NOT_EQUAL(data.find("character_types"), data.end()); ASSERT_EQUAL(data["character_types"], expected_character_types); }