Last active
October 9, 2017 10:35
-
-
Save fbcbl/e6405076f9597fbe79bdd3a43d5231aa to your computer and use it in GitHub Desktop.
kotlin_testing_pt2_on_method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun <String> on(methodCall: LocationProvider.() -> String): OngoingStubbing<String> { | |
return try { | |
Mockito.`when`(mock.methodCall()) | |
} catch(e: NullPointerException) { | |
throw Exception(....) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment