Skip to content

Commit

Permalink
adds Mongodb tests
Browse files Browse the repository at this point in the history
  • Loading branch information
otaviojava committed May 24, 2018
1 parent 5f82618 commit e9fde37
Showing 1 changed file with 6 additions and 3 deletions.
Expand Up @@ -313,11 +313,11 @@ public void shouldFindDocumentSort() {

List<DocumentEntity> entitiesFound = entityManager.select(query);
assertEquals(2, entitiesFound.size());
List<Integer> ages = entities.stream()
List<Integer> ages = entitiesFound.stream()
.map(e -> e.find("age").get().get(Integer.class))
.collect(Collectors.toList());

assertThat(ages, contains(22, 23, 25));
assertThat(ages, contains(23, 25));

query = select().from(COLLECTION_NAME)
.where("age").gt(22)
Expand All @@ -326,8 +326,11 @@ public void shouldFindDocumentSort() {
.build();

entitiesFound = entityManager.select(query);
ages = entitiesFound.stream()
.map(e -> e.find("age").get().get(Integer.class))
.collect(Collectors.toList());
assertEquals(2, entitiesFound.size());
assertThat(ages, contains(25, 23, 22));
assertThat(ages, contains(25, 23));

}

Expand Down

0 comments on commit e9fde37

Please sign in to comment.