Skip to content

Commit 5635cb6

Browse files
committed
test: generate new test on tinkerpop
Signed-off-by: Otavio Santana <[email protected]>
1 parent 0f142c3 commit 5635cb6

File tree

1 file changed

+16
-3
lines changed
  • jnosql-tinkerpop/src/test/java/org/eclipse/jnosql/databases/tinkerpop/mapping

1 file changed

+16
-3
lines changed

jnosql-tinkerpop/src/test/java/org/eclipse/jnosql/databases/tinkerpop/mapping/PopulationTest.java

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,22 @@ void shouldFindByQuery() {
7474
SoftAssertions.assertSoftly(soft -> {
7575
soft.assertThat(people).isNotNull();
7676
soft.assertThat(people).hasSize(3);
77-
soft.assertThat(people.get(0)).isEqualTo(ada);
78-
soft.assertThat(people.get(0)).isEqualTo(poliana);
79-
soft.assertThat(people.get(0)).isEqualTo(otavio);
77+
soft.assertThat(people).containsExactly(ada, otavio, poliana);
78+
});
79+
}
80+
81+
@Test
82+
void shouldFindByNameQuery() {
83+
var otavio = population.save(Human.builder().withAge().withName("Otavio").build());
84+
var poliana = population.save(Human.builder().withAge().withName("Poliana").build());
85+
var ada = population.save(Human.builder().withAge().withName("Ada").build());
86+
87+
List<Human> people = population.findByName("Otavio");
88+
89+
SoftAssertions.assertSoftly(soft -> {
90+
soft.assertThat(people).isNotNull();
91+
soft.assertThat(people).hasSize(1);
92+
soft.assertThat(people).containsExactly(otavio);
8093
});
8194
}
8295
}

0 commit comments

Comments
 (0)