blob: 62c74554a18af51b49a13ca3bd8bd08618629c57 [file] [log] [blame]
mukesh agrawalae30e9e2013-05-28 14:09:16 -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_EXTERNAL_TASK_H_
6#define SHILL_MOCK_EXTERNAL_TASK_H_
7
8#include <gmock/gmock.h>
9
10#include "shill/external_task.h"
11
12namespace shill {
13
14class MockExternalTask : public ExternalTask {
15public:
16 MockExternalTask(ControlInterface *control,
17 GLib *glib,
18 const base::WeakPtr<RPCTaskDelegate> &task_delegate,
19 const base::Callback<void(pid_t, int)> &death_callback);
20 virtual ~MockExternalTask();
21
mukesh agrawalc4f9aa02013-08-15 19:23:13 -070022 MOCK_METHOD5(Start,
mukesh agrawalae30e9e2013-05-28 14:09:16 -070023 bool(const base::FilePath &file,
24 const std::vector<std::string> &arguments,
25 const std::map<std::string, std::string> &environment,
mukesh agrawalc4f9aa02013-08-15 19:23:13 -070026 bool terminate_with_parent,
mukesh agrawalae30e9e2013-05-28 14:09:16 -070027 Error *error));
28 MOCK_METHOD0(Stop, void());
29 MOCK_METHOD0(OnDelete, void());
30
31private:
32 DISALLOW_COPY_AND_ASSIGN(MockExternalTask);
33};
34
35} // namespace shill
36
37#endif // SHILL_MOCK_EXTERNAL_TASK_H_