public class ConnectFailBluetoothGatt extends UnitTestBluetoothGatt
UnitTestBluetoothGatt
which will fail connection attempts. You can set where the failure point is, and the type.Modifier and Type | Class and Description |
---|---|
static class |
ConnectFailBluetoothGatt.FailurePoint
Enumeration used to dictate where in the connection process the failure should happen.
|
static class |
ConnectFailBluetoothGatt.FailureType
Enumeration used to dictate what type of failure should be reported.
|
IBluetoothGatt.DefaultFactory, IBluetoothGatt.Factory
MAX_DELAY_TIME, MIN_DELAY_TIME
DEFAULT_FACTORY
Modifier and Type | Method and Description |
---|---|
void |
setServicesDiscovered()
Posts the response of discovering services to the native callback.
|
void |
setToConnected()
This sets the device state to CONNECTED, and posts the "native" callback
|
void |
setToConnecting()
This sets the device state to CONNECTING, and posts the "native" callback
|
abortReliableWrite, beginReliableWrite, closeGatt, connect, disconnect, discoverServices, equals, executeReliableWrite, getAuthRetryValue, getBleDevice, getBleService, getDelayTime, getGatt, getNativeServiceList, getRssiValue, isGattNull, preDisconnect, readCharacteristic, readDescriptor, readPhy, readRemoteRssi, refreshGatt, requestConnectionPriority, requestMtu, sendReadDescriptorResponse, sendReadResponse, sendWriteDescResponse, sendWriteResponse, setCharacteristicNotification, setCharValue, setDatabase, setDelayTime, setDescValue, setGatt, setGattNull, setPhy, writeCharacteristic, writeDescriptor
public ConnectFailBluetoothGatt(IBleDevice device, ConnectFailBluetoothGatt.FailurePoint failPoint)
ConnectFailBluetoothGatt(IBleDevice, FailurePoint, FailureType)
, which sets the failure type to
ConnectFailBluetoothGatt.FailureType.DISCONNECT_GATT_ERROR
.public ConnectFailBluetoothGatt(IBleDevice device, ConnectFailBluetoothGatt.FailurePoint failPoint, ConnectFailBluetoothGatt.FailureType failType)
ConnectFailBluetoothGatt(IBleDevice, FailurePoint, FailureType, Interval)
which doesn't delay the failure at all.public ConnectFailBluetoothGatt(IBleDevice device, ConnectFailBluetoothGatt.FailurePoint failPoint, ConnectFailBluetoothGatt.FailureType failType, Interval delayTime)
GattDatabase
instance. The ConnectFailBluetoothGatt.FailurePoint
dictates where in the process
the failure will happen, and the ConnectFailBluetoothGatt.FailureType
is the type of failure to simulate.public ConnectFailBluetoothGatt(IBleDevice device, GattDatabase gattDb, ConnectFailBluetoothGatt.FailurePoint failPoint, ConnectFailBluetoothGatt.FailureType failType)
ConnectFailBluetoothGatt(IBleDevice, GattDatabase, FailurePoint, FailureType, Interval)
which doesn't delay the failure at all.public ConnectFailBluetoothGatt(IBleDevice device, GattDatabase gattDb, ConnectFailBluetoothGatt.FailurePoint failPoint, ConnectFailBluetoothGatt.FailureType failType, Interval delayTime)
GattDatabase
instance. The ConnectFailBluetoothGatt.FailurePoint
dictates where in the process
the failure will happen, and the ConnectFailBluetoothGatt.FailureType
is the type of failure to simulate.public void setToConnecting()
UnitTestBluetoothGatt
setToConnecting
in class UnitTestBluetoothGatt
public void setToConnected()
UnitTestBluetoothGatt
setToConnected
in class UnitTestBluetoothGatt
public void setServicesDiscovered()
UnitTestBluetoothGatt
setServicesDiscovered
in class UnitTestBluetoothGatt