MockDeviceConnectionManager
class MockDeviceConnectionManager(initialWillActionSucceed: Boolean = true, deviceWrapper: DeviceWrapper, connectionSettings: ConnectionSettings, coroutineScope: CoroutineScope, setupMocks: Boolean = true) : BaseDeviceConnectionManager
Mock implementation of BaseDeviceConnectionManager
Parameters
initialWillActionSucceed
Sets the initial status of whether actions will succeed
deviceWrapper
The DeviceWrapper to connect to
connectionSettings
The ConnectionSettings to apply for connecting
coroutineScope
The CoroutineScope of the BaseDeviceConnectionManager
setupMocks
If true
this will automatically configure the mocks to handle connecting
Constructors
Link copied to clipboard
constructor(initialWillActionSucceed: Boolean = true, deviceWrapper: DeviceWrapper, connectionSettings: ConnectionSettings, coroutineScope: CoroutineScope, setupMocks: Boolean = true)
Types
Link copied to clipboard
class Builder(initialWillActionSucceed: Boolean = true, setupMocks: Boolean = true) : DeviceConnectionManager.Builder
Mock implementation of DeviceConnectionManager.Builder
Properties
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val handleCurrentActionCompletedMock: MethodMock<PairParameters.Matchers<succeeded: Boolean, deviceAction: DeviceAction?>, PairParameters.MatchersOrCaptor<succeeded: Boolean, deviceAction: DeviceAction?>, PairParameters.Values<succeeded: Boolean, deviceAction: DeviceAction?>, PairParameters<succeeded: Boolean, deviceAction: DeviceAction?>, Unit>
Link copied to clipboard
Link copied to clipboard
val performActionMock: SuspendMethodMock<SingleParameters.Matchers<action: DeviceAction>, SingleParameters.MatchersOrCaptor<action: DeviceAction>, SingleParameters.Values<action: DeviceAction>, SingleParameters<action: DeviceAction>, Unit>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Configure whether a DeviceAction will succeed
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun handleUpdatedCharacteristic(uuid: UUID, succeeded: Boolean, onUpdate: (Characteristic) -> Unit?)
Link copied to clipboard
open override fun handleUpdatedDescriptor(uuid: UUID, succeeded: Boolean, onUpdate: (Descriptor) -> Unit?)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard