blob: 7c0779f68fc7c630c4a42d0b40c4dd9a8ada10d2 [file] [log] [blame]
Shawn McCarney4e0402c2021-02-05 00:08:33 -06001/**
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
22namespace phosphor::power::regulators
23{
24
25/**
26 * @class MockVPD
27 *
28 * Mock implementation of the VPD interface.
29 */
30class 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
Matt Spinleraacc2aa2021-05-25 09:31:35 -060043 MOCK_METHOD(std::vector<uint8_t>, getValue,
Shawn McCarney4e0402c2021-02-05 00:08:33 -060044 (const std::string& inventoryPath, const std::string& keyword),
45 (override));
46};
47
48} // namespace phosphor::power::regulators