Skip to content

Commit

Permalink
Linted code
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristoferAlexander committed May 8, 2024
1 parent 1aea99c commit 6a09138
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ class MockDeviceBuilder(
/** Setup mocks */
var setupMocks = true

private val _serviceUUIDs = ArrayList<UUID>()
private val serviceUUIDs get() = _serviceUUIDs.toList()
private val serviceUUIDsArray = ArrayList<UUID>()
private val serviceUUIDs get() = serviceUUIDsArray.toList()

/** Delay before connection and disconnection from the MockDevice */
var connectionDelay = 500.milliseconds

/** Add services advertised by the MockDevice */
fun services(builder: ServiceUUIDsList.() -> Unit) = builder(_serviceUUIDs)
fun services(builder: ServiceUUIDsList.() -> Unit) = builder(serviceUUIDsArray)

fun build(): MockDevice = MockDevice(
identifier = identifier,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ class MockDeviceInfoBuilder {
var rssi: RSSI = 0
var manufacturerId: Int? = null
var manufacturerData: ByteArray? = null
private val _serviceUUIDs = ArrayList<UUID>()
private val serviceUUIDs get() = _serviceUUIDs.toList()
private val serviceUUIDsArray = ArrayList<UUID>()
private val serviceUUIDs get() = serviceUUIDsArray.toList()
var serviceData: Map<UUID, ByteArray?> = emptyMap()
var txPowerLevel: TxPower = Int.MIN_VALUE

fun services(builder: ServiceUUIDsList.() -> Unit) = builder(_serviceUUIDs)
fun services(builder: ServiceUUIDsList.() -> Unit) = builder(serviceUUIDsArray)

fun build() = DeviceInfoImpl(
deviceName,
Expand Down

0 comments on commit 6a09138

Please sign in to comment.