Skip to content

Commit 26e86e6

Browse files
committed
AVInput COM-RPC Support: WIP
1 parent a92da4a commit 26e86e6

File tree

1 file changed

+8
-23
lines changed

1 file changed

+8
-23
lines changed

Tests/L1Tests/tests/test_AVInput.cpp

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ using ::testing::NiceMock;
4242
class AVInputTest : public ::testing::Test {
4343
protected:
4444
Core::ProxyType<Plugin::AVInput> plugin;
45-
// <pca> debug
45+
// <pca>
4646
//IarmBusImplMock* p_iarmBusImplMock = nullptr;
47+
PLUGINHOST_DISPATCHER* dispatcher;
4748
// </pca>
4849
Core::ProxyType<Plugin::AVInputImplementation> AVInputImpl;
4950
Core::ProxyType<WorkerPoolImplementation> workerPool;
@@ -79,7 +80,9 @@ class AVInputTest : public ::testing::Test {
7980
Wraps::setImpl(p_wrapsImplMock);
8081

8182
// <pca>
82-
plugin->QueryInterface(PLUGINHOST_DISPATCHER_ID);
83+
dispatcher = static_cast<PLUGINHOST_DISPATCHER*>(
84+
plugin->QueryInterface(PLUGINHOST_DISPATCHER_ID));
85+
dispatcher->Activate(&service);
8386
// </pca>
8487

8588
// <pca>
@@ -169,13 +172,8 @@ class AVInputTest : public ::testing::Test {
169172
p_wrapsImplMock = nullptr;
170173
}
171174

172-
// <pca> debug
173-
// IarmBus::setImpl(nullptr);
174-
// if (p_iarmBusImplMock != nullptr) {
175-
// delete p_iarmBusImplMock;
176-
// p_iarmBusImplMock = nullptr;
177-
// }
178-
// </pca>
175+
dispatcher->Deactivate();
176+
dispatcher->Release();
179177
}
180178
};
181179

@@ -336,22 +334,18 @@ TEST_F(AVInputDsTest, getVRRFrameRate)
336334

337335
class AVInputInit : public AVInputDsTest {
338336
protected:
339-
// <pca> debug
340337
IarmBusImplMock* p_iarmBusImplMock = nullptr;
341-
// </pca>
342338
NiceMock<FactoriesImplementation> factoriesImplementation;
343-
PLUGINHOST_DISPATCHER* dispatcher;
339+
344340
Core::JSONRPC::Message message;
345341

346342
AVInputInit()
347343
: AVInputDsTest()
348344
{
349345
TEST_LOG("*** _DEBUG: AVInputInit Constructor");
350346

351-
// <pca> debug
352347
p_iarmBusImplMock = new NiceMock<IarmBusImplMock>;
353348
IarmBus::setImpl(p_iarmBusImplMock);
354-
// </pca>
355349

356350
ON_CALL(*p_iarmBusImplMock, IARM_Bus_RegisterEventHandler(::testing::_, ::testing::_, ::testing::_))
357351
.WillByDefault(::testing::Invoke(
@@ -404,27 +398,18 @@ class AVInputInit : public AVInputDsTest {
404398
}));
405399

406400
PluginHost::IFactories::Assign(&factoriesImplementation);
407-
dispatcher = static_cast<PLUGINHOST_DISPATCHER*>(
408-
// <pca>
409-
//plugin->QueryInterface(PLUGINHOST_DISPATCHER_ID));
410-
// </pca>
411-
dispatcher->Activate(&service);
412401
}
413402

414403
virtual ~AVInputInit() override
415404
{
416405
TEST_LOG("*** _DEBUG: AVInputInit Destructor");
417-
dispatcher->Deactivate();
418-
dispatcher->Release();
419406
PluginHost::IFactories::Assign(nullptr);
420407

421-
// <pca> debug
422408
IarmBus::setImpl(nullptr);
423409
if (p_iarmBusImplMock != nullptr) {
424410
delete p_iarmBusImplMock;
425411
p_iarmBusImplMock = nullptr;
426412
}
427-
// </pca>
428413
TEST_LOG("*** _DEBUG: AVInputInit Destructor: exit");
429414
}
430415
};

0 commit comments

Comments
 (0)