mukesh agrawal | ae30e9e | 2013-05-28 14:09:16 -0700 | [diff] [blame] | 1 | // 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 | |
| 12 | namespace shill { |
| 13 | |
| 14 | class MockExternalTask : public ExternalTask { |
| 15 | public: |
| 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 | |
| 22 | MOCK_METHOD4(Start, |
| 23 | bool(const base::FilePath &file, |
| 24 | const std::vector<std::string> &arguments, |
| 25 | const std::map<std::string, std::string> &environment, |
| 26 | Error *error)); |
| 27 | MOCK_METHOD0(Stop, void()); |
| 28 | MOCK_METHOD0(OnDelete, void()); |
| 29 | |
| 30 | private: |
| 31 | DISALLOW_COPY_AND_ASSIGN(MockExternalTask); |
| 32 | }; |
| 33 | |
| 34 | } // namespace shill |
| 35 | |
| 36 | #endif // SHILL_MOCK_EXTERNAL_TASK_H_ |