blob: 8ebbc2fb63a253bcb379d29b2639d52b83d676dc [file] [log] [blame]
Paul Stewart1b1a7f22012-01-06 16:24:06 -08001// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
Chris Masone7aa5f902011-07-11 11:13:35 -07002// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
Wade Guthrie60a37062013-04-02 11:39:09 -07005#ifndef SHILL_MOCK_PROFILE_H_
6#define SHILL_MOCK_PROFILE_H_
Chris Masone7aa5f902011-07-11 11:13:35 -07007
8#include <string>
9
10#include <gmock/gmock.h>
11
12#include "shill/profile.h"
Ben Chand6a8b512014-11-18 10:45:15 -080013#include "shill/wifi/wifi_provider.h"
Chris Masone7aa5f902011-07-11 11:13:35 -070014
Chris Masone7aa5f902011-07-11 11:13:35 -070015namespace shill {
16
Chris Masone7aa5f902011-07-11 11:13:35 -070017class MockProfile : public Profile {
18 public:
Paul Stewart1e006c62015-06-16 12:29:06 -070019 MockProfile(ControlInterface* control, Metrics* metrics, Manager* manager);
20 MockProfile(ControlInterface* control,
21 Metrics* metrics,
22 Manager* manager,
23 const std::string& identifier);
Ben Chan5ea763b2014-08-13 11:07:54 -070024 ~MockProfile() override;
Chris Masone7aa5f902011-07-11 11:13:35 -070025
Paul Stewart1e006c62015-06-16 12:29:06 -070026 MOCK_METHOD1(AdoptService, bool(const ServiceRefPtr& service));
27 MOCK_METHOD1(AbandonService, bool(const ServiceRefPtr& service));
28 MOCK_METHOD1(LoadService, bool(const ServiceRefPtr& service));
29 MOCK_METHOD1(ConfigureService, bool(const ServiceRefPtr& service));
30 MOCK_METHOD1(ConfigureDevice, bool(const DeviceRefPtr& device));
31 MOCK_METHOD2(DeleteEntry, void(const std::string& entry_name, Error* error));
Paul Stewart1b1a7f22012-01-06 16:24:06 -080032 MOCK_METHOD0(GetRpcIdentifier, std::string());
Paul Stewart1e006c62015-06-16 12:29:06 -070033 MOCK_METHOD1(GetStoragePath, bool(base::FilePath* filepath));
34 MOCK_METHOD1(UpdateService, bool(const ServiceRefPtr& service));
35 MOCK_METHOD1(UpdateDevice, bool(const DeviceRefPtr& device));
36 MOCK_METHOD1(UpdateWiFiProvider, bool(const WiFiProvider& wifi_provider));
Chris Masoneb9c00592011-10-06 13:10:39 -070037 MOCK_METHOD0(Save, bool());
Paul Stewart1e006c62015-06-16 12:29:06 -070038 MOCK_METHOD0(GetStorage, StoreInterface*());
39 MOCK_CONST_METHOD0(GetConstStorage, const StoreInterface*());
mukesh agrawal98424412014-09-30 15:21:52 -070040 MOCK_CONST_METHOD0(IsDefault, bool());
Chris Masone9d779932011-08-25 16:33:41 -070041
Chris Masone7aa5f902011-07-11 11:13:35 -070042 private:
43 DISALLOW_COPY_AND_ASSIGN(MockProfile);
44};
45
46} // namespace shill
47
Wade Guthrie60a37062013-04-02 11:39:09 -070048#endif // SHILL_MOCK_PROFILE_H_