• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2015 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 LIBBRILLO_BRILLO_DBUS_MOCK_EXPORTED_OBJECT_MANAGER_H_
6 #define LIBBRILLO_BRILLO_DBUS_MOCK_EXPORTED_OBJECT_MANAGER_H_
7 
8 #include <string>
9 
10 #include <brillo/dbus/async_event_sequencer.h>
11 #include <brillo/dbus/exported_object_manager.h>
12 #include <dbus/object_path.h>
13 #include <gmock/gmock.h>
14 
15 namespace brillo {
16 
17 namespace dbus_utils {
18 
19 class MockExportedObjectManager : public ExportedObjectManager {
20  public:
21   using CompletionAction =
22       brillo::dbus_utils::AsyncEventSequencer::CompletionAction;
23 
24   using ExportedObjectManager::ExportedObjectManager;
25   ~MockExportedObjectManager() override = default;
26 
27   MOCK_METHOD1(RegisterAsync,
28                void(const CompletionAction& completion_callback));
29   MOCK_METHOD3(ClaimInterface,
30                void(const dbus::ObjectPath& path,
31                     const std::string& interface_name,
32                     const ExportedPropertySet::PropertyWriter& writer));
33   MOCK_METHOD2(ReleaseInterface,
34                void(const dbus::ObjectPath& path,
35                     const std::string& interface_name));
36 };
37 
38 }  // namespace dbus_utils
39 
40 }  // namespace brillo
41 
42 #endif  // LIBBRILLO_BRILLO_DBUS_MOCK_EXPORTED_OBJECT_MANAGER_H_
43