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_METHOD(void, RegisterAsync, (const CompletionAction&), (override)); 28 MOCK_METHOD(void, 29 ClaimInterface, 30 (const ::dbus::ObjectPath&, 31 const std::string&, 32 const ExportedPropertySet::PropertyWriter&), 33 (override)); 34 MOCK_METHOD(void, 35 ReleaseInterface, 36 (const ::dbus::ObjectPath&, const std::string&), 37 (override)); 38 }; 39 40 } // namespace dbus_utils 41 42 } // namespace brillo 43 44 #endif // LIBBRILLO_BRILLO_DBUS_MOCK_EXPORTED_OBJECT_MANAGER_H_ 45