blob: d1ebe0b44980f668a6153a7280266d7a97ffc630 [file] [log] [blame]
Shawn McCarney7c5d7b22020-04-03 18:50:13 -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 "journal.hpp"
19
20#include <string>
21#include <vector>
22
Shawn McCarney5248b8a2020-07-15 22:59:36 -050023#include <gmock/gmock.h>
24
25namespace phosphor::power::regulators
26{
27
28/**
29 * @class MockJournal
30 *
31 * Mock implementation of the Journal interface.
32 */
33class MockJournal : public Journal
34{
35 public:
36 // Specify which compiler-generated methods we want
37 MockJournal() = default;
38 MockJournal(const MockJournal&) = delete;
39 MockJournal(MockJournal&&) = delete;
40 MockJournal& operator=(const MockJournal&) = delete;
41 MockJournal& operator=(MockJournal&&) = delete;
42 virtual ~MockJournal() = default;
43
44 MOCK_METHOD(void, logDebug, (const std::string& message), (override));
45 MOCK_METHOD(void, logDebug, (const std::vector<std::string>& messages),
46 (override));
47 MOCK_METHOD(void, logError, (const std::string& message), (override));
48 MOCK_METHOD(void, logError, (const std::vector<std::string>& messages),
49 (override));
50 MOCK_METHOD(void, logInfo, (const std::string& message), (override));
51 MOCK_METHOD(void, logInfo, (const std::vector<std::string>& messages),
52 (override));
53};
54
55} // namespace phosphor::power::regulators