Implemented sensor class
Sensor class was introduced, it monitors
xyz.openbmc_project.Sensor.Value, for change and notifies all
listeners.
Tested:
- Unit tested with service stub that provides dbus interface
xyz.openbmc_project.Sensor.Value
- All changes are delivered to listeners
- All other unit tests are passing
Change-Id: I8c9d58cc986c1fe2a4d2386815d559814016efa6
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
diff --git a/tests/src/utils/sensor_id_eq.hpp b/tests/src/utils/sensor_id_eq.hpp
new file mode 100644
index 0000000..f952504
--- /dev/null
+++ b/tests/src/utils/sensor_id_eq.hpp
@@ -0,0 +1,14 @@
+#pragma once
+
+#include "interfaces/sensor.hpp"
+
+#include <gmock/gmock.h>
+
+inline auto sensorIdEq(interfaces::Sensor::Id id)
+{
+ using namespace testing;
+
+ return AllOf(Field(&interfaces::Sensor::Id::type, Eq(id.type)),
+ Field(&interfaces::Sensor::Id::service, Eq(id.service)),
+ Field(&interfaces::Sensor::Id::path, Eq(id.path)));
+}