Created
October 24, 2017 13:40
-
-
Save fbcbl/0736a497a9bd23a0075faf3c01700a60 to your computer and use it in GitHub Desktop.
kotlin_testing_pt3_test_2
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 `friends are correctly added`() { | |
| val rui = User(firstName = "Rui", lastName = "Gonçalo", age = 28) | |
| val fabio = User(firstName = "Fábio", lastName = "Carballo", age = 26) | |
| rui.addFriend(fabio) | |
| assertEquals(listOf(fabio), rui.friends) | |
| // OR | |
| assertTrue { fabio in rui.friends } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment