use of org.codice.ddf.attachment.AttachmentInfo in project ddf by codice.
the class AttachmentParserImplTest method testSimpleCase.
@Test
public void testSimpleCase() throws IOException {
try (InputStream inputStream = createTestInputStream()) {
AttachmentInfo attachmentInfo = attachmentParser.generateAttachmentInfo(inputStream, TEXT_PLAIN, FULL_FILENAME);
assertThat(attachmentInfo.getFilename(), is(FULL_FILENAME));
assertThat(attachmentInfo.getContentType(), is(TEXT_PLAIN));
assertThat(attachmentInfo.getStream(), is(inputStream));
}
}
Aggregations