Search in sources :

Example 11 with ByteArrayIterator

use of com.adaptris.util.text.mime.ByteArrayIterator in project interlok by adaptris.

the class TestMultipartOutput method testCreateBase64MimeOutput.

@Test
public void testCreateBase64MimeOutput() {
    try {
        MultiPartOutput output = new MultiPartOutput(guid.getUUID());
        output.addPart(PAYLOAD_1, ENCODING_BASE64, guid.getUUID());
        ByteArrayIterator input = new ByteArrayIterator(output.getBytes());
        assertEquals(NUMBER_OF_PARTS, 1, input.size());
    } catch (Exception e) {
        fail(e.getMessage());
    }
}
Also used : MultiPartOutput(com.adaptris.util.text.mime.MultiPartOutput) ByteArrayIterator(com.adaptris.util.text.mime.ByteArrayIterator) Test(org.junit.Test)

Aggregations

ByteArrayIterator (com.adaptris.util.text.mime.ByteArrayIterator)11 Test (org.junit.Test)11 MultiPartOutput (com.adaptris.util.text.mime.MultiPartOutput)8 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1