Skip to content

Instantly share code, notes, and snippets.

@Gregliest
Created April 24, 2017 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Gregliest/1c2e6b00a53c27173fe7d391b19947a9 to your computer and use it in GitHub Desktop.
Save Gregliest/1c2e6b00a53c27173fe7d391b19947a9 to your computer and use it in GitHub Desktop.
A simple vanilla JUnit example.
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