void TearDown()
 {
     TestWithMock::TearDown();
     pResource.reset();
     id = 0;
     cb = nullptr;
 }
 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);
 }
 virtual void TearDown()
 {
     pResource.reset();
     TestWithMock::TearDown();
 }
Beispiel #5
0
 virtual void TearDown()
 {
     cacheHandler.reset();
     pResource.reset();
     TestWithMock::TearDown();
 }