injectNow

fun MockspressoInstance.injectNow(instance: Any)

Perform field and method injection on an object that's been created outside the context of mockspresso.

WARNING: this method will throw an IllegalArgumentException immediately if instance is not a concrete class. To inject generics use the alternate signature of injectNow that accepts a TypeToken


fun <T : Any> MockspressoInstance.injectNow(instance: T, token: TypeToken<T>)

Perform field and method injection on an object that's been created outside the context of mockspresso. This method is safe to use with generic objects