use of org.summerb.easycrud.api.dto.PagerParams in project summerb by skarpushin.
the class GenericCrudServiceTestTemplate method testFindByQueryIn.
@Test
public void testFindByQueryIn() throws Exception {
createTestData();
PaginatedList<TestDto1> result = getTestDto1Service().query(new PagerParams(0, 100), Query.n().in("env", "env-UAT", "env-pilot"));
assertEquals(2, result.getTotalResults());
}
use of org.summerb.easycrud.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.easycrud.api.dto.PagerParams in project summerb by skarpushin.
the class GenericCrudServiceTestTemplate method testFindByQueryStringLengthBetween.
@Test
public void testFindByQueryStringLengthBetween() throws Exception {
createTestData();
PaginatedList<TestDto1> result = getTestDto1Service().query(new PagerParams(0, 100), Query.n().lengthBetween("env", 6, 7));
assertEquals(2, result.getTotalResults());
}
use of org.summerb.easycrud.api.dto.PagerParams in project summerb by skarpushin.
the class GenericCrudServiceTestTemplate method testFindByQueryIsNull.
@Test
public void testFindByQueryIsNull() throws Exception {
createTestData();
PaginatedList<TestDto1> result = getTestDto1Service().query(new PagerParams(0, 100), Query.n().isNull("linkToPatchToNextVersion"));
assertEquals(2, result.getTotalResults());
}
use of org.summerb.easycrud.api.dto.PagerParams in project summerb by skarpushin.
the class GenericCrudServiceTestTemplate method testFindByQueryOutside.
@Test
public void testFindByQueryOutside() throws Exception {
createTestData();
PaginatedList<TestDto1> result = getTestDto1Service().query(new PagerParams(0, 100), Query.n().notBetween("minorVersion", 4, 5));
assertEquals(1, result.getTotalResults());
}
Aggregations