use of org.summerb.approaches.jdbccrud.api.dto.PagerParams in project summerb by skarpushin.
the class GenericCrudServiceTestTemplate method testFindByQueryBooleanTrue.
@Test
public void testFindByQueryBooleanTrue() throws Exception {
createTestData();
PaginatedList<TestDto1> result = getTestDto1Service().query(new PagerParams(0, 100), Query.n().isTrue("active"));
assertEquals(2, result.getTotalResults());
result = getTestDto1Service().query(new PagerParams(0, 100), Query.n().ne("active", false));
assertEquals(2, result.getTotalResults());
}
use of org.summerb.approaches.jdbccrud.api.dto.PagerParams in project summerb by skarpushin.
the class GenericCrudServiceTestTemplate method testFindByQueryStringNe.
@Test
public void testFindByQueryStringNe() throws Exception {
createTestData();
PaginatedList<TestDto1> result = getTestDto1Service().query(new PagerParams(0, 100), Query.n().ne("env", "env-uat"));
assertEquals(2, result.getTotalResults());
}
use of org.summerb.approaches.jdbccrud.api.dto.PagerParams in project summerb by skarpushin.
the class GenericCrudServiceTestTemplate method testFindByQueryOr.
@Test
public void testFindByQueryOr() throws Exception {
createTestData();
PaginatedList<TestDto1> result = getTestDto1Service().query(new PagerParams(0, 100), Query.n().eq("majorVersion", 3L).or(Query.n().eq("minorVersion", 4L), Query.n().eq("minorVersion", 5L)));
assertEquals(2, result.getTotalResults());
}
use of org.summerb.approaches.jdbccrud.api.dto.PagerParams in project summerb by skarpushin.
the class GenericCrudServiceTestTemplate method testFindByQueryNumericNe.
@Test
public void testFindByQueryNumericNe() throws Exception {
createTestData();
PaginatedList<TestDto1> result = getTestDto1Service().query(new PagerParams(0, 100), Query.n().ne("majorVersion", 3));
assertEquals(1, result.getTotalResults());
}
use of org.summerb.approaches.jdbccrud.api.dto.PagerParams in project summerb by skarpushin.
the class GenericCrudServiceTestTemplate method testFindByQueryNotContains.
@Test
public void testFindByQueryNotContains() throws Exception {
createTestData();
PaginatedList<TestDto1> result = getTestDto1Service().query(new PagerParams(0, 100), Query.n().notContains("env", "env-p"));
assertEquals(1, result.getTotalResults());
}
Aggregations