1010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)// Copyright 2014 The Chromium Authors. All rights reserved. 2010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 3010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)// found in the LICENSE file. 4010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) 5010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)#include "device/bluetooth/test/mock_bluetooth_gatt_characteristic.h" 6010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) 7010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)#include "device/bluetooth/test/mock_bluetooth_gatt_service.h" 8010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) 9010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)using testing::Return; 10010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)using testing::ReturnRefOfCopy; 11010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)using testing::_; 12010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) 13010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)namespace device { 14010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) 15010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)MockBluetoothGattCharacteristic::MockBluetoothGattCharacteristic( 16010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) MockBluetoothGattService* service, 17010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) const std::string& identifier, 18010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) const BluetoothUUID& uuid, 19010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) bool is_local, 20010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) Properties properties, 21010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) Permissions permissions) { 22010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) ON_CALL(*this, GetIdentifier()).WillByDefault(Return(identifier)); 23010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) ON_CALL(*this, GetUUID()).WillByDefault(Return(uuid)); 24010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) ON_CALL(*this, IsLocal()).WillByDefault(Return(is_local)); 25010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) ON_CALL(*this, GetValue()) 26010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) .WillByDefault(ReturnRefOfCopy(std::vector<uint8>())); 27010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) ON_CALL(*this, GetService()).WillByDefault(Return(service)); 28010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) ON_CALL(*this, GetProperties()).WillByDefault(Return(properties)); 29010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) ON_CALL(*this, GetPermissions()).WillByDefault(Return(permissions)); 30116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch ON_CALL(*this, IsNotifying()).WillByDefault(Return(false)); 31010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) ON_CALL(*this, GetDescriptors()) 32010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) .WillByDefault(Return(std::vector<BluetoothGattDescriptor*>())); 33010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)} 34010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) 35010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)MockBluetoothGattCharacteristic::~MockBluetoothGattCharacteristic() { 36010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)} 37010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) 38010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)} // namespace device 39