use of org.apache.stanbol.enhancer.servicesapi.impl.ByteArraySource in project stanbol by apache.
the class ContentSourceTest method checkFileName.
@Test
public void checkFileName() throws IOException {
ContentSource source = new StreamSource(new ByteArrayInputStream(DATA), null, null, null);
assertNull(source.getFileName());
source = new StreamSource(new ByteArrayInputStream(DATA), null, FILE_NAME, null);
assertEquals(FILE_NAME, source.getFileName());
source = new ByteArraySource(DATA, null, FILE_NAME);
assertEquals(FILE_NAME, source.getFileName());
source = new ByteArraySource(DATA, null, FILE_NAME, null);
assertEquals(FILE_NAME, source.getFileName());
}
Aggregations