3import static jau.test.net.URIDumpUtil.showURX;
5import java.io.IOException;
6import java.net.URISyntaxException;
8import org.jau.net.AssetURLContext;
9import org.junit.Assert;
10import org.junit.BeforeClass;
11import org.junit.FixMethodOrder;
13import org.junit.runners.MethodSorters;
15import jau.test.junit.util.JunitTracer;
17@FixMethodOrder(MethodSorters.NAME_ASCENDING)
23 System.err.println(
"******* Asset URL Stream Handler Registration: PRE");
24 Assert.assertTrue(
"GenericURLStreamHandlerFactory.register() failed", AssetURLContext.registerHandler(
TestUrisWithAssetHandler.class.getClassLoader()));
25 Assert.assertNotNull(AssetURLContext.getRegisteredHandler());
26 System.err.println(
"******* Asset URL Stream Handler Registration: POST");
27 }
catch (
final Exception e) {
28 setTestSupported(
false);
35 showURX(
"file:///rootDir/file1.txt");
36 showURX(
"file://host/rootDir/file1.txt");
37 showURX(
"jar:file:/web1/file1.jar!/rootDir/file1.txt");
38 showURX(
"asset:gluegen-test/info.txt");
39 showURX(
"asset:/gluegen-test/info.txt");
40 showURX(
"http://domain.com/web1/index.html?lala=23&lili=24#anchor");
41 showURX(
"http://domain.com:1234/web1/index.html?lala=23&lili=24#anchor");
42 showURX(
"asset:jar:file:/web1/file1.jar!/rootDir/file1.txt");
43 showURX(
"asset:jar:file:/web1/file1.jar!/rootDir/./file1.txt");
44 showURX(
"asset:jar:file:/web1/file1.jar!/rootDir/dummyParent/../file1.txt");
47 public static void main(
final String args[])
throws IOException {
49 org.junit.runner.JUnitCore.
main(tstname);
static void assetRegistration()
void showURLComponents0()
static void main(final String args[])