1
2
3
4
5
6
7
8
9
10
11 package org.mule.module.xml.functional;
12
13 import org.mule.tck.FunctionalTestCase;
14
15 import java.io.IOException;
16 import java.io.InputStream;
17
18 import org.apache.commons.io.IOUtils;
19
20 public abstract class AbstractXmlFunctionalTestCase extends FunctionalTestCase
21 {
22
23 public static final long TIMEOUT = 3000L;
24
25 protected String getConfigAsString() throws IOException
26 {
27 return getResourceAsString(getConfigResources());
28 }
29
30 protected String getResourceAsString(String resource) throws IOException
31 {
32 InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(resource);
33 assertNotNull(resource, is);
34 return IOUtils.toString(is);
35 }
36
37 }