Skip to content

Commit abc9120

Browse files
committed
AVInput COM-RPC Support: Unit tests: Added implementation support
1 parent d18fdb9 commit abc9120

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Tests/L1Tests/tests/test_AVInput.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
#include <gtest/gtest.h>
2121

2222
#include "AVInput.h"
23+
// <pca>
24+
#include "AVInputImplementation.h"
25+
#include "COMLinkMock.h"
26+
// </pca>
2327

2428
#include "CompositeInputMock.h"
2529
#include "FactoriesImplementation.h"
@@ -36,6 +40,10 @@ using ::testing::NiceMock;
3640
class AVInputTest : public ::testing::Test {
3741
protected:
3842
Core::ProxyType<Plugin::AVInput> plugin;
43+
// <pca>
44+
Core::ProxyType<Plugin::AVInputImplementation> AVInputImpl;
45+
NiceMock<COMLinkMock> comLinkMock;
46+
// </pca>
3947
Core::JSONRPC::Handler& handler;
4048
DECL_CORE_JSONRPC_CONX connection;
4149
string response;
@@ -45,6 +53,14 @@ class AVInputTest : public ::testing::Test {
4553
, handler(*(plugin))
4654
, INIT_CONX(1, 0)
4755
{
56+
// <pca>
57+
ON_CALL(comLinkMock, Instantiate(::testing::_, ::testing::_, ::testing::_))
58+
.WillByDefault(::testing::Invoke(
59+
[&](const RPC::Object& object, const uint32_t waitTime, uint32_t& connectionId) {
60+
AVInputImpl = Core::ProxyType<Plugin::AVInputImplementation>::Create();
61+
return &AVInputImpl;
62+
}));
63+
// </pca>
4864
}
4965
virtual ~AVInputTest() = default;
5066
};

0 commit comments

Comments
 (0)