blob: e885e2fd562a20bb784ef75011d5f337993ebe31 [file] [log] [blame]
Jay Srinivasan43488792012-06-19 00:25:31 -07001// Copyright (c) 2012 The Chromium OS 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
Gilad Arnoldcf175a02014-07-10 16:48:47 -07005#ifndef UPDATE_ENGINE_MOCK_CONNECTION_MANAGER_H_
6#define UPDATE_ENGINE_MOCK_CONNECTION_MANAGER_H_
Jay Srinivasan43488792012-06-19 00:25:31 -07007
8#include <gmock/gmock.h>
9
Alex Deymof6ee0162015-07-31 12:35:22 -070010#include "update_engine/connection_manager_interface.h"
Jay Srinivasan43488792012-06-19 00:25:31 -070011
12namespace chromeos_update_engine {
13
14// This class mocks the generic interface to the connection manager
15// (e.g FlimFlam, Shill, etc.) to consolidate all connection-related
16// logic in update_engine.
Alex Deymof6ee0162015-07-31 12:35:22 -070017class MockConnectionManager : public ConnectionManagerInterface {
Jay Srinivasan43488792012-06-19 00:25:31 -070018 public:
Alex Deymof6ee0162015-07-31 12:35:22 -070019 MockConnectionManager() = default;
Jay Srinivasan43488792012-06-19 00:25:31 -070020
Alex Deymo30534502015-07-20 15:06:33 -070021 MOCK_METHOD2(GetConnectionProperties,
22 bool(NetworkConnectionType* out_type,
23 NetworkTethering* out_tethering));
Jay Srinivasan43488792012-06-19 00:25:31 -070024
Alex Deymo6ae91202014-03-10 19:21:25 -070025 MOCK_CONST_METHOD2(IsUpdateAllowedOver, bool(NetworkConnectionType type,
26 NetworkTethering tethering));
Jay Srinivasan43488792012-06-19 00:25:31 -070027};
28
29} // namespace chromeos_update_engine
30
Gilad Arnoldcf175a02014-07-10 16:48:47 -070031#endif // UPDATE_ENGINE_MOCK_CONNECTION_MANAGER_H_