Created
October 24, 2017 14:16
-
-
Save fbcbl/4e748dacf8086ed1ca9b8cd5194b3d70 to your computer and use it in GitHub Desktop.
kotlin_testing_pt3_example4
This file contains hidden or 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
@Test | |
fun `an underage user can't drink`() { | |
val ricardo = User( | |
firstName = "Ricardo", | |
lastName = "Trindade", | |
age = 17) | |
val ricardoDrinks = { ricardo.drink() } | |
ricardoDrinks `should throw` UnderageDrinkingException::class | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment