Search in sources :

Example 1 with GreaterThan

use of org.mockito.internal.matchers.GreaterThan in project dhis2-core by dhis2.

the class DataElementControllerDocumentation method testFilteriLikeOk.

@Test
public void testFilteriLikeOk() throws Exception {
    MockHttpSession session = getSession("F_DATAELEMENT_PUBLIC_ADD");
    DataElement de = createDataElement('A');
    manager.save(de);
    mvc.perform(get("/dataElements?filter=name:ilike:DataElementA").session(session).contentType(TestUtils.APPLICATION_JSON_UTF8)).andExpect(jsonPath("$.pager.total", new GreaterThan<Integer>(0)));
}
Also used : DataElement(org.hisp.dhis.dataelement.DataElement) GreaterThan(org.mockito.internal.matchers.GreaterThan) MockHttpSession(org.springframework.mock.web.MockHttpSession) Test(org.junit.Test) AbstractWebApiTest(org.hisp.dhis.webapi.documentation.controller.AbstractWebApiTest)

Example 2 with GreaterThan

use of org.mockito.internal.matchers.GreaterThan in project dhis2-core by dhis2.

the class DataElementControllerDocumentation method testFilterEqualOk.

@Test
public void testFilterEqualOk() throws Exception {
    MockHttpSession session = getSession("F_DATAELEMENT_PUBLIC_ADD");
    DataElement de = createDataElement('A');
    manager.save(de);
    mvc.perform(get("/dataElements?filter=name:eq:DataElementA").session(session).contentType(TestUtils.APPLICATION_JSON_UTF8)).andExpect(jsonPath("$.pager.total", new GreaterThan<Integer>(0)));
}
Also used : DataElement(org.hisp.dhis.dataelement.DataElement) GreaterThan(org.mockito.internal.matchers.GreaterThan) MockHttpSession(org.springframework.mock.web.MockHttpSession) Test(org.junit.Test) AbstractWebApiTest(org.hisp.dhis.webapi.documentation.controller.AbstractWebApiTest)

Aggregations

DataElement (org.hisp.dhis.dataelement.DataElement)2 AbstractWebApiTest (org.hisp.dhis.webapi.documentation.controller.AbstractWebApiTest)2 Test (org.junit.Test)2 GreaterThan (org.mockito.internal.matchers.GreaterThan)2 MockHttpSession (org.springframework.mock.web.MockHttpSession)2