Created
November 5, 2009 02:08
-
-
Save mwanji/226640 to your computer and use it in GitHub Desktop.
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
public String convenient(Object o) { | |
return lessConvenient(o, "default"); | |
} | |
public String lessConvenient(Object o, String suffix) { | |
return o.toString() + suffix; | |
} | |
// Unit tests | |
// assume lessConvenient is already tested | |
@Test | |
public void convenient_should_invoke_lessConvenient_with_default_suffix() { | |
Object o = "word"; | |
assertEquals(lessConvenient(o, "default"), convenient(o)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment