MockBluetoothService

class MockBluetoothService(val discoveredDevicesFlow: MutableStateFlow<List<Device>> = MutableStateFlow(emptyList()), val filteredDevicesFlow: MutableStateFlow<Map<Filter, List<Device>>> = MutableStateFlow(emptyMap()), val pairedDevicesFlow: MutableStateFlow<Map<Set<UUID>, List<Device>>> = MutableStateFlow(emptyMap()), val isEnabled: MutableStateFlow<Boolean> = MutableStateFlow(true), setupMocks: Boolean = true) : BluetoothService

Constructors

Link copied to clipboard
constructor(discoveredDevicesFlow: MutableStateFlow<List<Device>> = MutableStateFlow(emptyList()), filteredDevicesFlow: MutableStateFlow<Map<Filter, List<Device>>> = MutableStateFlow(emptyMap()), pairedDevicesFlow: MutableStateFlow<Map<Set<UUID>, List<Device>>> = MutableStateFlow(emptyMap()), isEnabled: MutableStateFlow<Boolean> = MutableStateFlow(true), setupMocks: Boolean = true)

Properties

Link copied to clipboard
var currentFilter: MutableStateFlow<Filter>
Link copied to clipboard
val discoveredDevicesFlow: MutableStateFlow<List<Device>>
Link copied to clipboard
val filteredDevicesFlow: MutableStateFlow<Map<Filter, List<Device>>>
Link copied to clipboard
open override val isEnabled: MutableStateFlow<Boolean>
Link copied to clipboard
val pairedDevicesFlow: MutableStateFlow<Map<Set<UUID>, List<Device>>>
Link copied to clipboard
val pairedDevicesMock: MethodMock<TripleParameters.Matchers<Filter, removeForAllPairedFilters: Boolean, connectionSettings: ConnectionSettings?>, TripleParameters.MatchersOrCaptor<Filter, removeForAllPairedFilters: Boolean, connectionSettings: ConnectionSettings?>, TripleParameters.Values<Filter, removeForAllPairedFilters: Boolean, connectionSettings: ConnectionSettings?>, TripleParameters<Filter, removeForAllPairedFilters: Boolean, connectionSettings: ConnectionSettings?>, Flow<List<Device>>>

Functions

Link copied to clipboard
open override fun allDevices(): Flow<List<Device>>
Link copied to clipboard
open override fun devices(): Flow<List<Device>>
Link copied to clipboard
open suspend override fun isScanning(): Flow<Boolean>
Link copied to clipboard
open override fun pairedDevices(filter: Filter, removeForAllPairedFilters: Boolean, connectionSettings: ConnectionSettings?): Flow<List<Device>>
Link copied to clipboard
open override fun scannedDevices(filter: Filter): Flow<List<Device>>
Link copied to clipboard
open override fun startScanning(filter: Filter, cleanMode: BluetoothService.CleanMode, connectionSettings: ConnectionSettings?)
Link copied to clipboard
open override fun stopScanning(cleanMode: BluetoothService.CleanMode)