use of org.apache.openmeetings.db.dto.room.RoomFileDTO in project openmeetings by apache.
the class TestRoomService method testCreateWithFiles2.
@Test
public void testCreateWithFiles2() throws IOException {
// lets create real file
CallResult<FileItemDTO> fileCall = createVerifiedFile(getDefaultProfilePicture(), "img.jpg", BaseFileItem.Type.Image);
Room.Type type = Room.Type.presentation;
String name = "Unit Test Ext Room4";
String comment = "Unit Test Ext Room Comments4";
RoomDTO r = new RoomDTO();
r.setType(type);
r.setName(name);
r.setComment(comment);
r.setCapacity(CAPACITY);
RoomFileDTO rf = new RoomFileDTO();
// not existent
rf.setFileId(fileCall.getObj().getId());
r.getFiles().add(rf);
CallResult<RoomDTO> res = createAndValidate(fileCall.getSid(), r);
assertFalse("Room files should NOT be empty", res.getObj().getFiles().isEmpty());
}
use of org.apache.openmeetings.db.dto.room.RoomFileDTO in project openmeetings by apache.
the class TestRoomService method testCreateWithFiles1.
@Test
public void testCreateWithFiles1() {
Room.Type type = Room.Type.presentation;
String name = "Unit Test Ext Room3";
String comment = "Unit Test Ext Room Comments3";
RoomDTO r = new RoomDTO();
r.setType(type);
r.setName(name);
r.setComment(comment);
r.setCapacity(CAPACITY);
RoomFileDTO rf = new RoomFileDTO();
// not existent
rf.setFileId(-666L);
r.getFiles().add(rf);
CallResult<RoomDTO> res = createAndValidate(r);
assertTrue("No room files should be added", res.getObj().getFiles().isEmpty());
}
Aggregations