blob: e68b1de45a357f85e4547cf5895f6443c0633197 [file] [log] [blame]
Shawn McCarneye6d7f4c2025-11-18 15:46:08 -06001/**
2 * Copyright © 2025 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 "gpio.hpp"
19
20#include <gmock/gmock.h>
21
22namespace phosphor::power::sequencer
23{
24
25/**
26 * @class MockGPIO
27 *
28 * Mock implementation of the GPIO interface.
29 */
30class MockGPIO : public GPIO
31{
32 public:
33 MockGPIO() = default;
34 MockGPIO(const MockGPIO&) = delete;
35 MockGPIO(MockGPIO&&) = delete;
36 MockGPIO& operator=(const MockGPIO&) = delete;
37 MockGPIO& operator=(MockGPIO&&) = delete;
38 virtual ~MockGPIO() = default;
39
40 MOCK_METHOD(void, request, (RequestType type), (override));
41 MOCK_METHOD(int, getValue, (), (override));
42 MOCK_METHOD(void, setValue, (int value), (override));
43 MOCK_METHOD(void, release, (), (override));
44};
45
46} // namespace phosphor::power::sequencer