dbushelper: drop obsolete parameter from interface

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Idebae41e021f54c3670cc22aa6c784549a361c23
diff --git a/test/dbus_active_unittest.cpp b/test/dbus_active_unittest.cpp
index 3fb1dc6..6c640f8 100644
--- a/test/dbus_active_unittest.cpp
+++ b/test/dbus_active_unittest.cpp
@@ -41,10 +41,10 @@
     std::string path = "/asdf";
     std::string service = "asdfasdf.asdfasdf";
 
-    EXPECT_CALL(*helper, getProperties(_, service, path, NotNull()))
+    EXPECT_CALL(*helper, getProperties(service, path, NotNull()))
         .WillOnce(
-            Invoke([&](sdbusplus::bus::bus& bus, const std::string& service,
-                       const std::string& path, struct SensorProperties* prop) {
+            Invoke([&](const std::string& service, const std::string& path,
+                       struct SensorProperties* prop) {
                 prop->scale = -3;
                 prop->value = 10000;
                 prop->unit = "x";
diff --git a/test/dbus_passive_unittest.cpp b/test/dbus_passive_unittest.cpp
index 8eb3416..a04b4ec 100644
--- a/test/dbus_passive_unittest.cpp
+++ b/test/dbus_passive_unittest.cpp
@@ -71,21 +71,21 @@
         bus_mock(std::move(sdbusplus::get_mocked_new(&sdbus_mock))),
         helper(std::make_unique<DbusHelperMock>())
     {
-        EXPECT_CALL(*helper, getService(_, StrEq(SensorIntf), StrEq(path)))
+        EXPECT_CALL(*helper, getService(StrEq(SensorIntf), StrEq(path)))
             .WillOnce(Return("asdf"));
 
         EXPECT_CALL(*helper,
-                    getProperties(_, StrEq("asdf"), StrEq(path), NotNull()))
-            .WillOnce(Invoke(
-                [&](sdbusplus::bus::bus& bus, const std::string& service,
-                    const std::string& path, struct SensorProperties* prop) {
+                    getProperties(StrEq("asdf"), StrEq(path), NotNull()))
+            .WillOnce(
+                Invoke([&](const std::string& service, const std::string& path,
+                           struct SensorProperties* prop) {
                     prop->scale = _scale;
                     prop->value = _value;
                     prop->unit = "x";
                     prop->min = 0;
                     prop->max = 0;
                 }));
-        EXPECT_CALL(*helper, thresholdsAsserted(_, StrEq("asdf"), StrEq(path)))
+        EXPECT_CALL(*helper, thresholdsAsserted(StrEq("asdf"), StrEq(path)))
             .WillOnce(Return(false));
 
         auto info = conf::SensorConfig();
@@ -436,8 +436,8 @@
     EXPECT_EQ(failed, false);
 }
 
-void GetPropertiesMax3k(sdbusplus::bus::bus& bus, const std::string& service,
-                        const std::string& path, SensorProperties* prop)
+void GetPropertiesMax3k(const std::string& service, const std::string& path,
+                        SensorProperties* prop)
 {
     prop->scale = -3;
     prop->value = 10;
@@ -446,9 +446,8 @@
     prop->max = 3000;
 }
 
-using GetPropertiesFunction =
-    std::function<void(sdbusplus::bus::bus&, const std::string&,
-                       const std::string&, SensorProperties*)>;
+using GetPropertiesFunction = std::function<void(
+    const std::string&, const std::string&, SensorProperties*)>;
 
 // TODO: There is definitely a cleaner way to do this.
 class DbusPassiveTest3kMaxObj : public ::testing::Test
@@ -459,13 +458,13 @@
         bus_mock(std::move(sdbusplus::get_mocked_new(&sdbus_mock))),
         helper(std::make_unique<DbusHelperMock>())
     {
-        EXPECT_CALL(*helper, getService(_, StrEq(SensorIntf), StrEq(path)))
+        EXPECT_CALL(*helper, getService(StrEq(SensorIntf), StrEq(path)))
             .WillOnce(Return("asdf"));
 
         EXPECT_CALL(*helper,
-                    getProperties(_, StrEq("asdf"), StrEq(path), NotNull()))
+                    getProperties(StrEq("asdf"), StrEq(path), NotNull()))
             .WillOnce(_getProps);
-        EXPECT_CALL(*helper, thresholdsAsserted(_, StrEq("asdf"), StrEq(path)))
+        EXPECT_CALL(*helper, thresholdsAsserted(StrEq("asdf"), StrEq(path)))
             .WillOnce(Return(false));
 
         auto info = conf::SensorConfig();
@@ -503,13 +502,13 @@
         bus_mock(std::move(sdbusplus::get_mocked_new(&sdbus_mock))),
         helper(std::make_unique<DbusHelperMock>())
     {
-        EXPECT_CALL(*helper, getService(_, StrEq(SensorIntf), StrEq(path)))
+        EXPECT_CALL(*helper, getService(StrEq(SensorIntf), StrEq(path)))
             .WillOnce(Return("asdf"));
 
         EXPECT_CALL(*helper,
-                    getProperties(_, StrEq("asdf"), StrEq(path), NotNull()))
+                    getProperties(StrEq("asdf"), StrEq(path), NotNull()))
             .WillOnce(_getProps);
-        EXPECT_CALL(*helper, thresholdsAsserted(_, StrEq("asdf"), StrEq(path)))
+        EXPECT_CALL(*helper, thresholdsAsserted(StrEq("asdf"), StrEq(path)))
             .WillOnce(Return(false));
 
         auto info = conf::SensorConfig();
diff --git a/test/dbushelper_mock.hpp b/test/dbushelper_mock.hpp
index 6ce63c8..44b3bea 100644
--- a/test/dbushelper_mock.hpp
+++ b/test/dbushelper_mock.hpp
@@ -2,8 +2,6 @@
 
 #include "util.hpp"
 
-#include <sdbusplus/bus.hpp>
-
 #include <string>
 
 #include <gmock/gmock.h>
@@ -16,16 +14,13 @@
   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*));
+    MOCK_METHOD2(getService,
+                 std::string(const std::string&, const std::string&));
+    MOCK_METHOD3(getProperties, void(const std::string&, const std::string&,
+                                     struct SensorProperties*));
 
-    MOCK_METHOD3(thresholdsAsserted,
-                 bool(sdbusplus::bus::bus& bus, const std::string& service,
-                      const std::string& path));
+    MOCK_METHOD2(thresholdsAsserted,
+                 bool(const std::string& service, const std::string& path));
 };
 
 } // namespace pid_control