How to execute query associated with filter in a test?

Related to: FilterService get list of task null pointer exception

I am creating a number of pre-set filters in code that contain expressions.

I want to test that the the filters are created correctly and work as expected.

In my test I set the authenticated user, load the filter, get the Query & execute it, however I get the NPE in the linked question/issue.

filter.getQuery().list()

The NPE is because there is no Context initialised.

Is there a way I can make this work ?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.