blob: a20ece0cfa55a258878b68f9daa838873bad2706 [file] [log] [blame]
Chris Masone34af2182011-08-22 11:59:36 -07001// Copyright (c) 2011 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
5#ifndef SHILL_MOCK_IPCONFIG_
6#define SHILL_MOCK_IPCONFIG_
7
Hristo Stefanoved2c28c2011-11-29 15:37:30 -08008#include <string>
9
Darin Petkovef34f182011-08-26 14:14:40 -070010#include <base/basictypes.h>
Chris Masone34af2182011-08-22 11:59:36 -070011#include <gmock/gmock.h>
12
13#include "shill/ipconfig.h"
14
15namespace shill {
Chris Masone34af2182011-08-22 11:59:36 -070016
17class MockIPConfig : public IPConfig {
18 public:
19 MockIPConfig(ControlInterface *control_interface,
Darin Petkovef34f182011-08-26 14:14:40 -070020 const std::string &device_name);
21 virtual ~MockIPConfig();
Chris Masone34af2182011-08-22 11:59:36 -070022
23 MOCK_METHOD0(RequestIP, bool(void));
24 MOCK_METHOD0(RenewIP, bool(void));
25 MOCK_METHOD0(ReleaseIP, bool(void));
26
Hristo Stefanoved2c28c2011-11-29 15:37:30 -080027 MOCK_METHOD2(Load, bool(StoreInterface *storage,
28 const std::string &id_suffix));
29 MOCK_METHOD2(Save, bool(StoreInterface *storage,
30 const std::string &id_suffix));
Darin Petkovef34f182011-08-26 14:14:40 -070031
32 private:
33 DISALLOW_COPY_AND_ASSIGN(MockIPConfig);
Chris Masone34af2182011-08-22 11:59:36 -070034};
35
36} // namespace shill
37
38#endif // SHILL_MOCK_IPCONFIG_