本文整理汇总了C++中Admin::LogoutOperation方法的典型用法代码示例。如果您正苦于以下问题:C++ Admin::LogoutOperation方法的具体用法?C++ Admin::LogoutOperation怎么用?C++ Admin::LogoutOperation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Admin
的用法示例。
在下文中一共展示了Admin::LogoutOperation方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: test_LogoutOperation_other_but_unconnected
void Admintest::test_LogoutOperation_other_but_unconnected()
{
Account_LogoutOperation_called = 0;
m_account->m_connection = 0;
long cid = m_id_counter++;
std::string cid_str = String::compose("%1", cid);
Account * ac2 = new Admin(0,
"f3332c00-5d2b-45c1-8cf4-3429bdf2845f",
"c0e095f0-575c-477c-bafd-2055d6958d4d",
cid_str, cid);
m_server->addObject(ac2);
ASSERT_EQUAL(m_server->getObject(cid_str), ac2);
Atlas::Objects::Operation::Logout op;
OpVector res;
Anonymous arg;
arg->setId(cid_str);
op->setArgs1(arg);
m_account->LogoutOperation(op, res);
ASSERT_EQUAL(res.size(), 1u);
ASSERT_EQUAL(res.front()->getClassNo(),
Atlas::Objects::Operation::ERROR_NO);
ASSERT_NULL(Account_LogoutOperation_called);
delete ac2;
}
示例2: test_LogoutOperation_no_args
void Admintest::test_LogoutOperation_no_args()
{
Account_LogoutOperation_called = 0;
Operation op;
OpVector res;
m_account->LogoutOperation(op, res);
ASSERT_EQUAL(res.size(), 0u);
ASSERT_EQUAL(Account_LogoutOperation_called, m_account);
}
示例3: test_LogoutOperation_no_id
void Admintest::test_LogoutOperation_no_id()
{
Operation op;
OpVector res;
Anonymous arg;
op->setArgs1(arg);
m_account->LogoutOperation(op, res);
ASSERT_EQUAL(res.size(), 1u);
ASSERT_EQUAL(res.front()->getClassNo(),
Atlas::Objects::Operation::ERROR_NO);
}
示例4: test_LogoutOperation_unknown
void Admintest::test_LogoutOperation_unknown()
{
long cid = m_id_counter++;
Operation op;
OpVector res;
Anonymous arg;
arg->setId(String::compose("%1", cid));
op->setArgs1(arg);
m_account->LogoutOperation(op, res);
ASSERT_EQUAL(res.size(), 1u);
ASSERT_EQUAL(res.front()->getClassNo(),
Atlas::Objects::Operation::ERROR_NO);
}
示例5: test_LogoutOperation_self
void Admintest::test_LogoutOperation_self()
{
Account_LogoutOperation_called = 0;
Operation op;
OpVector res;
Anonymous arg;
arg->setId(m_account->getId());
op->setArgs1(arg);
m_account->LogoutOperation(op, res);
ASSERT_EQUAL(res.size(), 0u);
ASSERT_EQUAL(Account_LogoutOperation_called, m_account);
}