File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed
jnosql-tinkerpop/src/test/java/org/eclipse/jnosql/databases/tinkerpop/mapping Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments