1 // Copyright 2015 The Weave 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 LIBWEAVE_INCLUDE_WEAVE_PROVIDER_TEST_MOCK_NETWORK_H_ 6 #define LIBWEAVE_INCLUDE_WEAVE_PROVIDER_TEST_MOCK_NETWORK_H_ 7 8 #include <weave/provider/network.h> 9 10 #include <string> 11 12 #include <gmock/gmock.h> 13 14 namespace weave { 15 namespace provider { 16 namespace test { 17 18 class MockNetwork : public Network { 19 public: 20 MOCK_METHOD1(AddConnectionChangedCallback, 21 void(const ConnectionChangedCallback&)); 22 MOCK_CONST_METHOD0(GetConnectionState, State()); 23 MOCK_METHOD3(OpenSslSocket, 24 void(const std::string&, 25 uint16_t, 26 const OpenSslSocketCallback&)); 27 }; 28 29 } // namespace test 30 } // namespace provider 31 } // namespace weave 32 33 #endif // LIBWEAVE_INCLUDE_WEAVE_PROVIDER_TEST_MOCK_NETWORK_H_ 34