forked from Kistler-Group/sdbus-cpp
Mock sdbus lib, add unit tests of Connection class.
Introduce mock of sdbus library through extracting its interface. Set up unit tests of Connection class through injection of sdbusMock to constructor. Clients of Connections class should use fabrics instead.
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
|
||||
// Own
|
||||
#include "Connection.h"
|
||||
#include "SdBus.h"
|
||||
|
||||
#include "TestingAdaptor.h"
|
||||
#include "TestingProxy.h"
|
||||
@@ -87,7 +88,8 @@ public:
|
||||
std::unique_ptr<TestingProxy> m_proxy;
|
||||
};
|
||||
|
||||
sdbus::internal::Connection AdaptorAndProxyFixture::m_connection{sdbus::internal::Connection::BusType::eSystem};
|
||||
sdbus::internal::Connection AdaptorAndProxyFixture::m_connection{sdbus::internal::Connection::BusType::eSystem,
|
||||
std::make_unique<SdBus>(SdBus())};
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user