blob: 8cd4a43f248e280b61fa105e5264e9c57e17b9ac [file] [log] [blame]
Lei YUebd3d092020-09-27 18:11:48 +08001#pragma once
2
3#include "utils.hpp"
4
5#include <gmock/gmock.h>
6
7namespace utils
8{
9
10class MockedUtils : public UtilsInterface
11{
12 public:
13 virtual ~MockedUtils() = default;
14
15 MOCK_CONST_METHOD3(getService,
16 std::string(sdbusplus::bus::bus& bus, const char* path,
17 const char* interface));
18
19 MOCK_CONST_METHOD3(getServices,
20 std::vector<std::string>(sdbusplus::bus::bus& bus,
21 const char* path,
22 const char* interface));
23
24 MOCK_CONST_METHOD5(getPropertyImpl,
25 any(sdbusplus::bus::bus& bus, const char* service,
26 const char* path, const char* interface,
27 const char* propertyName));
28
29 MOCK_CONST_METHOD6(setPropertyImpl,
30 void(sdbusplus::bus::bus& bus, const char* service,
31 const char* path, const char* interface,
32 const char* propertyName, ValueType&& value));
33};
34
35const UtilsInterface& getUtils();
36
37void freeUtils();
38
39} // namespace utils