@@ -222,10 +222,6 @@ TEST_F(AVInputTest, contentProtected)
222
222
TEST_LOG (" *** _DEBUG: TEST_F(AVInputTest, contentProtected): Mark 2" );
223
223
}
224
224
225
- // <pca> debug
226
- #if 0
227
- // </pca>
228
-
229
225
class AVInputDsTest : public AVInputTest {
230
226
protected:
231
227
HdmiInputImplMock* p_hdmiInputImplMock = nullptr ;
@@ -275,6 +271,88 @@ class AVInputDsTest : public AVInputTest {
275
271
}
276
272
};
277
273
274
+ TEST_F (AVInputDsTest, numberOfInputs)
275
+ {
276
+ ON_CALL (*p_hdmiInputImplMock, getNumberOfInputs ())
277
+ .WillByDefault (::testing::Return (1 ));
278
+
279
+ EXPECT_EQ (Core::ERROR_NONE, handler.Invoke (connection, _T (" numberOfInputs" ), _T (" {}" ), response));
280
+ EXPECT_EQ (response, string (" {\" numberOfInputs\" :1,\" success\" :true}" ));
281
+ }
282
+
283
+ TEST_F (AVInputDsTest, currentVideoMode)
284
+ {
285
+ ON_CALL (*p_hdmiInputImplMock, getCurrentVideoMode ())
286
+ .WillByDefault (::testing::Return (string (" unknown" )));
287
+
288
+ EXPECT_EQ (Core::ERROR_NONE, handler.Invoke (connection, _T (" currentVideoMode" ), _T (" {}" ), response));
289
+ EXPECT_EQ (response, string (" {\" currentVideoMode\" :\" unknown\" ,\" success\" :true}" ));
290
+ }
291
+
292
+ TEST_F (AVInputDsTest, getEdid2AllmSupport)
293
+ {
294
+ EXPECT_EQ (Core::ERROR_NONE, handler.Invoke (connection, _T (" getEdid2AllmSupport" ), _T (" {\" portId\" : \" 0\" ,\" allmSupport\" :true}" ), response));
295
+ EXPECT_EQ (response, string (" {\" allmSupport\" :true,\" success\" :true}" ));
296
+ }
297
+
298
+ TEST_F (AVInputDsTest, getEdid2AllmSupport_ErrorCase)
299
+ {
300
+ EXPECT_EQ (Core::ERROR_GENERAL, handler.Invoke (connection, _T (" getEdid2AllmSupport" ), _T (" {\" portId\" : \" test\" ,\" allmSupport\" :true}" ), response));
301
+ EXPECT_EQ (response, string (" " ));
302
+ }
303
+
304
+ TEST_F (AVInputDsTest, setEdid2AllmSupport)
305
+ {
306
+ EXPECT_EQ (Core::ERROR_NONE, handler.Invoke (connection, _T (" setEdid2AllmSupport" ), _T (" {\" portId\" : \" 0\" ,\" allmSupport\" :true}" ), response));
307
+ EXPECT_EQ (response, string (" {\" success\" :true}" ));
308
+ }
309
+
310
+ TEST_F (AVInputDsTest, setEdid2AllmSupport_ErrorCase)
311
+ {
312
+ EXPECT_EQ (Core::ERROR_GENERAL, handler.Invoke (connection, _T (" setEdid2AllmSupport" ), _T (" {\" portId\" : \" test\" ,\" allmSupport\" :true}" ), response));
313
+ EXPECT_EQ (response, string (" " ));
314
+ }
315
+
316
+ TEST_F (AVInputDsTest, getVRRSupport)
317
+ {
318
+ EXPECT_EQ (Core::ERROR_NONE, handler.Invoke (connection, _T (" getVRRSupport" ), _T (" {\" portId\" : \" 0\" ,\" vrrSupport\" :true}" ), response));
319
+ EXPECT_EQ (response, string (" {\" vrrSupport\" :true,\" success\" :true}" ));
320
+ }
321
+
322
+ TEST_F (AVInputDsTest, getVRRSupport_ErrorCase)
323
+ {
324
+ EXPECT_EQ (Core::ERROR_GENERAL, handler.Invoke (connection, _T (" getVRRSupport" ), _T (" {\" portId\" : \" test\" ,\" vrrSupport\" :true}" ), response));
325
+ EXPECT_EQ (response, string (" " ));
326
+ }
327
+
328
+ TEST_F (AVInputDsTest, setVRRSupport)
329
+ {
330
+ EXPECT_EQ (Core::ERROR_NONE, handler.Invoke (connection, _T (" setVRRSupport" ), _T (" {\" portId\" : \" 0\" ,\" vrrSupport\" :true}" ), response));
331
+ EXPECT_EQ (response, string (" {\" success\" :true}" ));
332
+ }
333
+
334
+ TEST_F (AVInputDsTest, setVRRSupport_ErrorCase)
335
+ {
336
+ EXPECT_EQ (Core::ERROR_GENERAL, handler.Invoke (connection, _T (" setVRRSupport" ), _T (" {\" portId\" : \" test\" ,\" vrrSupport\" :true}" ), response));
337
+ EXPECT_EQ (response, string (" " ));
338
+ }
339
+
340
+ TEST_F (AVInputDsTest, getVRRFrameRate)
341
+ {
342
+ EXPECT_EQ (Core::ERROR_NONE, handler.Invoke (connection, _T (" getVRRFrameRate" ), _T (" {\" portId\" : \" 0\" }" ), response));
343
+ EXPECT_EQ (response, string (" {\" currentVRRVideoFrameRate\" :0,\" success\" :true}" ));
344
+ }
345
+
346
+ TEST_F (AVInputDsTest, getVRRFrameRate_ErrorCase)
347
+ {
348
+ EXPECT_EQ (Core::ERROR_GENERAL, handler.Invoke (connection, _T (" getVRRFrameRate" ), _T (" {\" portId\" : \" test\" }" ), response));
349
+ EXPECT_EQ (response, string (" " ));
350
+ }
351
+
352
+ // <pca> debug
353
+ #if 0
354
+ // </pca>
355
+
278
356
class AVInputInit : public AVInputDsTest {
279
357
protected:
280
358
IarmBusImplMock* p_iarmBusImplMock = nullptr;
@@ -349,7 +427,7 @@ class AVInputInit : public AVInputDsTest {
349
427
350
428
virtual ~AVInputInit() override
351
429
{
352
- TEST_LOG("*** _DEBUG: AVInputDsTest Destructor");
430
+ TEST_LOG("*** _DEBUG: AVInputInit Destructor");
353
431
dispatcher->Deactivate();
354
432
dispatcher->Release();
355
433
PluginHost::IFactories::Assign(nullptr);
@@ -2036,84 +2114,6 @@ TEST_F(AVInputInit, aviContentTypeUpdate_HDMI)
2036
2114
EVENT_UNSUBSCRIBE(0, _T("aviContentTypeUpdate"), _T("org.rdk.AVInput"), message);
2037
2115
}
2038
2116
2039
- TEST_F(AVInputDsTest, numberOfInputs)
2040
- {
2041
- ON_CALL(*p_hdmiInputImplMock, getNumberOfInputs())
2042
- .WillByDefault(::testing::Return(1));
2043
-
2044
- EXPECT_EQ(Core::ERROR_NONE, handler.Invoke(connection, _T("numberOfInputs"), _T("{}"), response));
2045
- EXPECT_EQ(response, string("{\"numberOfInputs\":1,\"success\":true}"));
2046
- }
2047
-
2048
- TEST_F(AVInputDsTest, currentVideoMode)
2049
- {
2050
- ON_CALL(*p_hdmiInputImplMock, getCurrentVideoMode())
2051
- .WillByDefault(::testing::Return(string("unknown")));
2052
-
2053
- EXPECT_EQ(Core::ERROR_NONE, handler.Invoke(connection, _T("currentVideoMode"), _T("{}"), response));
2054
- EXPECT_EQ(response, string("{\"currentVideoMode\":\"unknown\",\"success\":true}"));
2055
- }
2056
-
2057
- TEST_F(AVInputDsTest, getEdid2AllmSupport)
2058
- {
2059
- EXPECT_EQ(Core::ERROR_NONE, handler.Invoke(connection, _T("getEdid2AllmSupport"), _T("{\"portId\": \"0\",\"allmSupport\":true}"), response));
2060
- EXPECT_EQ(response, string("{\"allmSupport\":true,\"success\":true}"));
2061
- }
2062
-
2063
- TEST_F(AVInputDsTest, getEdid2AllmSupport_ErrorCase)
2064
- {
2065
- EXPECT_EQ(Core::ERROR_GENERAL, handler.Invoke(connection, _T("getEdid2AllmSupport"), _T("{\"portId\": \"test\",\"allmSupport\":true}"), response));
2066
- EXPECT_EQ(response, string(""));
2067
- }
2068
-
2069
- TEST_F(AVInputDsTest, setEdid2AllmSupport)
2070
- {
2071
- EXPECT_EQ(Core::ERROR_NONE, handler.Invoke(connection, _T("setEdid2AllmSupport"), _T("{\"portId\": \"0\",\"allmSupport\":true}"), response));
2072
- EXPECT_EQ(response, string("{\"success\":true}"));
2073
- }
2074
-
2075
- TEST_F(AVInputDsTest, setEdid2AllmSupport_ErrorCase)
2076
- {
2077
- EXPECT_EQ(Core::ERROR_GENERAL, handler.Invoke(connection, _T("setEdid2AllmSupport"), _T("{\"portId\": \"test\",\"allmSupport\":true}"), response));
2078
- EXPECT_EQ(response, string(""));
2079
- }
2080
-
2081
- TEST_F(AVInputDsTest, getVRRSupport)
2082
- {
2083
- EXPECT_EQ(Core::ERROR_NONE, handler.Invoke(connection, _T("getVRRSupport"), _T("{\"portId\": \"0\",\"vrrSupport\":true}"), response));
2084
- EXPECT_EQ(response, string("{\"vrrSupport\":true,\"success\":true}"));
2085
- }
2086
-
2087
- TEST_F(AVInputDsTest, getVRRSupport_ErrorCase)
2088
- {
2089
- EXPECT_EQ(Core::ERROR_GENERAL, handler.Invoke(connection, _T("getVRRSupport"), _T("{\"portId\": \"test\",\"vrrSupport\":true}"), response));
2090
- EXPECT_EQ(response, string(""));
2091
- }
2092
-
2093
- TEST_F(AVInputDsTest, setVRRSupport)
2094
- {
2095
- EXPECT_EQ(Core::ERROR_NONE, handler.Invoke(connection, _T("setVRRSupport"), _T("{\"portId\": \"0\",\"vrrSupport\":true}"), response));
2096
- EXPECT_EQ(response, string("{\"success\":true}"));
2097
- }
2098
-
2099
- TEST_F(AVInputDsTest, setVRRSupport_ErrorCase)
2100
- {
2101
- EXPECT_EQ(Core::ERROR_GENERAL, handler.Invoke(connection, _T("setVRRSupport"), _T("{\"portId\": \"test\",\"vrrSupport\":true}"), response));
2102
- EXPECT_EQ(response, string(""));
2103
- }
2104
-
2105
- TEST_F(AVInputDsTest, getVRRFrameRate)
2106
- {
2107
- EXPECT_EQ(Core::ERROR_NONE, handler.Invoke(connection, _T("getVRRFrameRate"), _T("{\"portId\": \"0\"}"), response));
2108
- EXPECT_EQ(response, string("{\"currentVRRVideoFrameRate\":0,\"success\":true}"));
2109
- }
2110
-
2111
- TEST_F(AVInputDsTest, getVRRFrameRate_ErrorCase)
2112
- {
2113
- EXPECT_EQ(Core::ERROR_GENERAL, handler.Invoke(connection, _T("getVRRFrameRate"), _T("{\"portId\": \"test\"}"), response));
2114
- EXPECT_EQ(response, string(""));
2115
- }
2116
-
2117
2117
// <pca> debug
2118
2118
#endif
2119
2119
// </pca>
0 commit comments