1 // Copyright 2014 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_DBUS_OBJECT_H_ 6 #define LIBBRILLO_BRILLO_DBUS_MOCK_DBUS_OBJECT_H_ 7 8 #include <string> 9 10 #include <brillo/dbus/async_event_sequencer.h> 11 #include <brillo/dbus/dbus_object.h> 12 #include <gmock/gmock.h> 13 14 namespace brillo { 15 namespace dbus_utils { 16 17 class MockDBusObject : public DBusObject { 18 public: MockDBusObject(ExportedObjectManager * object_manager,const scoped_refptr<::dbus::Bus> & bus,const::dbus::ObjectPath & object_path)19 MockDBusObject(ExportedObjectManager* object_manager, 20 const scoped_refptr<::dbus::Bus>& bus, 21 const ::dbus::ObjectPath& object_path) 22 : DBusObject(object_manager, bus, object_path) {} 23 ~MockDBusObject() override = default; 24 25 MOCK_METHOD(void, 26 RegisterAsync, 27 (const AsyncEventSequencer::CompletionAction&), 28 (override)); 29 }; // class MockDBusObject 30 31 } // namespace dbus_utils 32 } // namespace brillo 33 34 #endif // LIBBRILLO_BRILLO_DBUS_MOCK_DBUS_OBJECT_H_ 35