Search in sources :

Example 21 with PagerParams

use of org.summerb.easycrud.api.dto.PagerParams in project summerb by skarpushin.

the class GenericCrudServiceTestTemplate method testFindByQueryNumericGe.

@Test
public void testFindByQueryNumericGe() throws Exception {
    createTestData();
    PaginatedList<TestDto1> result = getTestDto1Service().query(new PagerParams(0, 100), Query.n().ge("majorVersion", 3));
    assertEquals(2, result.getTotalResults());
}
Also used : PagerParams(org.summerb.easycrud.api.dto.PagerParams) Test(org.junit.Test)

Example 22 with PagerParams

use of org.summerb.easycrud.api.dto.PagerParams in project summerb by skarpushin.

the class GenericCrudServiceTestTemplate method testFindByQueryNotIn.

@Test
public void testFindByQueryNotIn() throws Exception {
    createTestData();
    PaginatedList<TestDto1> result = getTestDto1Service().query(new PagerParams(0, 100), Query.n().notIn("env", "env-UAT", "env-pilot"));
    assertEquals(1, result.getTotalResults());
}
Also used : PagerParams(org.summerb.easycrud.api.dto.PagerParams) Test(org.junit.Test)

Example 23 with PagerParams

use of org.summerb.easycrud.api.dto.PagerParams in project summerb by skarpushin.

the class GenericCrudServiceTestTemplate method testFindByQueryNumberOneOf.

@Test
public void testFindByQueryNumberOneOf() throws Exception {
    createTestData();
    PaginatedList<TestDto1> result = getTestDto1Service().query(new PagerParams(0, 100), Query.n().in("minorVersion", 4L, 5L));
    assertEquals(2, result.getTotalResults());
}
Also used : PagerParams(org.summerb.easycrud.api.dto.PagerParams) Test(org.junit.Test)

Example 24 with PagerParams

use of org.summerb.easycrud.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());
}
Also used : PagerParams(org.summerb.easycrud.api.dto.PagerParams) Test(org.junit.Test)

Example 25 with PagerParams

use of org.summerb.easycrud.api.dto.PagerParams in project summerb by skarpushin.

the class GenericCrudServiceTestTemplate method testFindByQueryIsNotNull.

@Test
public void testFindByQueryIsNotNull() throws Exception {
    createTestData();
    PaginatedList<TestDto1> result = getTestDto1Service().query(new PagerParams(0, 100), Query.n().isNotNull("linkToPatchToNextVersion"));
    assertEquals(1, result.getTotalResults());
}
Also used : PagerParams(org.summerb.easycrud.api.dto.PagerParams) Test(org.junit.Test)

Aggregations

PagerParams (org.summerb.easycrud.api.dto.PagerParams)31 Test (org.junit.Test)27 PaginatedList (org.summerb.easycrud.api.dto.PaginatedList)6 EasyCrudService (org.summerb.easycrud.api.EasyCrudService)3 Query (org.summerb.easycrud.api.query.Query)3 User (org.summerb.users.api.dto.User)3 TestDto1 (integr.org.summerb.easycrud.TestDto1)2 HasId (org.summerb.easycrud.api.dto.HasId)2 AliasEntry (org.summerb.properties.impl.dao.AliasEntry)2 ArrayList (java.util.ArrayList)1 LinkedList (java.util.LinkedList)1 Entry (java.util.Map.Entry)1 InvocationOnMock (org.mockito.invocation.InvocationOnMock)1 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)1 ModelAndView (org.springframework.web.servlet.ModelAndView)1 Attachment (org.summerb.minicms.api.dto.Attachment)1 PropertyServiceUnexpectedException (org.summerb.properties.api.exceptions.PropertyServiceUnexpectedException)1 StringIdAliasDao (org.summerb.properties.impl.dao.StringIdAliasDao)1 AuthToken (org.summerb.users.api.dto.AuthToken)1 AuthTokenDao (org.summerb.users.impl.dao.AuthTokenDao)1