Adding unit tests for BLE connection.
In order making testing more convenient, this CL does the following refactoring: - Creates a new virtual CreateCharacteristicsFinder in BluetoothLowEnergyConnection; - Starts the connection on BluetoothLowEnergyConnection after a call to Connect() (this was already suggested by tengs@ in a previous CL); - Creates a new protected constructor in BluetoothCharacteristicsFinder; - Mocks for BluetoothCharacteristicsFinder and BluetoothLowEnergyConnection; The unit tests covers the Connect() and Disconnect() execution paths. A second part will cover receiving bytes and Send(). This CL also fixes some small bugs on BluetoothLowEnergyConnection. BUG= Review URL: https://codereview.chromium.org/1144333007 Cr-Commit-Position: refs/heads/master@{#333051}
Showing
This diff is collapsed.
Please register or sign in to comment