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