| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_SERVICE_H_ | 5 #ifndef DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_SERVICE_H_ |
| 6 #define DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_SERVICE_H_ | 6 #define DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_SERVICE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 // is only for convenience as far as testing is concerned, and it's possible | 49 // is only for convenience as far as testing is concerned, and it's possible |
| 50 // to write test cases without using these functions. | 50 // to write test cases without using these functions. |
| 51 // Example: | 51 // Example: |
| 52 // ON_CALL(*mock_service, GetCharacteristics)) | 52 // ON_CALL(*mock_service, GetCharacteristics)) |
| 53 // .WillByDefault(Invoke( | 53 // .WillByDefault(Invoke( |
| 54 // *mock_service, | 54 // *mock_service, |
| 55 // &MockBluetoothGattService::GetMockCharacteristics)); | 55 // &MockBluetoothGattService::GetMockCharacteristics)); |
| 56 void AddMockCharacteristic( | 56 void AddMockCharacteristic( |
| 57 scoped_ptr<MockBluetoothGattCharacteristic> mock_characteristic); | 57 scoped_ptr<MockBluetoothGattCharacteristic> mock_characteristic); |
| 58 std::vector<BluetoothGattCharacteristic*> GetMockCharacteristics() const; | 58 std::vector<BluetoothGattCharacteristic*> GetMockCharacteristics() const; |
| 59 BluetoothGattCharacteristic* GetMockCharacteristic( |
| 60 const std::string& identifier) const; |
| 59 | 61 |
| 60 private: | 62 private: |
| 61 ScopedVector<MockBluetoothGattCharacteristic> mock_characteristics_; | 63 ScopedVector<MockBluetoothGattCharacteristic> mock_characteristics_; |
| 62 | 64 |
| 63 DISALLOW_COPY_AND_ASSIGN(MockBluetoothGattService); | 65 DISALLOW_COPY_AND_ASSIGN(MockBluetoothGattService); |
| 64 }; | 66 }; |
| 65 | 67 |
| 66 } // namespace device | 68 } // namespace device |
| 67 | 69 |
| 68 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_SERVICE_H_ | 70 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_SERVICE_H_ |
| OLD | NEW |