Package-level declarations

This TomTom-internal package contains tooling for unit and instrumented tests of media domain components.

Types

Link copied to clipboard

Provides a fake MediaControlContext, and MutableLiveDatas to adjust its contents for a test.

Link copied to clipboard
@IviExperimental(reasons = [])
class FakeSourceInfo(context: Context, sourceId: SourceId)

Provides a fake SourceInfo, and MutableLiveDatas to adjust its contents for a test.

Functions

Link copied to clipboard
@IviExperimental(reasons = [])
fun createMediaConfiguration(sourceToPolicyProviderMap: Map<SourceId, PolicyProvider> = emptyMap(), fallbackPolicyProvider: PolicyProvider = PolicyProvider()): MediaConfiguration

Provides a convenient way to create a customized MediaConfiguration with custom source policies for test purposes.

Link copied to clipboard
@IviExperimental(reasons = [])
fun createMediaItem(id: String? = null, mediaUri: String? = null, title: String? = null, subtitle: String? = null, groupTitleHint: String? = null, album: String? = null, artist: String? = null, compilation: String? = null, artUri: String? = null, iconArtUri: String? = null, duration: Duration? = null, browsable: Boolean = false, playable: Boolean = false): IviMediaItem

Create an IviMediaItem for testing use.

Link copied to clipboard
operator fun Duration.div(other: Duration): Double

Operator to divide a Duration by an other, when returning a Double is necessary.

Link copied to clipboard
Link copied to clipboard
operator fun Duration.times(fraction: Double): Duration

Operator to multiply a Duration by an fraction.