MediaRouterTestHelper


class MediaRouterTestHelper


A helper class for testing usages of MediaRouter.

Summary

Public functions

java-static Unit

Resets all internal state of MediaRouter for testing.

Public functions

resetMediaRouter

Added in 1.3.0
@MainThread
java-static fun resetMediaRouter(): Unit

Resets all internal state of MediaRouter for testing. Should be only used for testing purpose.

After calling this method, the caller should stop using the existing media router instances. Instead, the caller should create a new media router instance again by calling getInstance.

Note that the following classes' instances need to be recreated after calling this method, as these classes store the media router instance on their constructor:

Please make sure this is called in the main thread.