use of org.apache.openmeetings.db.dto.record.RecordingDTO in project openmeetings by apache.
the class TestRecordingService method testExternal.
@Test
public void testExternal() throws Exception {
User u = getExternalUser();
Recording r = new Recording();
r.setInsertedBy(u.getId());
r.setComment("Created by Unit Tests");
r.setRoomId(5L);
r = getBean(RecordingDao.class).update(r);
ServiceResult sr = login();
Collection<? extends RecordingDTO> recs = getClient(getRecordUrl()).path("/" + UNIT_TEST_EXT_TYPE).query("sid", sr.getMessage()).getCollection(RecordingDTO.class);
assertNotNull("Valid collection should be returned", recs);
assertFalse("Collection of the recordings should not be empty", recs.isEmpty());
boolean found = false;
for (RecordingDTO rdo : recs) {
if (r.getId().equals(rdo.getId())) {
// TODO check room, user
found = true;
break;
}
}
assertTrue("Just created recording was not found by the service", found);
}
Aggregations