Steve Foreman | 4f0d1de | 2021-09-20 14:06:32 -0700 | [diff] [blame^] | 1 | // Copyright 2022 Google LLC |
Willy Tu | a2056e9 | 2021-10-10 13:36:16 -0700 | [diff] [blame] | 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 Venture | f085d91 | 2019-03-15 08:50:00 -0700 | [diff] [blame] | 15 | #pragma once |
| 16 | |
| 17 | #include "handler.hpp" |
| 18 | |
Patrick Venture | 40e8ace | 2020-08-12 20:44:43 -0700 | [diff] [blame] | 19 | #include <cstddef> |
| 20 | #include <cstdint> |
| 21 | #include <string> |
Steve Foreman | 4f0d1de | 2021-09-20 14:06:32 -0700 | [diff] [blame^] | 22 | #include <string_view> |
Patrick Venture | 40e8ace | 2020-08-12 20:44:43 -0700 | [diff] [blame] | 23 | #include <tuple> |
| 24 | |
Patrick Venture | f085d91 | 2019-03-15 08:50:00 -0700 | [diff] [blame] | 25 | #include <gmock/gmock.h> |
| 26 | |
| 27 | namespace google |
| 28 | { |
| 29 | namespace ipmi |
| 30 | { |
| 31 | |
| 32 | class HandlerMock : public HandlerInterface |
| 33 | { |
| 34 | |
| 35 | public: |
| 36 | ~HandlerMock() = default; |
| 37 | |
Willy Tu | cad9eb8 | 2021-10-10 14:08:39 -0700 | [diff] [blame] | 38 | MOCK_METHOD((std::tuple<std::uint8_t, std::string>), getEthDetails, |
| 39 | (std::string), (const, override)); |
| 40 | MOCK_METHOD(std::int64_t, getRxPackets, (const std::string&), |
| 41 | (const, override)); |
| 42 | MOCK_METHOD( |
| 43 | (std::tuple<std::uint8_t, std::uint8_t, std::uint8_t, std::uint8_t>), |
| 44 | getCpldVersion, (unsigned int), (const, override)); |
| 45 | |
| 46 | MOCK_METHOD(void, psuResetDelay, (std::uint32_t), (const, override)); |
| 47 | MOCK_METHOD(void, psuResetOnShutdown, (), (const, override)); |
| 48 | MOCK_METHOD(std::uint32_t, getFlashSize, (), (override)); |
| 49 | MOCK_METHOD(std::string, getEntityName, (std::uint8_t, std::uint8_t), |
| 50 | (override)); |
| 51 | MOCK_METHOD(std::string, getMachineName, (), (override)); |
| 52 | MOCK_METHOD(void, buildI2cPcieMapping, (), (override)); |
| 53 | MOCK_METHOD(size_t, getI2cPcieMappingSize, (), (const, override)); |
| 54 | MOCK_METHOD((std::tuple<std::uint32_t, std::string>), getI2cEntry, |
| 55 | (unsigned int), (const, override)); |
| 56 | MOCK_METHOD(void, hostPowerOffDelay, (std::uint32_t), (const, override)); |
Steve Foreman | 4f0d1de | 2021-09-20 14:06:32 -0700 | [diff] [blame^] | 57 | |
| 58 | MOCK_METHOD(uint32_t, accelOobDeviceCount, (), (const, override)); |
| 59 | MOCK_METHOD(std::string, accelOobDeviceName, (size_t), (const, override)); |
| 60 | MOCK_METHOD(uint64_t, accelOobRead, (std::string_view, uint64_t, uint8_t), |
| 61 | (const, override)); |
| 62 | MOCK_METHOD(void, accelOobWrite, |
| 63 | (std::string_view, uint64_t, uint8_t, uint64_t), |
| 64 | (const, override)); |
Patrick Venture | f085d91 | 2019-03-15 08:50:00 -0700 | [diff] [blame] | 65 | }; |
| 66 | |
| 67 | } // namespace ipmi |
| 68 | } // namespace google |