EX-Display
EX-Display
Loading...
Searching...
No Matches
MockCallback.h
Go to the documentation of this file.
1/*
2 * © 2024 Peter Cole
3 *
4 * This is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * It is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this code. If not, see <https://www.gnu.org/licenses/>.
16 */
17
18#ifndef MOCKCALLBACK_H
19#define MOCKCALLBACK_H
20
21#include "CallbackInterface.h"
22#include <gmock/gmock.h>
23
26public:
27 MOCK_METHOD(void, updateScreen, (uint8_t screenId, uint8_t row, const char *text), ());
28
30};
31
32#endif // MOCKCALLBACK_H
InputAction
Input action to be returned from the user interface to control screens and displays.
Definition InputActions.h:22
Interface class to use for callbacks.
Definition CallbackInterface.h:26
virtual void onInputAction(InputAction action)=0
Method to implement to respond to an input action.
virtual void updateScreen(uint8_t screenId, uint8_t row, const char *text)=0
Method to implement updating a screen.
Mock class to test callbacks.
Definition MockCallback.h:25
MOCK_METHOD(void, updateScreen,(uint8_t screenId, uint8_t row, const char *text),())
MOCK_METHOD(void, onInputAction,(InputAction action),())