aboutsummaryrefslogtreecommitdiff
path: root/cast/common/channel/test/mock_socket_error_handler.h
blob: 0e32f8c9a431c070b72c1a9648dccc67665dc2f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CAST_COMMON_CHANNEL_TEST_MOCK_SOCKET_ERROR_HANDLER_H_
#define CAST_COMMON_CHANNEL_TEST_MOCK_SOCKET_ERROR_HANDLER_H_

#include "cast/common/channel/virtual_connection_router.h"
#include "gmock/gmock.h"
#include "platform/base/error.h"

using openscreen::Error;

namespace cast {
namespace channel {

class MockSocketErrorHandler
    : public VirtualConnectionRouter::SocketErrorHandler {
 public:
  MOCK_METHOD(void, OnClose, (CastSocket * socket), (override));
  MOCK_METHOD(void, OnError, (CastSocket * socket, Error error), (override));
};

}  // namespace channel
}  // namespace cast

#endif  // CAST_COMMON_CHANNEL_TEST_MOCK_SOCKET_ERROR_HANDLER_H_