当前位置: 首页>>代码示例>>C++>>正文


C++ Admin::createObject方法代码示例

本文整理汇总了C++中Admin::createObject方法的典型用法代码示例。如果您正苦于以下问题:C++ Admin::createObject方法的具体用法?C++ Admin::createObject怎么用?C++ Admin::createObject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Admin的用法示例。


在下文中一共展示了Admin::createObject方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: test_createObject_juncture_id_fail

void Admintest::test_createObject_juncture_id_fail()
{
    newId_fail = true;

    std::string parent("juncture");
    Root arg;
    Atlas::Objects::Operation::Create op;
    OpVector res;

    arg->setObjtype("obj");

    m_account->createObject(parent, arg, op, res);

    ASSERT_EQUAL(res.size(), 1u);
    ASSERT_EQUAL(res.front()->getClassNo(),
                 Atlas::Objects::Operation::ERROR_NO);
}
开发者ID:cyclefusion,项目名称:cyphesis,代码行数:17,代码来源:Admintest.cpp

示例2: test_createObject_fallthrough

void Admintest::test_createObject_fallthrough()
{
    Account_createObject_called = 0;

    std::string parent("unimportant_string");
    Root arg;
    Atlas::Objects::Operation::Create op;
    op->setSerialno(m_id_counter++);
    OpVector res;

    arg->setObjtype("obj");

    m_account->createObject(parent, arg, op, res);

    ASSERT_EQUAL(res.size(), 0u);

    ASSERT_EQUAL(Account_createObject_called,
                 m_account);
}
开发者ID:cyclefusion,项目名称:cyphesis,代码行数:19,代码来源:Admintest.cpp

示例3: test_createObject_juncture_serialno

void Admintest::test_createObject_juncture_serialno()
{
    newId_fail = false;

    std::string parent("juncture");
    Root arg;
    Atlas::Objects::Operation::Create op;
    op->setSerialno(m_id_counter++);
    OpVector res;

    arg->setObjtype("obj");

    m_account->createObject(parent, arg, op, res);

    ASSERT_EQUAL(res.size(), 1u);
    ASSERT_EQUAL(res.front()->getClassNo(),
                 Atlas::Objects::Operation::INFO_NO);
    ASSERT_TRUE(!res.front()->isDefaultRefno());
}
开发者ID:cyclefusion,项目名称:cyphesis,代码行数:19,代码来源:Admintest.cpp

示例4: test_createObject_class_no_id

void Admintest::test_createObject_class_no_id()
{
    Ruleset_installRule_called = false;
    Ruleset_installRule_retval = -1;

    std::string parent("root");
    Root arg;
    Atlas::Objects::Operation::Create op;
    OpVector res;

    arg->setObjtype("class");

    m_account->createObject(parent, arg, op, res);

    ASSERT_EQUAL(res.size(), 1u);
    ASSERT_EQUAL(res.front()->getClassNo(),
                 Atlas::Objects::Operation::ERROR_NO);

    ASSERT_TRUE(!Ruleset_installRule_called);
}
开发者ID:cyclefusion,项目名称:cyphesis,代码行数:20,代码来源:Admintest.cpp

示例5: test_createObject_class_exists

void Admintest::test_createObject_class_exists()
{
    Ruleset_installRule_called = false;
    Ruleset_installRule_retval = -1;

    Inheritance::instance().addChild(atlasClass("character", "root"));

    std::string parent("root");
    Root arg;
    Atlas::Objects::Operation::Create op;
    OpVector res;

    arg->setObjtype("class");
    arg->setId("character");

    m_account->createObject(parent, arg, op, res);

    ASSERT_EQUAL(res.size(), 1u);
    ASSERT_EQUAL(res.front()->getClassNo(),
                 Atlas::Objects::Operation::ERROR_NO);

    ASSERT_TRUE(!Ruleset_installRule_called);
}
开发者ID:cyclefusion,项目名称:cyphesis,代码行数:23,代码来源:Admintest.cpp


注:本文中的Admin::createObject方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。