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