void TearDown()
 {
     TestWithMock::TearDown();
     pResource.reset();
     id = 0;
     cb = nullptr;
 }
Exemplo n.º 2
0
 virtual void SetUp()
 {
     TestWithMock::SetUp();
     cacheInstance = ResourceCacheManager::getInstance();
     pResource = PrimitiveResource::Ptr(mocks.Mock< PrimitiveResource >(), [](PrimitiveResource *) {});
     mocks.OnCall(pResource.get(), PrimitiveResource::isObservable).Return(false);
     cb = ([](std::shared_ptr<PrimitiveResource >, const RCSResourceAttributes &)->OCStackResult {return OC_STACK_OK;});
 }
 void MockingFunc()
 {
     mocks.OnCall(pResource.get(), PrimitiveResource::getHost).Return(std::string());
     mocks.OnCallFuncOverload(static_cast< subscribePresenceSig1 >(OC::OCPlatform::subscribePresence)).Return(OC_STACK_OK);
 }
Exemplo n.º 4
0
 virtual void TearDown()
 {
     pResource.reset();
     TestWithMock::TearDown();
 }
Exemplo n.º 5
0
 virtual void TearDown()
 {
     cacheHandler.reset();
     pResource.reset();
     TestWithMock::TearDown();
 }