Skip to content

Commit

Permalink
creates test scenario to delete all
Browse files Browse the repository at this point in the history
  • Loading branch information
otaviojava committed Jul 27, 2019
1 parent b6ccf4c commit a61ef1b
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,18 @@ public void shouldFindAll() {
assertFalse(entities.isEmpty());
}

@Test
public void shouldDeleteAll() {
entityManager.insert(getEntity());
DocumentQuery query = select().from(COLLECTION_NAME).build();
List<DocumentEntity> entities = entityManager.select(query);
assertFalse(entities.isEmpty());
DocumentDeleteQuery deleteQuery = delete().from(COLLECTION_NAME).build();
entityManager.delete(deleteQuery);
entities = entityManager.select(query);
assertTrue(entities.isEmpty());
}

@Test
public void shouldFindAllByFields() {
entityManager.insert(getEntity());
Expand Down

0 comments on commit a61ef1b

Please sign in to comment.