Search in sources :

Example 6 with Project

use of com.github.tfaga.lynx.test.entities.Project in project lynx by TFaga.

the class JPAUtilsFiltersTest method testUuidFilter.

@Test
public void testUuidFilter() {
    QueryFilter qf = new QueryFilter();
    qf.setField("publicId");
    qf.setOperation(FilterOperation.EQ);
    qf.setValue("b3781a0e-fb85-45d1-bd5f-d38802a546d2");
    QueryParameters q = new QueryParameters();
    q.getFilters().add(qf);
    List<Project> projects = JPAUtils.queryEntities(em, Project.class, q);
    Assert.assertNotNull(projects);
    Assert.assertEquals(0, projects.size());
}
Also used : Project(com.github.tfaga.lynx.test.entities.Project) QueryFilter(com.github.tfaga.lynx.beans.QueryFilter) QueryParameters(com.github.tfaga.lynx.beans.QueryParameters) Test(org.junit.Test)

Aggregations

QueryFilter (com.github.tfaga.lynx.beans.QueryFilter)6 QueryParameters (com.github.tfaga.lynx.beans.QueryParameters)6 Project (com.github.tfaga.lynx.test.entities.Project)6 Test (org.junit.Test)6