use of com.adaptris.core.EmptyFileNameCreator in project interlok by adaptris.
the class WriteMetadataToFilesystemTest method testFilenameCreator.
@Test
public void testFilenameCreator() throws Exception {
WriteMetadataToFilesystem service = new WriteMetadataToFilesystem();
assertEquals(FormattedFilenameCreator.class, service.filenameCreator().getClass());
service.setFilenameCreator(new EmptyFileNameCreator());
assertEquals(EmptyFileNameCreator.class, service.getFilenameCreator().getClass());
service.setFilenameCreator(null);
assertEquals(FormattedFilenameCreator.class, service.filenameCreator().getClass());
}
use of com.adaptris.core.EmptyFileNameCreator in project interlok by adaptris.
the class FsMessageProducerTest method testSetFilenameCreator.
@Test
public void testSetFilenameCreator() throws Exception {
String subdir = new GuidGenerator().safeUUID();
FsProducer producer = createProducer(subdir);
try {
producer.setFilenameCreator(null);
fail();
} catch (IllegalArgumentException | NullPointerException expected) {
}
producer.setFilenameCreator(new EmptyFileNameCreator());
assertEquals(EmptyFileNameCreator.class, producer.getFilenameCreator().getClass());
}
use of com.adaptris.core.EmptyFileNameCreator in project interlok by adaptris.
the class ReadMetadataFromFilesystemTest method testFilenameCreator.
@Test
public void testFilenameCreator() throws Exception {
ReadMetadataFromFilesystem service = new ReadMetadataFromFilesystem();
assertEquals(FormattedFilenameCreator.class, service.filenameCreator().getClass());
service.setFilenameCreator(new EmptyFileNameCreator());
assertEquals(EmptyFileNameCreator.class, service.getFilenameCreator().getClass());
service.setFilenameCreator(null);
assertEquals(FormattedFilenameCreator.class, service.filenameCreator().getClass());
}
Aggregations