Search in sources :

Example 1 with ResponseDataObject

use of ubic.gemma.web.services.rest.util.ResponseDataObject in project Gemma by PavlidisLab.

the class DatasetsRestTest method testAll.

@Test
public void testAll() {
    ResponseDataObject response = datasetsWebService.all(DatasetFilterArg.valueOf(""), IntArg.valueOf("5"), IntArg.valueOf("5"), SortArg.valueOf("+id"), new MockHttpServletResponse());
    assertNotNull(response.getData());
    assertTrue(response.getData() instanceof Collection<?>);
    assertEquals(5, ((Collection) response.getData()).size());
    assertTrue(((Collection) response.getData()).iterator().next() instanceof ExpressionExperimentValueObject);
}
Also used : ExpressionExperimentValueObject(ubic.gemma.model.expression.experiment.ExpressionExperimentValueObject) ResponseDataObject(ubic.gemma.web.services.rest.util.ResponseDataObject) MockHttpServletResponse(org.springframework.mock.web.MockHttpServletResponse) Test(org.junit.Test) BaseSpringWebTest(ubic.gemma.web.util.BaseSpringWebTest)

Example 2 with ResponseDataObject

use of ubic.gemma.web.services.rest.util.ResponseDataObject in project Gemma by PavlidisLab.

the class DatasetsRestTest method testSome.

@Test
public void testSome() {
    ResponseDataObject response = datasetsWebService.datasets(ArrayDatasetArg.valueOf(DatasetsRestTest.ees.get(0).getShortName() + ", BAD_NAME, " + DatasetsRestTest.ees.get(2).getShortName()), DatasetFilterArg.valueOf(""), IntArg.valueOf("0"), IntArg.valueOf("10"), SortArg.valueOf("+id"), new MockHttpServletResponse());
    assertNotNull(response.getData());
    assertTrue(response.getData() instanceof Collection<?>);
    assertEquals(2, ((Collection) response.getData()).size());
    assertTrue(((Collection) response.getData()).iterator().next() instanceof ExpressionExperimentValueObject);
}
Also used : ExpressionExperimentValueObject(ubic.gemma.model.expression.experiment.ExpressionExperimentValueObject) ResponseDataObject(ubic.gemma.web.services.rest.util.ResponseDataObject) MockHttpServletResponse(org.springframework.mock.web.MockHttpServletResponse) Test(org.junit.Test) BaseSpringWebTest(ubic.gemma.web.util.BaseSpringWebTest)

Aggregations

Test (org.junit.Test)2 MockHttpServletResponse (org.springframework.mock.web.MockHttpServletResponse)2 ExpressionExperimentValueObject (ubic.gemma.model.expression.experiment.ExpressionExperimentValueObject)2 ResponseDataObject (ubic.gemma.web.services.rest.util.ResponseDataObject)2 BaseSpringWebTest (ubic.gemma.web.util.BaseSpringWebTest)2