@@ -53,19 +53,25 @@ class AVInputTest : public ::testing::Test {
53
53
54
54
Core::ProxyType<Plugin::AVInput> plugin;
55
55
Core::ProxyType<Plugin::AVInputImplementation> AVInputImpl;
56
- Core::ProxyType<WorkerPoolImplementation> workerPool;
56
+ // <pca> debug
57
+ // Core::ProxyType<WorkerPoolImplementation> workerPool;
58
+ // </pca>
57
59
58
60
NiceMock<COMLinkMock> comLinkMock;
59
61
NiceMock<ServiceMock> service;
60
- NiceMock<FactoriesImplementation> factoriesImplementation;
62
+ // <pca>
63
+ // NiceMock<FactoriesImplementation> factoriesImplementation;
64
+ // </pca>
61
65
62
66
WrapsImplMock* p_wrapsImplMock = nullptr ;
63
67
ServiceMock* p_serviceMock = nullptr ;
64
68
AVInputMock* p_avInputMock = nullptr ;
65
69
HdmiInputImplMock* p_hdmiInputImplMock = nullptr ;
66
70
CompositeInputImplMock* p_compositeInputImplMock = nullptr ;
67
71
HostImplMock* p_HostImplMock = nullptr ;
68
- IarmBusImplMock* p_iarmBusImplMock = nullptr ;
72
+ // <pca> debug
73
+ // IarmBusImplMock* p_iarmBusImplMock = nullptr;
74
+ // </pca>
69
75
70
76
Exchange::IAVInput::IDevicesChangedNotification *OnDevicesChangedNotification = nullptr ;
71
77
Exchange::IAVInput::ISignalChangedNotification *OnSignalChangedNotification = nullptr ;
@@ -81,12 +87,19 @@ class AVInputTest : public ::testing::Test {
81
87
IARM_EventHandler_t dsAVVideoModeEventHandler;
82
88
IARM_EventHandler_t dsAviContentTypeEventHandler;
83
89
90
+ // <pca> debug
91
+ // AVInputTest()
92
+ // : plugin(Core::ProxyType<Plugin::AVInput>::Create())
93
+ // , handler(*(plugin))
94
+ // , INIT_CONX(1, 0) , workerPool(Core::ProxyType<WorkerPoolImplementation>::Create(
95
+ // 2, Core::Thread::DefaultStackSize(), 16))
96
+ // {
84
97
AVInputTest ()
85
98
: plugin(Core::ProxyType<Plugin::AVInput>::Create())
86
99
, handler(*(plugin))
87
- , INIT_CONX(1 , 0 ) , workerPool(Core::ProxyType<WorkerPoolImplementation>::Create(
88
- 2 , Core::Thread::DefaultStackSize(), 16 ))
100
+ , INIT_CONX(1 , 0 )
89
101
{
102
+ // </pca>
90
103
printf (" *** _DEBUG: AVInputTest ctor: entry" );
91
104
92
105
p_serviceMock = new NiceMock <ServiceMock>;
@@ -95,11 +108,18 @@ class AVInputTest : public ::testing::Test {
95
108
96
109
Wraps::setImpl (p_wrapsImplMock);
97
110
98
- PluginHost::IFactories::Assign (&factoriesImplementation);
111
+ // <pca> debug
112
+ // PluginHost::IFactories::Assign(&factoriesImplementation);
113
+ // </pca>
99
114
100
- dispatcher = static_cast <PLUGINHOST_DISPATCHER*>(plugin->QueryInterface (PLUGINHOST_DISPATCHER_ID));
101
- dispatcher->Activate (&service);
115
+ // <pca> debug
116
+ // dispatcher = static_cast<PLUGINHOST_DISPATCHER*>(plugin->QueryInterface(PLUGINHOST_DISPATCHER_ID));
117
+ // dispatcher->Activate(&service);
118
+ // </pca>
102
119
120
+ // <pca> debug
121
+ #if 0
122
+ // </pca>
103
123
ON_CALL(*p_avInputMock, Register(::testing::Matcher<Exchange::IAVInput::IDevicesChangedNotification*>(::testing::_)))
104
124
.WillByDefault(::testing::Invoke(
105
125
[&](Exchange::IAVInput::IDevicesChangedNotification *notification){
@@ -154,6 +174,13 @@ class AVInputTest : public ::testing::Test {
154
174
.WillByDefault(::testing::Return(AVInputImpl));
155
175
#endif
156
176
177
+ // <pca> debug
178
+ #endif
179
+ // </pca>
180
+
181
+ // <pca>
182
+ #if 0
183
+ // </pca>
157
184
p_iarmBusImplMock = new NiceMock<IarmBusImplMock>;
158
185
IarmBus::setImpl(p_iarmBusImplMock);
159
186
@@ -206,9 +233,14 @@ class AVInputTest : public ::testing::Test {
206
233
}
207
234
return IARM_RESULT_SUCCESS;
208
235
}));
236
+ // <pca>
237
+ #endif
238
+ // </pca>
209
239
210
- Core::IWorkerPool::Assign (&(*workerPool));
211
- workerPool->Run ();
240
+ // <pca> debug
241
+ // Core::IWorkerPool::Assign(&(*workerPool));
242
+ // workerPool->Run();
243
+ // </pca>
212
244
213
245
plugin->Initialize (&service);
214
246
@@ -227,8 +259,10 @@ class AVInputTest : public ::testing::Test {
227
259
TEST_LOG (" *** _DEBUG: AVInputTest xtor" );
228
260
plugin->Deinitialize (&service);
229
261
230
- Core::IWorkerPool::Assign (nullptr );
231
- workerPool.Release ();
262
+ // <pca> debug
263
+ // Core::IWorkerPool::Assign(nullptr);
264
+ // workerPool.Release();
265
+ // </pca>
232
266
233
267
if (p_serviceMock != nullptr )
234
268
{
@@ -268,16 +302,20 @@ class AVInputTest : public ::testing::Test {
268
302
p_HostImplMock = nullptr ;
269
303
}
270
304
271
- dispatcher->Deactivate ();
272
- dispatcher->Release ();
305
+ // <pca> debug
306
+ // dispatcher->Deactivate();
307
+ // dispatcher->Release();
308
+ // </pca>
273
309
274
310
PluginHost::IFactories::Assign (nullptr );
275
311
276
- IarmBus::setImpl (nullptr );
277
- if (p_iarmBusImplMock != nullptr ) {
278
- delete p_iarmBusImplMock;
279
- p_iarmBusImplMock = nullptr ;
280
- }
312
+ // <pca> debug
313
+ // IarmBus::setImpl(nullptr);
314
+ // if (p_iarmBusImplMock != nullptr) {
315
+ // delete p_iarmBusImplMock;
316
+ // p_iarmBusImplMock = nullptr;
317
+ // }
318
+ // </pca>
281
319
}
282
320
};
283
321
@@ -311,14 +349,14 @@ TEST_F(AVInputTest, RegisteredMethods)
311
349
EXPECT_EQ (Core::ERROR_NONE, handler.Exists (_T (" getGameFeatureStatus" )));
312
350
}
313
351
314
- // TEST_F(AVInputTest, contentProtected)
315
- // {
316
- // TEST_LOG("*** _DEBUG: TEST_F(AVInputTest, contentProtected): entry");
317
- // EXPECT_EQ(Core::ERROR_NONE, handler.Invoke(connection, _T("contentProtected"), _T("{}"), response));
318
- // TEST_LOG("*** _DEBUG: TEST_F(AVInputTest, contentProtected): Mark 1");
319
- // EXPECT_EQ(response, string("{\"isContentProtected\":true,\"success\":true}"));
320
- // TEST_LOG("*** _DEBUG: TEST_F(AVInputTest, contentProtected): Mark 2");
321
- // }
352
+ TEST_F (AVInputTest, contentProtected)
353
+ {
354
+ TEST_LOG (" *** _DEBUG: TEST_F(AVInputTest, contentProtected): entry" );
355
+ EXPECT_EQ (Core::ERROR_NONE, handler.Invoke (connection, _T (" contentProtected" ), _T (" {}" ), response));
356
+ TEST_LOG (" *** _DEBUG: TEST_F(AVInputTest, contentProtected): Mark 1" );
357
+ EXPECT_EQ (response, string (" {\" isContentProtected\" :true,\" success\" :true}" ));
358
+ TEST_LOG (" *** _DEBUG: TEST_F(AVInputTest, contentProtected): Mark 2" );
359
+ }
322
360
// <pca>
323
361
#endif
324
362
// </pca>
0 commit comments