@Test public void testOnError() { writeCommand.execute(device, operationCommandObserver, gatt); reset(operationCommandObserver, commandObserver); writeCommand.onError(BluetoothGatt.GATT_FAILURE); verifyCommandFail(); }
@Override protected void onError(int error) { NeatleLogger.e("Unexpected error while writing [" + error + "]"); finish(CommandResult.createErrorResult(characteristicUUID, error)); if (asyncMode && readerThread != null) { readerThread.interrupt(); } }
WriteCommand extends SingleCharacteristicsCommand { @Override protected void onError(int error) { NeatleLogger.e("Unexpected error while writing [" + error + "]"); finish(CommandResult.createErrorResult(characteristicUUID, error)); if (asyncMode && readerThread != null) { readerThread.interrupt(); } } }
WriteCommand extends SingleCharacteristicsCommand { @Override protected void onError(int error) { NeatleLogger.e("Unexpected error while writing [" + error + "]"); finish(CommandResult.createErrorResult(characteristicUUID, error)); if (asyncMode && readerThread != null) { readerThread.interrupt(); } } WriteCommand(UUID serviceUUID, UUID characteristicsUUID, int writeType, InputSource buffer, CommandObserver observer); }
WriteCommand extends SingleCharacteristicsCommand { @Override protected void onError(int error) { NeatleLogger.e("Unexpected error while writing [" + error + "]"); finish(CommandResult.createErrorResult(characteristicUUID, error)); if (asyncMode && readerThread != null) { readerThread.interrupt(); } } WriteCommand(UUID serviceUUID, UUID characteristicsUUID, int writeType, InputSource buffer, CommandObserver observer); @Override String toString(); }
WriteCommand extends SingleCharacteristicsCommand { @Override protected void onError(int error) { NeatleLogger.e("Unexpected error while writing [" + error + "]"); finish(CommandResult.createErrorResult(characteristicUUID, error)); if (asyncMode && readerThread != null) { readerThread.interrupt(); } } WriteCommand(UUID serviceUUID, UUID characteristicsUUID, int writeType, InputSource buffer, CommandObserver observer); @Override String toString();  }