1 /**
2  * Copyright © 2021 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 "vpd.hpp"
19 
20 #include <gmock/gmock.h>
21 
22 namespace phosphor::power::regulators
23 {
24 
25 /**
26  * @class MockVPD
27  *
28  * Mock implementation of the VPD interface.
29  */
30 class MockVPD : public VPD
31 {
32   public:
33     // Specify which compiler-generated methods we want
34     MockVPD() = default;
35     MockVPD(const MockVPD&) = delete;
36     MockVPD(MockVPD&&) = delete;
37     MockVPD& operator=(const MockVPD&) = delete;
38     MockVPD& operator=(MockVPD&&) = delete;
39     virtual ~MockVPD() = default;
40 
41     MOCK_METHOD(void, clearCache, (), (override));
42 
43     MOCK_METHOD(std::string, getValue,
44                 (const std::string& inventoryPath, const std::string& keyword),
45                 (override));
46 };
47 
48 } // namespace phosphor::power::regulators
49