Thunderbots Project
Loading...
Searching...
No Matches
mock_uart_communication.h
1#pragma once
2
3#include "uart_communication.h"
4
5
6/*
7 * A mock of UartCommunication class used for testing purposes
8 */
9
11{
12 public:
13 MockUart(){};
14 ~MockUart(){};
15 MOCK_METHOD1(serialWrite, bool(const std::vector<unsigned char> &write_val));
16 MOCK_METHOD1(serialRead, std::vector<unsigned char>(size_t num_read_bytes));
17 MOCK_METHOD1(flushSerialPort, bool(FlushType flush_type));
18};
Definition mock_uart_communication.h:11
Definition uart_communication.h:10
virtual bool serialWrite(const std::vector< unsigned char > &write_val)=0
virtual std::vector< unsigned char > serialRead(size_t num_read_bytes)=0
virtual bool flushSerialPort(FlushType flush_type)=0