Last active
October 8, 2017 18:33
-
-
Save fbcbl/b90f9907b403c119701a0285dff24293 to your computer and use it in GitHub Desktop.
kotlin_testing_pt2_improvement_1
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
class GreeterTest { | |
var user: User = mock() | |
val tested = Greeter(user) | |
@Test | |
fun englishGreetIsCorrect() { | |
Mockito.`when`(user.fullName()).thenReturn("Fábio Carballo") | |
assertEquals("Hello, Fábio Carballo!", tested.getEnglishGreeting()) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment