FakeRadioConfigRepository

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

All mutator methods update the underlying state flows synchronously so tests can observe changes immediately. deviceProfileFlow is derived from localConfigFlow, moduleConfigFlow, and the current channel set.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open override val channelSetFlow: Flow<ChannelSet>
Link copied to clipboard
val currentChannelSet: ChannelSet
Link copied to clipboard
val currentDeviceProfile: DeviceProfile
Link copied to clipboard
val currentDeviceUIConfig: DeviceUIConfig?
Link copied to clipboard
val currentFileManifest: List<FileInfo>
Link copied to clipboard
val currentLocalConfig: LocalConfig
Link copied to clipboard
val currentModuleConfig: LocalModuleConfig
Link copied to clipboard
open override val deviceProfileFlow: Flow<DeviceProfile>
Link copied to clipboard
open override val deviceUIConfigFlow: Flow<DeviceUIConfig?>
Link copied to clipboard
open override val fileManifestFlow: Flow<List<FileInfo>>
Link copied to clipboard
var lastSetLocalConfig: Config?

Last Config passed to setLocalConfig (null until called). Tests should use setLocalConfigDirect to drive state.

Link copied to clipboard
var lastSetModuleConfig: ModuleConfig?

Last ModuleConfig passed to setLocalModuleConfig (null until called).

Link copied to clipboard
open override val localConfigFlow: Flow<LocalConfig>
Link copied to clipboard
open override val moduleConfigFlow: Flow<LocalModuleConfig>

Functions

Link copied to clipboard
open suspend override fun addFileInfo(info: FileInfo)
Link copied to clipboard
open suspend override fun clearChannelSet()
Link copied to clipboard
open suspend override fun clearDeviceUIConfig()
Link copied to clipboard
open suspend override fun clearFileManifest()
Link copied to clipboard
open suspend override fun clearLocalConfig()
Link copied to clipboard
open suspend override fun clearLocalModuleConfig()
Link copied to clipboard
open suspend override fun replaceAllSettings(settingsList: List<ChannelSettings>)
Link copied to clipboard
open fun reset()

Resets all registered state flows and custom actions to their initial state.

Link copied to clipboard
fun setChannelSet(channelSet: ChannelSet)

Directly sets the ChannelSet (bypasses updateChannelSettings/replaceAllSettings).

Link copied to clipboard
fun setDeviceProfile(profile: DeviceProfile)

Directly sets the combined DeviceProfile emitted by deviceProfileFlow.

Link copied to clipboard
open suspend override fun setDeviceUIConfig(config: DeviceUIConfig)
Link copied to clipboard
open suspend override fun setLocalConfig(config: Config)
Link copied to clipboard
fun setLocalConfigDirect(config: LocalConfig)

Directly sets the LocalConfig without merging (preferred for test setup).

Link copied to clipboard
open suspend override fun setLocalModuleConfig(config: ModuleConfig)
Link copied to clipboard
fun setLocalModuleConfigDirect(config: LocalModuleConfig)

Directly sets the LocalModuleConfig without merging (preferred for test setup).

Link copied to clipboard
open suspend override fun updateChannelSettings(channel: Channel)