Test of resolveEntity method, of class com.sun.xml.ws.policy.jaxws.PolicyConfigResolver.
String publicId = null;
String systemId = null;
PolicyConfigResolver resolver = new PolicyConfigResolver();
try {
XMLEntityResolver.Parser result = resolver.resolveEntity(publicId, systemId);
fail("Expected MalformedURLException");
} catch (MalformedURLException e) {
}
publicId = "someString";
systemId = null;
XMLEntityResolver.Parser result = null;
try {
result = resolver.resolveEntity(publicId, systemId);
fail("Expected MalformedURLException");
} catch (MalformedURLException e) {
}
publicId = null;
systemId = "http://test.invalid/";
try {
result = resolver.resolveEntity(publicId, systemId);
fail("Expected IOException after connect to non-existent HTTP URL");
} catch (IOException e) {
}
publicId = "http://example.org/";
systemId = "http://test.invalid/";
try {
result = resolver.resolveEntity(publicId, systemId);
fail("Expected IOException after connect to non-existent HTTP URL");
} catch (IOException e) {
}