View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule.transformer.simple;
8   
9   import org.mule.util.IOUtils;
10  
11  import java.io.ByteArrayInputStream;
12  import java.io.InputStream;
13  
14  public class StringObjectArrayTransformersStreamingTestCase extends StringObjectArrayTransformersTestCase
15  {
16  
17      public Object getTestData()
18      {
19          String testData = (String) super.getTestData();
20          return new ByteArrayInputStream(testData.getBytes());
21      }
22  
23      public boolean compareRoundtripResults(Object src, Object result)
24      {
25          InputStream input = (InputStream) src;
26          String expected = IOUtils.toString(input);
27          
28          return expected.equals(result);
29      }
30      
31  }
32  
33