ShadowMediaBrowserCompat

@Implements(value = MediaBrowserCompat::class)
class ShadowMediaBrowserCompat

Alternative to the built-in Robolectric shadow org.robolectric.shadows.support.v4.ShadowMediaBrowserCompat with improved connection behavior, and extra verification capabilities.

Can be used as a normal Robolectric shadow:

@Config(shadows = [ShadowMediaBrowserCompat::class])
class MediaBrowserExampleTest : IviTestCase() { /* ... */}

Constructors

Link copied to clipboard
fun ShadowMediaBrowserCompat()

Types

Link copied to clipboard
data class SubscriptionCall(    val parentId: String,     val options: Bundle?,     val callback: MediaBrowserCompat.SubscriptionCallback)

Properties

Link copied to clipboard
var connectionCallback: MediaBrowserCompat.ConnectionCallback? = null
Link copied to clipboard
var isConnected: Boolean = false
Link copied to clipboard
var isDisconnectCalled: Boolean = false
Link copied to clipboard
var isUnsubscribeCalled: Boolean = false
Link copied to clipboard
var searchCallback: MediaBrowserCompat.SearchCallback? = null
Link copied to clipboard
var shadowExtras: Bundle
Link copied to clipboard
var shadowRoot: String
Link copied to clipboard

Functions

Link copied to clipboard
@Implementation
fun connect()
Link copied to clipboard
@Implementation
fun disconnect()
Link copied to clipboard
@Implementation
fun getExtras(): Bundle
Link copied to clipboard
@Implementation
fun getRoot(): String
Link copied to clipboard
@Implementation
fun getSessionToken(): MediaSessionCompat.Token
Link copied to clipboard
@Implementation
fun search(    query: String,     extras: Bundle?,     callback: MediaBrowserCompat.SearchCallback)
Link copied to clipboard
@Implementation
fun subscribe(parentId: String, callback: MediaBrowserCompat.SubscriptionCallback)
@Implementation
fun subscribe(    parentId: String,     options: Bundle,     callback: MediaBrowserCompat.SubscriptionCallback)
Link copied to clipboard
@Implementation
fun unsubscribe(parentId: String)
@Implementation
fun unsubscribe(parentId: String, callback: MediaBrowserCompat.SubscriptionCallback)