blob: 8c5bf31abb216a3487d808859b6738dba73eb929 [file] [log] [blame]
// Copyright 2019 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef DIAGNOSTICS_COMMON_SYSTEM_FAKE_BLUETOOTH_CLIENT_H_
#define DIAGNOSTICS_COMMON_SYSTEM_FAKE_BLUETOOTH_CLIENT_H_
#include <vector>
#include <dbus/object_path.h>
#include <gmock/gmock.h>
#include "diagnostics/common/system/bluetooth_client.h"
namespace diagnostics {
class FakeBluetoothClient : public BluetoothClient {
public:
FakeBluetoothClient();
FakeBluetoothClient(const FakeBluetoothClient&) = delete;
FakeBluetoothClient& operator=(const FakeBluetoothClient&) = delete;
~FakeBluetoothClient() override;
// BluetoothClient overrides:
MOCK_METHOD(std::vector<dbus::ObjectPath>, GetAdapters, (), (override));
MOCK_METHOD(std::vector<dbus::ObjectPath>, GetDevices, (), (override));
MOCK_METHOD(const BluetoothClient::AdapterProperties*,
GetAdapterProperties,
(const dbus::ObjectPath&),
(override));
MOCK_METHOD(const BluetoothClient::DeviceProperties*,
GetDeviceProperties,
(const dbus::ObjectPath&),
(override));
bool HasObserver(Observer* observer) const;
void EmitAdapterAdded(const dbus::ObjectPath& object_path,
const AdapterProperties& properties) const;
void EmitAdapterRemoved(const dbus::ObjectPath& object_path) const;
void EmitAdapterPropertyChanged(const dbus::ObjectPath& object_path,
const AdapterProperties& properties) const;
void EmitDeviceAdded(const dbus::ObjectPath& object_path,
const DeviceProperties& properties) const;
void EmitDeviceRemoved(const dbus::ObjectPath& object_path) const;
void EmitDevicePropertyChanged(const dbus::ObjectPath& object_path,
const DeviceProperties& properties) const;
};
} // namespace diagnostics
#endif // DIAGNOSTICS_COMMON_SYSTEM_FAKE_BLUETOOTH_CLIENT_H_