Skip to content

Commit

Permalink
test: integration test enhancement on TemplateIntegrationTest
Browse files Browse the repository at this point in the history
Signed-off-by: Maximillian Arruda <maximillian.arruda@MBP-de-Digibee.local>
  • Loading branch information
Maximillian Arruda authored and Maximillian Arruda committed Nov 13, 2023
1 parent 56ec07a commit 3ac4aee
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public void shouldFindById() {
}

@Test
public void shouldDelete() {
public void shouldDeleteById() {
Book book = new Book(randomUUID().toString(), "Effective Java", 1);
assertThat(template.insert(book))
.isNotNull()
Expand All @@ -108,5 +108,18 @@ public void shouldDelete() {
.isNotNull().isEmpty();
}

@Test
void shouldDeleteAll(){
for (int index = 0; index < 20; index++) {
Book book = new Book(randomUUID().toString(), "Effective Java", 1);
assertThat(template.insert(book))
.isNotNull()
.isEqualTo(book);
}

template.delete(Book.class).execute();
assertThat(template.select(Book.class).result()).isEmpty();
}


}

0 comments on commit 3ac4aee

Please sign in to comment.