Skip to content

Commit ee43c2f

Browse files
committed
AVInput COM-RPC Support: Unit tests: Fixed mocking
1 parent 6a72d4a commit ee43c2f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Tests/L1Tests/tests/test_AVInput.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class AVInputTest : public ::testing::Test {
4545
protected:
4646
Core::ProxyType<Plugin::AVInput> plugin;
4747
// <pca>
48+
IarmBusImplMock* p_iarmBusImplMock = nullptr;
4849
Core::ProxyType<Plugin::AVInputImplementation> AVInputImpl;
4950
Core::ProxyType<WorkerPoolImplementation> workerPool;
5051
NiceMock<COMLinkMock> comLinkMock;
@@ -83,6 +84,9 @@ class AVInputTest : public ::testing::Test {
8384
p_wrapsImplMock = new NiceMock <WrapsImplMock>;
8485
Wraps::setImpl(p_wrapsImplMock);
8586

87+
p_iarmBusImplMock = new NiceMock<IarmBusImplMock>;
88+
IarmBus::setImpl(p_iarmBusImplMock);
89+
8690
ON_CALL(*p_avInputMock, Register(::testing::Matcher<Exchange::IAVInput::IDevicesChangedNotification*>(::testing::_)))
8791
.WillByDefault(::testing::Invoke(
8892
[&](Exchange::IAVInput::IDevicesChangedNotification *notification){
@@ -172,6 +176,11 @@ class AVInputTest : public ::testing::Test {
172176
delete p_wrapsImplMock;
173177
p_wrapsImplMock = nullptr;
174178
}
179+
180+
if (p_iarmBusImplMock != nullptr) {
181+
delete p_iarmBusImplMock;
182+
p_iarmBusImplMock = nullptr;
183+
}
175184
}
176185
// </pca>
177186
};

0 commit comments

Comments
 (0)