dbus: transition to interface for testing
To make testing easier, the dbus objects now receive a
helper interface to use instead of calling into a helper module.
Tested: Ran on quanta-q71l board and it behaved as expected.
Change-Id: I2521d9c75aec76e92d2e26dc044d01011e44d552
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/test/dbushelper_mock.hpp b/test/dbushelper_mock.hpp
new file mode 100644
index 0000000..23dd81c
--- /dev/null
+++ b/test/dbushelper_mock.hpp
@@ -0,0 +1,21 @@
+#pragma once
+
+#include <gmock/gmock.h>
+#include <sdbusplus/bus.hpp>
+#include <string>
+
+#include "dbus/util.hpp"
+
+class DbusHelperMock : public DbusHelperInterface
+{
+ public:
+ virtual ~DbusHelperMock() = default;
+
+ MOCK_METHOD3(GetService, std::string(sdbusplus::bus::bus&,
+ const std::string&,
+ const std::string&));
+ MOCK_METHOD4(GetProperties, void(sdbusplus::bus::bus&,
+ const std::string&,
+ const std::string&,
+ struct SensorProperties*));
+};