Last active
August 29, 2015 14:05
-
-
Save tadams/7da852cad9431db2c0cf 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 class Zombie implements Compares<Zombie> | |
... remainder of Zombie code is unchanged | |
public class Zombie2Test { | |
Zombie walker = new Zombie(WALKER); | |
Zombie fatty = new Zombie(FATTY); | |
@Test | |
public void shouldUseCompareMethods() { | |
assertTrue(walker.isLessThan(fatty)); | |
assertTrue(fatty.isGreaterThan(walker)); | |
assertTrue(fatty.isEqual(fatty)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment