use of org.olat.modules.fo.restapi.ForumVOes in project openolat by klemens.
the class CoursesForumsTest method testGetForumsInfo.
@Test
public void testGetForumsInfo() throws IOException, URISyntaxException {
boolean loggedIN = conn.login("administrator", "openolat");
assertTrue(loggedIN);
URI uri = UriBuilder.fromUri(getNodesURI()).build();
HttpGet get = conn.createGet(uri, MediaType.APPLICATION_JSON, true);
HttpResponse response = conn.execute(get);
assertEquals(200, response.getStatusLine().getStatusCode());
ForumVOes forums = conn.parse(response, ForumVOes.class);
assertNotNull(forums);
assertEquals(1, forums.getTotalCount());
assertNotNull(forums.getForums());
assertEquals(1, forums.getForums().length);
}
Aggregations