Search in sources :

Example 1 with ByteArrayToHexString

use of org.mule.runtime.core.internal.transformer.simple.ByteArrayToHexString in project mule by mulesoft.

the class HexStringByteArrayTransformersTestCase method testUppercase.

// extra test for uppercase output
@Test
public void testUppercase() throws TransformerException {
    ByteArrayToHexString t = new ByteArrayToHexString();
    t.setUpperCase(true);
    assertEquals(((String) getTestData()).toUpperCase(), t.transform(getResultData()));
}
Also used : ByteArrayToHexString(org.mule.runtime.core.internal.transformer.simple.ByteArrayToHexString) Test(org.junit.Test)

Example 2 with ByteArrayToHexString

use of org.mule.runtime.core.internal.transformer.simple.ByteArrayToHexString in project mule by mulesoft.

the class HexStringByteArrayTransformersTestCase method testStreaming.

@Test
public void testStreaming() throws TransformerException {
    ByteArrayToHexString transformer = new ByteArrayToHexString();
    InputStream input = new ByteArrayInputStream((byte[]) this.getResultData());
    assertEquals(this.getTestData(), transformer.transform(input));
}
Also used : ByteArrayInputStream(java.io.ByteArrayInputStream) ByteArrayInputStream(java.io.ByteArrayInputStream) InputStream(java.io.InputStream) ByteArrayToHexString(org.mule.runtime.core.internal.transformer.simple.ByteArrayToHexString) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)2 ByteArrayToHexString (org.mule.runtime.core.internal.transformer.simple.ByteArrayToHexString)2 ByteArrayInputStream (java.io.ByteArrayInputStream)1 InputStream (java.io.InputStream)1