blob: f7bfeddb6e37664d4bc67b5716bd57c14b400813 [file] [log] [blame]
Darin Petkovf42cc1c2010-09-01 09:03:02 -07001// Copyright (c) 2010 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
Alex Deymo8427b4a2014-11-05 14:00:32 -08005#ifndef UPDATE_ENGINE_MOCK_ACTION_H_
6#define UPDATE_ENGINE_MOCK_ACTION_H_
Darin Petkovf42cc1c2010-09-01 09:03:02 -07007
Alex Vakulenkod2779df2014-06-16 13:19:00 -07008#include <string>
9
Darin Petkovf42cc1c2010-09-01 09:03:02 -070010#include <gmock/gmock.h>
11
12#include "update_engine/action.h"
13
14namespace chromeos_update_engine {
15
Alex Deymo8427b4a2014-11-05 14:00:32 -080016class MockAction;
Darin Petkovf42cc1c2010-09-01 09:03:02 -070017
18template<>
Alex Deymo8427b4a2014-11-05 14:00:32 -080019class ActionTraits<MockAction> {
Darin Petkovf42cc1c2010-09-01 09:03:02 -070020 public:
21 typedef NoneType OutputObjectType;
22 typedef NoneType InputObjectType;
23};
24
Alex Deymo8427b4a2014-11-05 14:00:32 -080025class MockAction : public Action<MockAction> {
Darin Petkovf42cc1c2010-09-01 09:03:02 -070026 public:
27 MOCK_METHOD0(PerformAction, void());
28 MOCK_CONST_METHOD0(Type, std::string());
29};
30
31} // namespace chromeos_update_engine
32
Alex Deymo8427b4a2014-11-05 14:00:32 -080033#endif // UPDATE_ENGINE_MOCK_ACTION_H_