blob: c992e151baf8d59722fe4da59e629ca70d0648d1 [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
Ben Chanc45688b2014-07-02 23:50:45 -07005#ifndef SHILL_MOCK_IPCONFIG_H_
6#define SHILL_MOCK_IPCONFIG_H_
Chris Masone34af2182011-08-22 11:59:36 -07007
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
Thieu Le03026662013-04-04 10:45:11 -070023 MOCK_CONST_METHOD0(properties, const Properties &(void));
Chris Masone34af2182011-08-22 11:59:36 -070024 MOCK_METHOD0(RequestIP, bool(void));
25 MOCK_METHOD0(RenewIP, bool(void));
Paul Stewart217c61d2013-06-13 15:12:02 -070026 MOCK_METHOD1(ReleaseIP, bool(ReleaseReason reason));
Paul Stewartc5099532013-12-12 07:53:15 -080027 MOCK_METHOD0(ResetProperties, void(void));
mukesh agrawal7aed61c2013-04-22 16:01:24 -070028 MOCK_METHOD0(EmitChanges, void(void));
Darin Petkovef34f182011-08-26 14:14:40 -070029
30 private:
Thieu Le03026662013-04-04 10:45:11 -070031 const Properties &real_properties() {
32 return IPConfig::properties();
33 }
34
Darin Petkovef34f182011-08-26 14:14:40 -070035 DISALLOW_COPY_AND_ASSIGN(MockIPConfig);
Chris Masone34af2182011-08-22 11:59:36 -070036};
37
38} // namespace shill
39
Ben Chanc45688b2014-07-02 23:50:45 -070040#endif // SHILL_MOCK_IPCONFIG_H_