Skip to content

Instantly share code, notes, and snippets.

@rowanl
Created January 17, 2018 20:14
Show Gist options
  • Save rowanl/deca11efc59d70b0bf6e8e70afd5940d to your computer and use it in GitHub Desktop.
Save rowanl/deca11efc59d70b0bf6e8e70afd5940d to your computer and use it in GitHub Desktop.
playframework-kubernetes - Testing Ebean queries using BDD
@Test
public void Given_CharityObjectsExist_When_FindListIsCalled_Then_AllCharityObjectsAreReturned() {
// GIVEN
rangeClosed(1, 4).boxed().map(Charity::new).forEach(Model::save);
// WHEN
List<Charity> result = repository.findList().toCompletableFuture().join();
// THEN
assertThat(result.size(), is(4));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment