import static org.wamblee.xml.XMLDocument.*;
import junit.framework.TestCase;
+import org.junit.Before;
+import org.junit.Test;
import org.w3c.dom.ls.LSInput;
import org.w3c.dom.ls.LSResourceResolver;
import org.wamblee.io.ClassPathResource;
import javax.xml.transform.URIResolver;
import javax.xml.transform.stream.StreamSource;
+import static junit.framework.TestCase.*;
+
/**
* Tests for {@link org.wamblee.xml.ClasspathUriResolver}.
*
* @author Erik Brakkee
*/
-public class ClasspathUriResolverTest extends TestCase {
+public class ClasspathUriResolverTest {
private static final String REPORT_TO_HTML_XSL = "reportToHtml.xsl";
private static final String PREFIX = "org/wamblee/xml";
private static final String EXISTING_RESOURCE = PREFIX + "/" + REPORT_TO_HTML_XSL;
*
* @see junit.framework.TestCase#setUp()
*/
- @Override
- protected void setUp() throws Exception {
+ @Before
+ public void setUp() throws Exception {
resolver = new ClasspathUriResolver();
}
* thrown.
*
*/
+ @Test
public void testResolveNonExistingFileURIResolver() {
try {
resolver
* @throws TransformerException
* @throws IOException
*/
+ @Test
public void testResolveExistingFileLSResourceResolver()
throws TransformerException, IOException {
LSInput source = resolver.resolveResource(null, null, "kees",
* @throws TransformerException
* @throws IOException
*/
+ @Test
public void testResolveExistingFileLSResourceResolverUsingBasePath()
throws TransformerException, IOException {
* thrown.
*
*/
+ @Test
public void testResolveNonExistingFileLSResourceResolver() {
LSInput input = resolver.resolveResource(null, null, "kees",
NON_EXISTING_RESOURCE, null);