Skip to content

Instantly share code, notes, and snippets.

@igor-brishkoski
Created January 13, 2019 21:11
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 igor-brishkoski/81cc4643130d3188e59764601930d2ba to your computer and use it in GitHub Desktop.
Save igor-brishkoski/81cc4643130d3188e59764601930d2ba to your computer and use it in GitHub Desktop.
abstract class BaseTest {
val createPost = robotRunner(CreatePostRobot::class)
private fun <T : BaseRobot> robotRunner(cls: KClass<T>) = { func: T.() -> Unit ->
cls.createInstance().apply {
func()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment