| Index: device/bluetooth/test/mock_bluetooth_gatt_characteristic.cc
|
| diff --git a/device/bluetooth/test/mock_bluetooth_gatt_characteristic.cc b/device/bluetooth/test/mock_bluetooth_gatt_characteristic.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..5cc4da3fa97aad630eb21f48b6eccb3771bb3ae7
|
| --- /dev/null
|
| +++ b/device/bluetooth/test/mock_bluetooth_gatt_characteristic.cc
|
| @@ -0,0 +1,37 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "device/bluetooth/test/mock_bluetooth_gatt_characteristic.h"
|
| +
|
| +#include "device/bluetooth/test/mock_bluetooth_gatt_service.h"
|
| +
|
| +using testing::Return;
|
| +using testing::ReturnRefOfCopy;
|
| +using testing::_;
|
| +
|
| +namespace device {
|
| +
|
| +MockBluetoothGattCharacteristic::MockBluetoothGattCharacteristic(
|
| + MockBluetoothGattService* service,
|
| + const std::string& identifier,
|
| + const BluetoothUUID& uuid,
|
| + bool is_local,
|
| + Properties properties,
|
| + Permissions permissions) {
|
| + ON_CALL(*this, GetIdentifier()).WillByDefault(Return(identifier));
|
| + ON_CALL(*this, GetUUID()).WillByDefault(Return(uuid));
|
| + ON_CALL(*this, IsLocal()).WillByDefault(Return(is_local));
|
| + ON_CALL(*this, GetValue())
|
| + .WillByDefault(ReturnRefOfCopy(std::vector<uint8>()));
|
| + ON_CALL(*this, GetService()).WillByDefault(Return(service));
|
| + ON_CALL(*this, GetProperties()).WillByDefault(Return(properties));
|
| + ON_CALL(*this, GetPermissions()).WillByDefault(Return(permissions));
|
| + ON_CALL(*this, GetDescriptors())
|
| + .WillByDefault(Return(std::vector<BluetoothGattDescriptor*>()));
|
| +}
|
| +
|
| +MockBluetoothGattCharacteristic::~MockBluetoothGattCharacteristic() {
|
| +}
|
| +
|
| +} // namespace device
|
|
|