1 /**
2  * Copyright © 2020 IBM Corporation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #pragma once
17 
18 #include "presence_service.hpp"
19 
20 #include <gmock/gmock.h>
21 
22 namespace phosphor::power::regulators
23 {
24 
25 /**
26  * @class MockPresenceService
27  *
28  * Mock implementation of the PresenceService interface.
29  */
30 class MockPresenceService : public PresenceService
31 {
32   public:
33     // Specify which compiler-generated methods we want
34     MockPresenceService() = default;
35     MockPresenceService(const MockPresenceService&) = delete;
36     MockPresenceService(MockPresenceService&&) = delete;
37     MockPresenceService& operator=(const MockPresenceService&) = delete;
38     MockPresenceService& operator=(MockPresenceService&&) = delete;
39     virtual ~MockPresenceService() = default;
40 
41     MOCK_METHOD(void, clearCache, (), (override));
42 
43     MOCK_METHOD(bool, isPresent, (const std::string& inventoryPath),
44                 (override));
45 };
46 
47 } // namespace phosphor::power::regulators
48