Alex Vakulenko | e4eec20 | 2017-01-27 14:41:04 -0800 | [diff] [blame^] | 1 | #ifndef ANDROID_PDX_MOCK_MESSAGE_READER_H_ |
| 2 | #define ANDROID_PDX_MOCK_MESSAGE_READER_H_ |
| 3 | |
| 4 | #include <gmock/gmock.h> |
| 5 | #include <pdx/message_reader.h> |
| 6 | |
| 7 | namespace android { |
| 8 | namespace pdx { |
| 9 | |
| 10 | class MockInputResourceMapper : public InputResourceMapper { |
| 11 | public: |
| 12 | MOCK_METHOD2(GetFileHandle, bool(FileReference ref, LocalHandle* handle)); |
| 13 | MOCK_METHOD2(GetChannelHandle, |
| 14 | bool(ChannelReference ref, LocalChannelHandle* handle)); |
| 15 | }; |
| 16 | |
| 17 | class MockMessageReader : public MessageReader { |
| 18 | public: |
| 19 | MOCK_METHOD0(GetNextReadBufferSection, BufferSection()); |
| 20 | MOCK_METHOD1(ConsumeReadBufferSectionData, void(const void* new_start)); |
| 21 | MOCK_METHOD0(GetInputResourceMapper, InputResourceMapper*()); |
| 22 | }; |
| 23 | |
| 24 | } // namespace pdx |
| 25 | } // namespace android |
| 26 | |
| 27 | #endif // ANDROID_PDX_MOCK_MESSAGE_READER_H_ |