File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
main/java/fr/fxjavadevblog/aid/utils/jaxrs
test/java/fr/fxjavadevblog/aid/api/videogame Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -79,8 +79,16 @@ public void setModelClass(Class <?> clazz)
7979 {
8080 this .modelClass = clazz ;
8181 filters = new LinkedList <>();
82- MultivaluedMap <String , String > parameters = uriInfo .getQueryParameters ();
83- parameters .forEach (convertParameterToFilter ());
82+ MultivaluedMap <String , String > parameters ;
83+ if (uriInfo != null )
84+ {
85+ parameters = uriInfo .getQueryParameters ();
86+ parameters .forEach (convertParameterToFilter ());
87+ }
88+ else
89+ {
90+ log .info ("No uriInfo to get parameters from" );
91+ }
8492 }
8593
8694 public boolean isFilterPresent ()
Original file line number Diff line number Diff line change 1010import org .junit .jupiter .api .Test ;
1111
1212import fr .fxjavadevblog .aid .api .genre .Genre ;
13+ import fr .fxjavadevblog .aid .utils .jaxrs .Filtering ;
1314import fr .fxjavadevblog .aid .utils .jaxrs .Pagination ;
1415import io .quarkus .test .junit .QuarkusTest ;
1516
@@ -23,7 +24,7 @@ void checkInjection() {
2324
2425 @ Test
2526 void testFindAll () {
26- Response response = this .findAll (Pagination .builder ().page (0 ).size (50 ).build (), null );
27+ Response response = this .findAll (Pagination .builder ().page (0 ).size (50 ).build (), new Filtering () );
2728 assertCorrectResponse (response );
2829 }
2930
You can’t perform that action at this time.
0 commit comments