blob: b2640f2214bcbdb53985e15a5b91b2b3dde1b90d [file] [log] [blame]
mukesh agrawalf407d592013-07-31 11:37:57 -07001// Copyright (c) 2013 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_PPP_DEVICE_FACTORY_H_
6#define SHILL_MOCK_PPP_DEVICE_FACTORY_H_
7
Alex Vakulenko8a532292014-06-16 17:18:44 -07008#include <string>
9
mukesh agrawalf407d592013-07-31 11:37:57 -070010#include <base/lazy_instance.h>
11#include <gmock/gmock.h>
12
13#include "shill/ppp_device_factory.h"
14
15namespace shill {
16
17class MockPPPDeviceFactory : public PPPDeviceFactory {
18 public:
Alex Vakulenko016fa0e2014-08-11 15:59:58 -070019 ~MockPPPDeviceFactory() override;
mukesh agrawalf407d592013-07-31 11:37:57 -070020
21 // This is a singleton. Use MockPPPDeviceFactory::GetInstance()->Foo().
Paul Stewart1e006c62015-06-16 12:29:06 -070022 static MockPPPDeviceFactory* GetInstance();
mukesh agrawalf407d592013-07-31 11:37:57 -070023
24 MOCK_METHOD6(CreatePPPDevice,
Paul Stewart1e006c62015-06-16 12:29:06 -070025 PPPDevice* (ControlInterface* control,
26 EventDispatcher* dispatcher,
27 Metrics* metrics,
28 Manager* manager,
29 const std::string& link_name,
mukesh agrawalf407d592013-07-31 11:37:57 -070030 int interface_index));
31
32 protected:
33 MockPPPDeviceFactory();
34
35 private:
36 friend struct base::DefaultLazyInstanceTraits<MockPPPDeviceFactory>;
37
38 DISALLOW_COPY_AND_ASSIGN(MockPPPDeviceFactory);
39};
40
41} // namespace shill
42
43#endif // SHILL_MOCK_PPP_DEVICE_FACTORY_H_