Skip to content

Instantly share code, notes, and snippets.

@oxlade39
Created September 24, 2010 14:39
Show Gist options
  • Save oxlade39/595490 to your computer and use it in GitHub Desktop.
Save oxlade39/595490 to your computer and use it in GitHub Desktop.
// where ten().getValue() returns the Integer 10 in 200 millis
@Test public void withoutEventuallyWeGetNull() throws Exception {
assertThat(ten().getValue(), nullValue());
}
@Test public void withEventuallyICanAssertWhatTheValueWillEventuallyReturn() throws Exception {
assertThat(eventually(ten()).getValue(), willReturn(10));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment