本文整理汇总了C++中MockRepository::NeverCall方法的典型用法代码示例。如果您正苦于以下问题:C++ MockRepository::NeverCall方法的具体用法?C++ MockRepository::NeverCall怎么用?C++ MockRepository::NeverCall使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MockRepository
的用法示例。
在下文中一共展示了MockRepository::NeverCall方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: oSyncEngine
TEST(SyncEngine, notifications)
{
MockRepository mocks;
IRhoClassFactory* factory = mocks.InterfaceMock<IRhoClassFactory>();
INetRequest* net = mocks.InterfaceMock<INetRequest>();
mocks.ExpectCall(factory, IRhoClassFactory::createNetRequest).Return(net);
mocks.ExpectCall(net, INetRequest::resolveUrl).With("url1").Return("http://localhost/url1");
mocks.ExpectCall(net, INetRequest::pushData).With("http://localhost/url1","status=ok¶ms1").Return(true);
mocks.NeverCall(net, INetRequest::resolveUrl);
mocks.NeverCall(net, INetRequest::pushData);
CDBAdapter db;
CSyncEngine oSyncEngine(db);
oSyncEngine.setFactory(factory);
oSyncEngine.setNotification(1,"url1","params1");
oSyncEngine.fireNotification(1,1);
oSyncEngine.fireNotification(1,1);
}
示例2: vmm
void
vmm_ut::test_execute_vmxoff_already_off()
{
MockRepository mocks;
intrinsics_intel_x64 *intrinsics = mocks.Mock<intrinsics_intel_x64>();
vmm_intel_x64 vmm(intrinsics);
mocks.NeverCall(intrinsics, intrinsics_intel_x64::vmxoff);
RUN_UNITTEST_WITH_MOCKS(mocks, [&]
{
EXPECT_TRUE(vmm.execute_vmxoff() == vmm_error::success);
});
}