本文整理汇总了C++中Fixture::addExperimenter方法的典型用法代码示例。如果您正苦于以下问题:C++ Fixture::addExperimenter方法的具体用法?C++ Fixture::addExperimenter怎么用?C++ Fixture::addExperimenter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fixture
的用法示例。
在下文中一共展示了Fixture::addExperimenter方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ImageI
TEST(ChgrpTest, testSimpleChgrp ) {
Fixture f;
ExperimenterGroupPtr g1 = f.newGroup();
ExperimenterGroupPtr g2 = f.newGroup();
ExperimenterPtr user = f.newUser(g1);
f.addExperimenter(g2, user);
client_ptr c = f.login(user->getOmeName()->getValue());
ServiceFactoryPrx sf = c->getSession();
IAdminPrx admin = sf->getAdminService();
ASSERT_EQ(g1->getId()->getValue(), admin->getEventContext()->groupId);
IQueryPrx iquery = sf->getQueryService();
IUpdatePrx iupdate = sf->getUpdateService();
ImagePtr image = new ImageI();
image->setName( rstring("testSimpleChgrp") );
image->setAcquisitionDate( rtime(0) );
image = ImagePtr::dynamicCast( iupdate->saveAndReturnObject( image ) );
std::map<string, string> options;
ChgrpPtr chgrp = new Chgrp();
chgrp->type = "/Image";
chgrp->id = image->getId()->getValue();
chgrp->grp = g2->getId()->getValue();
chgrp->options = options;
HandlePrx handle = sf->submit( chgrp );
CmdCallbackIPtr cb = new CmdCallbackI(c, handle);
ResponsePtr rsp = cb->loop(10, 500);
ERRPtr err = ERRPtr::dynamicCast(rsp);
if (err) {
FAIL() << "ERR returned";
}
}