File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
jnosql-oracle-nosql/src/test/java/org/eclipse/jnosql/databases/oracle/integration Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 1717
1818import jakarta .inject .Inject ;
1919import org .assertj .core .api .SoftAssertions ;
20+ import org .eclipse .jnosql .databases .oracle .communication .ContactType ;
2021import org .eclipse .jnosql .databases .oracle .communication .Database ;
2122import org .eclipse .jnosql .databases .oracle .communication .OracleNoSQLConfigurations ;
2223import org .eclipse .jnosql .databases .oracle .mapping .OracleNoSQLTemplate ;
3233import org .jboss .weld .junit5 .auto .EnableAutoWeld ;
3334import org .junit .jupiter .api .Test ;
3435import org .junit .jupiter .api .condition .EnabledIfSystemProperty ;
36+ import org .junit .jupiter .params .ParameterizedTest ;
3537
38+ import java .util .List ;
3639import java .util .Optional ;
3740
3841import static java .util .UUID .randomUUID ;
@@ -136,6 +139,21 @@ void shouldUpdateNullValues(){
136139 softly .assertThat (optional ).get ().extracting (Magazine ::edition ).isEqualTo (2 );
137140 });
138141 }
142+
143+ @ ParameterizedTest
144+ @ org .junit .jupiter .params .provider .EnumSource (ContactType .class )
145+ void shouldFindByType (ContactType type ){
146+ var contact = new Contact (randomUUID ().toString (), "Otavio Santana" , type );
147+ template .insert (contact );
148+
149+ List <Contact > entities = template .select (Contact .class ).where ("type" ).eq (type ).result ();
150+
151+ SoftAssertions .assertSoftly (softly -> {
152+ softly .assertThat (entities ).isNotNull ();
153+ softly .assertThat (entities ).allMatch (e -> e .type ().equals (type ));
154+ });
155+
156+ }
139157
140158
141159
You can’t perform that action at this time.
0 commit comments