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 CAST_COMMON_CHANNEL_TESTING_MOCK_SOCKET_ERROR_HANDLER_H_ 6 #define CAST_COMMON_CHANNEL_TESTING_MOCK_SOCKET_ERROR_HANDLER_H_ 7 8 #include "cast/common/channel/virtual_connection_router.h" 9 #include "gmock/gmock.h" 10 #include "platform/base/error.h" 11 12 namespace openscreen { 13 namespace cast { 14 15 class MockSocketErrorHandler 16 : public VirtualConnectionRouter::SocketErrorHandler { 17 public: 18 MOCK_METHOD(void, OnClose, (CastSocket * socket), (override)); 19 MOCK_METHOD(void, OnError, (CastSocket * socket, Error error), (override)); 20 }; 21 22 } // namespace cast 23 } // namespace openscreen 24 25 #endif // CAST_COMMON_CHANNEL_TESTING_MOCK_SOCKET_ERROR_HANDLER_H_ 26