use of com.adaptris.core.services.splitter.MimePartSplitter in project interlok by adaptris.
the class IgnoreOriginalMimeAggregatorTest method testService_MimeSplitter.
@Test
public void testService_MimeSplitter() throws Exception {
// This is a 3 part message, so that should generate 3 split messages; which should generate 3 parts at the end.
AdaptrisMessage msg = MimeJunitHelper.create();
PooledSplitJoinService service = new PooledSplitJoinService();
// The service doesn't actually matter right now.
service.setService(new NullService());
service.setTimeout(new TimeInterval(10L, TimeUnit.SECONDS));
service.setSplitter(new MimePartSplitter());
MimeAggregator aggr = createAggregatorForTests();
aggr.setEncoding("base64");
service.setAggregator(aggr);
execute(service, msg);
BodyPartIterator input = MimeHelper.createBodyPartIterator(msg);
assertEquals(3, input.size());
}
use of com.adaptris.core.services.splitter.MimePartSplitter in project interlok by adaptris.
the class MimeAggregatorTest method testService_MimeSplitter.
@Test
public void testService_MimeSplitter() throws Exception {
// This is a 3 part message, so that should generate 3 split messages; which should generate 4 parts at the end.
AdaptrisMessage msg = MimeJunitHelper.create();
PooledSplitJoinService service = new PooledSplitJoinService();
// The service doesn't actually matter right now.
service.setService(new NullService());
service.setTimeout(new TimeInterval(10L, TimeUnit.SECONDS));
service.setSplitter(new MimePartSplitter());
MimeAggregator aggr = createAggregatorForTests();
aggr.setEncoding("base64");
service.setAggregator(aggr);
execute(service, msg);
BodyPartIterator input = MimeHelper.createBodyPartIterator(msg);
assertEquals(4, input.size());
}
Aggregations