FakeUserPreferencesDataSource
class FakeUserPreferencesDataSource(initial: UserDataPreferences = UserDataPreferences()) : UserPreferencesDataSource(source)
In-memory UserPreferencesDataSource for tests.
A fake rather than a mock: it holds real state in a MutableStateFlow, so a test can write through the interface and then assert on what a collector observes. That is the behaviour that matters for a DataStore-backed source, and mocks cannot express it.
Parameters
initial
The state to start from.
Properties
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open suspend override fun setDarkThemeConfig(darkThemeConfigPreferences: DarkThemeConfigPreferences)
Link copied to clipboard
Link copied to clipboard