예제 #1
0
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);
}
예제 #2
0
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);
}
예제 #3
0
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);
}