use of com.github.tfaga.lynx.test.entities.Project in project lynx by TFaga.
the class JPAUtilsFiltersTest method testEnumInFilter.
@Test
public void testEnumInFilter() {
QueryFilter qf = new QueryFilter();
qf.setField("status");
qf.setOperation(FilterOperation.IN);
qf.getValues().add("ACTIVE");
QueryParameters q = new QueryParameters();
q.getFilters().add(qf);
List<Project> projects = JPAUtils.queryEntities(em, Project.class, q);
Assert.assertNotNull(projects);
Assert.assertEquals(50, projects.size());
}
use of com.github.tfaga.lynx.test.entities.Project in project lynx by TFaga.
the class JPAUtilsFiltersTest method testEnumNinFilter.
@Test
public void testEnumNinFilter() {
QueryFilter qf = new QueryFilter();
qf.setField("status");
qf.setOperation(FilterOperation.NIN);
qf.getValues().add("ACTIVE");
qf.getValues().add("INACTIVE");
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());
}
use of com.github.tfaga.lynx.test.entities.Project in project lynx by TFaga.
the class JPAUtilsFiltersTest method testUuidNinFilter.
@Test
public void testUuidNinFilter() {
QueryFilter qf = new QueryFilter();
qf.setField("publicId");
qf.setOperation(FilterOperation.NIN);
qf.getValues().add("b3781a0e-fb85-45d1-bd5f-d38802a546d2");
qf.getValues().add("6a749969-9990-4ef0-856a-7e2533b6dc9e");
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());
}
use of com.github.tfaga.lynx.test.entities.Project in project lynx by TFaga.
the class JPAUtilsFiltersTest method testEnumFilter.
@Test
public void testEnumFilter() {
QueryFilter qf = new QueryFilter();
qf.setField("status");
qf.setOperation(FilterOperation.EQ);
qf.setValue("ACTIVE");
QueryParameters q = new QueryParameters();
q.getFilters().add(qf);
List<Project> projects = JPAUtils.queryEntities(em, Project.class, q);
Assert.assertNotNull(projects);
Assert.assertEquals(50, projects.size());
}
use of com.github.tfaga.lynx.test.entities.Project in project lynx by TFaga.
the class JPAUtilsFiltersTest method testUuidInFilter.
@Test
public void testUuidInFilter() {
QueryFilter qf = new QueryFilter();
qf.setField("publicId");
qf.setOperation(FilterOperation.IN);
qf.getValues().add("b3781a0e-fb85-45d1-bd5f-d38802a546d2");
qf.getValues().add("6a749969-9990-4ef0-856a-7e2533b6dc9e");
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());
}
Aggregations