blob: cd854188413de4a97604b615e44cb2ff7cf3e274 [file] [log] [blame]
Willy Tua2056e92021-10-10 13:36:16 -07001// Copyright 2021 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
Patrick Venturef085d912019-03-15 08:50:00 -070015#pragma once
16
17#include "handler.hpp"
18
Patrick Venture40e8ace2020-08-12 20:44:43 -070019#include <cstddef>
20#include <cstdint>
21#include <string>
22#include <tuple>
23
Patrick Venturef085d912019-03-15 08:50:00 -070024#include <gmock/gmock.h>
25
26namespace google
27{
28namespace ipmi
29{
30
31class HandlerMock : public HandlerInterface
32{
33
34 public:
35 ~HandlerMock() = default;
36
William A. Kennington IIIb69209b2021-07-13 13:22:24 -070037 MOCK_CONST_METHOD1(getEthDetails,
38 std::tuple<std::uint8_t, std::string>(std::string));
Patrick Ventured2037c62019-03-15 10:29:47 -070039 MOCK_CONST_METHOD1(getRxPackets, std::int64_t(const std::string&));
Patrick Venturebb90d4f2019-03-15 13:42:06 -070040 MOCK_CONST_METHOD1(getCpldVersion,
41 std::tuple<std::uint8_t, std::uint8_t, std::uint8_t,
42 std::uint8_t>(unsigned int));
Patrick Ventureaa374122019-03-15 15:09:10 -070043 MOCK_CONST_METHOD1(psuResetDelay, void(std::uint32_t));
Shounak Mitraac4a16f2021-02-02 11:11:44 -080044 MOCK_CONST_METHOD0(psuResetOnShutdown, void());
Willy Tu3b1b4272021-03-02 17:58:10 -080045 MOCK_METHOD0(getFlashSize, uint32_t());
Patrick Venture07f85152019-03-15 21:36:56 -070046 MOCK_METHOD2(getEntityName, std::string(std::uint8_t, std::uint8_t));
William A. Kennington III29f35bc2020-11-03 23:30:31 -080047 MOCK_METHOD0(getMachineName, std::string());
Patrick Venture49f23ad2019-03-16 11:59:55 -070048 MOCK_METHOD0(buildI2cPcieMapping, void());
49 MOCK_CONST_METHOD0(getI2cPcieMappingSize, size_t());
50 MOCK_CONST_METHOD1(getI2cEntry,
51 std::tuple<std::uint32_t, std::string>(unsigned int));
linyuny8cfa4c42021-06-16 13:53:08 -070052 MOCK_CONST_METHOD1(hostPowerOffDelay, void(std::uint32_t));
Patrick Venturef085d912019-03-15 08:50:00 -070053};
54
55} // namespace ipmi
56} // namespace google