George Liu | 1e44c73 | 2020-02-28 20:20:06 +0800 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include "utils.hpp" |
| 4 | |
| 5 | #include <gmock/gmock.h> |
| 6 | #include <gtest/gtest.h> |
| 7 | |
| 8 | namespace pldm |
| 9 | { |
| 10 | namespace utils |
| 11 | { |
| 12 | |
| 13 | /** @brief helper function for parameter matching |
| 14 | * @param[in] lhs - left-hand side value |
| 15 | * @param[in] rhs - right-hand side value |
| 16 | * @return true if it matches |
| 17 | */ |
| 18 | inline bool operator==(const DBusMapping& lhs, const DBusMapping& rhs) |
| 19 | { |
| 20 | return lhs.objectPath == rhs.objectPath && lhs.interface == rhs.interface && |
| 21 | lhs.propertyName == rhs.propertyName && |
| 22 | lhs.propertyType == rhs.propertyType; |
| 23 | } |
| 24 | |
| 25 | } // namespace utils |
| 26 | } // namespace pldm |
| 27 | |
| 28 | using namespace pldm::utils; |
| 29 | |
| 30 | class MockdBusHandler : public DBusHandler |
| 31 | { |
| 32 | public: |
| 33 | MOCK_METHOD(void, setDbusProperty, |
| 34 | (const DBusMapping&, const PropertyValue&), (const override)); |
| 35 | }; |