android-components / mozilla.components.support.test

## Package mozilla.components.support.test

### Functions

any | `fun <T> any(): T` Mockito matcher that matches anything, including nulls and varargs.
eq | `fun <T> eq(value: T): T` Mockito matcher that matches if the argument is the same as the provided value.
expectException | `fun <T : Throwable> expectException(clazz: KClass<T>, block: () -> Unit): Unit` Expect block to throw an exception. Otherwise fail the test (junit).
mock | `fun <T : Any> mock(): T` Dynamically create a mock object. This method is helpful when creating mocks of classes using generics.
mockMotionEvent | `fun mockMotionEvent(action: Int, downTime: Long = System.currentTimeMillis(), eventTime: Long = System.currentTimeMillis(), x: Float = 0f, y: Float = 0f, metaState: Int = 0): MotionEvent` Creates a custom MotionEvent for testing. As of SDK 28 MotionEvents can't be mocked anymore and need to be created through MotionEvent.obtain.