use of com.epam.ta.reportportal.database.entity.BinaryContent in project commons-dao by reportportal.
the class LogRepositoryTest method addLogWithBinaryData.
@Before
public void addLogWithBinaryData() {
Map<String, String> metaInfo = new HashMap<>();
metaInfo.put("project", "EPMRPP");
BinaryData binaryData = new BinaryData(CONTENT_TYPE, 64807L, this.getClass().getClassLoader().getResourceAsStream("meh.jpg"));
filename = dataStorage.saveData(binaryData, "filename", metaInfo);
thumbnail = dataStorage.saveData(binaryData, "thumbnail", metaInfo);
BinaryContent binaryContent = new BinaryContent(filename, thumbnail, CONTENT_TYPE);
Log log = new Log();
log.setBinaryContent(binaryContent);
saved = logRepository.save(log);
}
use of com.epam.ta.reportportal.database.entity.BinaryContent in project commons-dao by reportportal.
the class LogRepositoryTest method logs.
public List<Log> logs() {
Log log1 = new Log();
log1.setTestItemRef("item1");
log1.setBinaryContent(new BinaryContent("binary1", "thumbnail1", "contentType1"));
Log log2 = new Log();
log2.setTestItemRef("item1");
log2.setBinaryContent(new BinaryContent("binary2", "thumbnail2", "contentType2"));
Log log3 = new Log();
log3.setTestItemRef("item2");
log3.setBinaryContent(new BinaryContent("binary3", "thumbnail3", "contentType3"));
return asList(log1, log2, log3);
}
Aggregations