void Admintest::test_characterError_valid() { Operation op; Root ent; OpVector res; ent->setParents(std::list<std::string>(1, "settler")); int ret = m_account->characterError(op, ent, res); ASSERT_EQUAL(ret, 0); ASSERT_EQUAL(res.size(), 0u); }
void Admintest::test_characterError_default_parents() { Operation op; Root ent; OpVector res; int ret = m_account->characterError(op, ent, res); ASSERT_NOT_EQUAL(ret, 0); ASSERT_EQUAL(res.size(), 1u); ASSERT_EQUAL(res.front()->getClassNo(), Atlas::Objects::Operation::ERROR_NO); }
void Admintest::test_characterError_empty_parents() { Operation op; Root ent; OpVector res; ent->setParents(std::list<std::string>()); int ret = m_account->characterError(op, ent, res); ASSERT_NOT_EQUAL(ret, 0); ASSERT_EQUAL(res.size(), 1u); ASSERT_EQUAL(res.front()->getClassNo(), Atlas::Objects::Operation::ERROR_NO); }