Created
April 24, 2017 14:27
-
-
Save Gregliest/1c2e6b00a53c27173fe7d391b19947a9 to your computer and use it in GitHub Desktop.
A simple vanilla JUnit example.
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 ClimberTest { | |
private climber; | |
@Before | |
void setup() { | |
climber = new Climber(); | |
} | |
@Test | |
public void testHasRopeWithRope() { | |
climber.setRope(new SterlingRope()); | |
assertTrue(climber.hasRope()); | |
} | |
@Test | |
public void testHasRopeNoRope() { | |
assertFalse(climber.hasRope()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment