1 // Copyright 2019 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef OSP_PUBLIC_TESTING_MESSAGE_DEMUXER_TEST_SUPPORT_H_
6 #define OSP_PUBLIC_TESTING_MESSAGE_DEMUXER_TEST_SUPPORT_H_
7 
8 #include "gmock/gmock.h"
9 #include "osp/public/message_demuxer.h"
10 #include "platform/api/time.h"
11 
12 namespace openscreen {
13 namespace osp {
14 
15 class MockMessageCallback final : public MessageDemuxer::MessageCallback {
16  public:
17   ~MockMessageCallback() override = default;
18 
19   MOCK_METHOD6(OnStreamMessage,
20                ErrorOr<size_t>(uint64_t endpoint_id,
21                                uint64_t connection_id,
22                                msgs::Type message_type,
23                                const uint8_t* buffer,
24                                size_t buffer_size,
25                                Clock::time_point now));
26 };
27 
28 }  // namespace osp
29 }  // namespace openscreen
30 
31 #endif  // OSP_PUBLIC_TESTING_MESSAGE_DEMUXER_TEST_SUPPORT_H_
32