xref: /aosp_15_r20/external/openscreen/osp/impl/presentation/testing/mock_connection_delegate.h (revision 3f982cf4871df8771c9d4abe6e9a6f8d829b2736)
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_IMPL_PRESENTATION_TESTING_MOCK_CONNECTION_DELEGATE_H_
6 #define OSP_IMPL_PRESENTATION_TESTING_MOCK_CONNECTION_DELEGATE_H_
7 
8 #include "gmock/gmock.h"
9 #include "osp/public/presentation/presentation_connection.h"
10 
11 namespace openscreen {
12 namespace osp {
13 
14 class MockConnectionDelegate : public Connection::Delegate {
15  public:
16   ~MockConnectionDelegate() override = default;
17 
18   MOCK_METHOD0(OnConnected, void());
19   MOCK_METHOD0(OnClosedByRemote, void());
20   MOCK_METHOD0(OnDiscarded, void());
21   MOCK_METHOD1(OnError, void(const absl::string_view message));
22   MOCK_METHOD0(OnTerminated, void());
23   MOCK_METHOD1(OnStringMessage, void(const absl::string_view message));
24   MOCK_METHOD1(OnBinaryMessage, void(const std::vector<uint8_t>& data));
25 };
26 
27 }  // namespace osp
28 }  // namespace openscreen
29 
30 #endif  // OSP_IMPL_PRESENTATION_TESTING_MOCK_CONNECTION_DELEGATE_H_
31