use of br.com.caelum.vraptor.observer.upload.UploadedFile in project mamute by caelum.
the class AttachmentRepositoryTest method createAttachment.
private Attachment createAttachment(final String content) {
final User owner = user("attachment owner", "attachment@owner.local");
session.save(owner);
final UploadedFile file = new DefaultUploadedFile(IOUtils.toInputStream(content), "hello.txt", "text/plain", content.length());
final Attachment attachment = new Attachment(file, owner, "127.0.0.1");
return attachment;
}
Aggregations