/**
* Checks the {@link FOURIResolver#checkBaseURL(String)} method.
* @throws Exception if an error occurs
*/
public void testCheckBaseURI() throws Exception {
FOURIResolver resolver = new FOURIResolver(true);
System.out.println(resolver.checkBaseURL("./test/config"));
System.out.println(resolver.checkBaseURL("file:test/config"));
System.out.println(resolver.checkBaseURL("fantasy:myconfig"));
System.out.println(resolver.checkBaseURL("file:test\\config\\"));
try {
resolver.checkBaseURL("./doesnotexist");
fail("Expected an exception for a inexistent base directory");
} catch (MalformedURLException mfue) {
//expected
}
try {
resolver.checkBaseURL("file:doesnotexist");
fail("Expected an exception for a inexistent base URI");
} catch (MalformedURLException mfue) {
//expected
}
}