Package-level declarations

Types

Link copied to clipboard
abstract class BaseFake

Base class for fakes that provides common utilities for state management and reset capabilities.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class FakeBleConnectionFactory(fakeConnection: FakeBleConnection = FakeBleConnection()) : BleConnectionFactory
Link copied to clipboard
class FakeBleDevice(val address: String, val name: String? = "Fake Device", initialState: BleConnectionState = BleConnectionState.Disconnected()) : BaseFake, BleDevice
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class FakeBleWrite(val characteristic: BleCharacteristic, val data: ByteArray, val writeType: BleWriteType)
Link copied to clipboard

A test double for contact management operations.

Link copied to clipboard

A test double for DatabaseManager that provides a simple implementation and tracks calls.

Link copied to clipboard

A real DatabaseProvider that uses an in-memory database for testing.

Link copied to clipboard

A test double for DeviceHardwareRepository backed by an in-memory map keyed by (hwModel, target).

Link copied to clipboard
Link copied to clipboard

A test double for FirmwareReleaseRepository that exposes stable and alpha releases as kotlinx.coroutines.flow.MutableStateFlows.

Link copied to clipboard
Link copied to clipboard

A test double for LocalStatsDataSource that provides an in-memory implementation.

Link copied to clipboard

A test double for LocationRepository that provides a manual location emission mechanism.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

A test double for MeshLogRepository that provides in-memory log storage.

Link copied to clipboard
Link copied to clipboard

A container for all mesh-related fakes to simplify test setup.

Link copied to clipboard

A test double for MeshServiceNotifications that provides a no-op implementation.

Link copied to clipboard

A test double for NodeRepository that provides an in-memory implementation.

Link copied to clipboard

A test double for message/packet repository operations.

Link copied to clipboard

A test double for QuickChatActionRepository that keeps actions in an in-memory list (sorted by position).

Link copied to clipboard

A test double for RadioConfigRepository backed by in-memory kotlinx.coroutines.flow.MutableStateFlows.

Link copied to clipboard

A test double for RadioController that provides a no-op implementation and tracks calls for assertions in tests.

Link copied to clipboard
class FakeRadioInterfaceService(val serviceScope: CoroutineScope = MainScope()) : RadioInterfaceService

A test double for RadioInterfaceService that provides an in-memory implementation.

Link copied to clipboard
Link copied to clipboard

A test double for RadioTransport that tracks sent data.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Factory for creating test domain objects.

Functions

Link copied to clipboard
actual fun createLocation(latitude: Double, longitude: Double, altitude: Double): Location

Creates an Android Location for testing.

expect fun createLocation(latitude: Double, longitude: Double, altitude: Double = 0.0): Location

Platform-specific factory for creating Location objects in tests.

actual fun createLocation(latitude: Double, longitude: Double, altitude: Double): Location

Creates a placeholder JVM Location for testing.

Link copied to clipboard
fun createTestContact(userId: String = "!test001", name: String = "Test Contact", lastMessageTime: Long = 0): FakeContactRepository.Contact

Test helper for creating test contact objects.

Link copied to clipboard
actual fun setupTestContext()

Initializes platform-specific test context (e.g., Robolectric on Android).

expect fun setupTestContext()

Initializes platform-specific test context (e.g., Robolectric on Android).

actual fun setupTestContext()

Initializes platform-specific test context (e.g., Robolectric on Android).

Link copied to clipboard
inline suspend fun <T> Flow<T>.toList(): List<T>

Collects all emissions from a Flow into a list.