blob: 39ac8bba3d951a5ad1ca271bc063b3e8b8d1dac2 [file] [log] [blame]
George Liu1e44c732020-02-28 20:20:06 +08001#pragma once
2
3#include "utils.hpp"
4
5#include <gmock/gmock.h>
6#include <gtest/gtest.h>
7
8namespace pldm
9{
10namespace 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 */
18inline 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
28using namespace pldm::utils;
29
30class MockdBusHandler : public DBusHandler
31{
32 public:
33 MOCK_METHOD(void, setDbusProperty,
34 (const DBusMapping&, const PropertyValue&), (const override));
35};