xref: /aosp_15_r20/external/libbrillo/brillo/dbus/mock_dbus_object.h (revision 1a96fba65179ea7d3f56207137718607415c5953)
1*1a96fba6SXin Li // Copyright 2014 The Chromium OS Authors. All rights reserved.
2*1a96fba6SXin Li // Use of this source code is governed by a BSD-style license that can be
3*1a96fba6SXin Li // found in the LICENSE file.
4*1a96fba6SXin Li 
5*1a96fba6SXin Li #ifndef LIBBRILLO_BRILLO_DBUS_MOCK_DBUS_OBJECT_H_
6*1a96fba6SXin Li #define LIBBRILLO_BRILLO_DBUS_MOCK_DBUS_OBJECT_H_
7*1a96fba6SXin Li 
8*1a96fba6SXin Li #include <string>
9*1a96fba6SXin Li 
10*1a96fba6SXin Li #include <brillo/dbus/async_event_sequencer.h>
11*1a96fba6SXin Li #include <brillo/dbus/dbus_object.h>
12*1a96fba6SXin Li #include <gmock/gmock.h>
13*1a96fba6SXin Li 
14*1a96fba6SXin Li namespace brillo {
15*1a96fba6SXin Li namespace dbus_utils {
16*1a96fba6SXin Li 
17*1a96fba6SXin Li class MockDBusObject : public DBusObject {
18*1a96fba6SXin Li  public:
MockDBusObject(ExportedObjectManager * object_manager,const scoped_refptr<::dbus::Bus> & bus,const::dbus::ObjectPath & object_path)19*1a96fba6SXin Li   MockDBusObject(ExportedObjectManager* object_manager,
20*1a96fba6SXin Li                  const scoped_refptr<::dbus::Bus>& bus,
21*1a96fba6SXin Li                  const ::dbus::ObjectPath& object_path)
22*1a96fba6SXin Li       : DBusObject(object_manager, bus, object_path) {}
23*1a96fba6SXin Li   ~MockDBusObject() override = default;
24*1a96fba6SXin Li 
25*1a96fba6SXin Li   MOCK_METHOD(void,
26*1a96fba6SXin Li               RegisterAsync,
27*1a96fba6SXin Li               (const AsyncEventSequencer::CompletionAction&),
28*1a96fba6SXin Li               (override));
29*1a96fba6SXin Li };  // class MockDBusObject
30*1a96fba6SXin Li 
31*1a96fba6SXin Li }  // namespace dbus_utils
32*1a96fba6SXin Li }  // namespace brillo
33*1a96fba6SXin Li 
34*1a96fba6SXin Li #endif  // LIBBRILLO_BRILLO_DBUS_MOCK_DBUS_OBJECT_H_
35