blob: 697af3e8607b7555b838614f4cb4a7de727b3939 [file] [log] [blame]
Shawn McCarney76c14c32020-07-15 10:10:20 -05001/**
2 * Copyright © 2020 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 "error_logging.hpp"
19
20#include <gmock/gmock.h>
21
22namespace phosphor::power::regulators
23{
24
25/**
26 * @class MockErrorLogging
27 *
28 * Mock implementation of the ErrorLogging interface.
29 */
30class MockErrorLogging : public ErrorLogging
31{
32 public:
33 // Specify which compiler-generated methods we want
34 MockErrorLogging() = default;
35 MockErrorLogging(const MockErrorLogging&) = delete;
36 MockErrorLogging(MockErrorLogging&&) = delete;
37 MockErrorLogging& operator=(const MockErrorLogging&) = delete;
38 MockErrorLogging& operator=(MockErrorLogging&&) = delete;
39 virtual ~MockErrorLogging() = default;
40
41 // TODO: Add parameters when ErrorLogging interface is complete
42 MOCK_METHOD(void, logConfigFileError, (), (override));
43 MOCK_METHOD(void, logDBusError, (), (override));
44 MOCK_METHOD(void, logI2CError, (), (override));
45 MOCK_METHOD(void, logInternalError, (), (override));
46 MOCK_METHOD(void, logPMBusError, (), (override));
47 MOCK_METHOD(void, logWriteVerificationError, (), (override));
48};
49
50} // namespace phosphor::power::regulators