Skip to content

Instantly share code, notes, and snippets.

@maskaravivek
Created May 17, 2018 19:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maskaravivek/026efea86022fca28da94677787dad40 to your computer and use it in GitHub Desktop.
Save maskaravivek/026efea86022fca28da94677787dad40 to your computer and use it in GitHub Desktop.
class MockTestRunner : AndroidJUnitRunner() {
override fun onCreate(arguments: Bundle) {
StrictMode.setThreadPolicy(StrictMode.ThreadPolicy.Builder().permitAll().build())
super.onCreate(arguments)
}
@Throws(InstantiationException::class, IllegalAccessException::class, ClassNotFoundException::class)
override fun newApplication(cl: ClassLoader, className: String, context: Context): Application {
return super.newApplication(cl, TestExamplesApplication::class.java.name, context)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment