Willy Tu | a2056e9 | 2021-10-10 13:36:16 -0700 | [diff] [blame^] | 1 | // 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 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> |
| 22 | #include <tuple> |
| 23 | |
Patrick Venture | f085d91 | 2019-03-15 08:50:00 -0700 | [diff] [blame] | 24 | #include <gmock/gmock.h> |
| 25 | |
| 26 | namespace google |
| 27 | { |
| 28 | namespace ipmi |
| 29 | { |
| 30 | |
| 31 | class HandlerMock : public HandlerInterface |
| 32 | { |
| 33 | |
| 34 | public: |
| 35 | ~HandlerMock() = default; |
| 36 | |
William A. Kennington III | b69209b | 2021-07-13 13:22:24 -0700 | [diff] [blame] | 37 | MOCK_CONST_METHOD1(getEthDetails, |
| 38 | std::tuple<std::uint8_t, std::string>(std::string)); |
Patrick Venture | d2037c6 | 2019-03-15 10:29:47 -0700 | [diff] [blame] | 39 | MOCK_CONST_METHOD1(getRxPackets, std::int64_t(const std::string&)); |
Patrick Venture | bb90d4f | 2019-03-15 13:42:06 -0700 | [diff] [blame] | 40 | MOCK_CONST_METHOD1(getCpldVersion, |
| 41 | std::tuple<std::uint8_t, std::uint8_t, std::uint8_t, |
| 42 | std::uint8_t>(unsigned int)); |
Patrick Venture | aa37412 | 2019-03-15 15:09:10 -0700 | [diff] [blame] | 43 | MOCK_CONST_METHOD1(psuResetDelay, void(std::uint32_t)); |
Shounak Mitra | ac4a16f | 2021-02-02 11:11:44 -0800 | [diff] [blame] | 44 | MOCK_CONST_METHOD0(psuResetOnShutdown, void()); |
Willy Tu | 3b1b427 | 2021-03-02 17:58:10 -0800 | [diff] [blame] | 45 | MOCK_METHOD0(getFlashSize, uint32_t()); |
Patrick Venture | 07f8515 | 2019-03-15 21:36:56 -0700 | [diff] [blame] | 46 | MOCK_METHOD2(getEntityName, std::string(std::uint8_t, std::uint8_t)); |
William A. Kennington III | 29f35bc | 2020-11-03 23:30:31 -0800 | [diff] [blame] | 47 | MOCK_METHOD0(getMachineName, std::string()); |
Patrick Venture | 49f23ad | 2019-03-16 11:59:55 -0700 | [diff] [blame] | 48 | 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)); |
linyuny | 8cfa4c4 | 2021-06-16 13:53:08 -0700 | [diff] [blame] | 52 | MOCK_CONST_METHOD1(hostPowerOffDelay, void(std::uint32_t)); |
Patrick Venture | f085d91 | 2019-03-15 08:50:00 -0700 | [diff] [blame] | 53 | }; |
| 54 | |
| 55 | } // namespace ipmi |
| 56 | } // namespace google |