use of com.sun.tools.ws.wscompile.WsimportOptions in project metro-jax-ws by eclipse-ee4j.
the class WsimportOptionsTest method testParseArgument_javacArgs.
/**
* Test of parseArguments(String[]) method, of class WsimportOptions.
*/
public void testParseArgument_javacArgs() throws Exception {
WsimportOptions options = new WsimportOptions();
String[] args = new String[] { "-g", "-J-g", "-J-source=1.6", "-J-target=1.6", "-J-XprintRounds" };
options.parseArguments(args);
assertFalse("javac options not set", options.javacOptions.isEmpty());
assertEquals("invalid option recognized", 4, options.javacOptions.size());
L l = new L();
List<String> jopts = options.getJavacOptions(new ArrayList<String>() {
{
add("-g");
}
}, l);
assertEquals("incorrect split of javac options", 5, jopts.size());
assertTrue(jopts.remove("-source"));
assertTrue(jopts.remove("1.6"));
assertTrue(jopts.remove("-target"));
assertTrue(jopts.remove("1.6"));
assertTrue(jopts.remove("-XprintRounds"));
assertTrue(jopts.isEmpty());
assertEquals(1, l.i);
}
use of com.sun.tools.ws.wscompile.WsimportOptions in project metro-jax-ws by eclipse-ee4j.
the class WSDLParserTest method testParseUsingPolicyRequired.
public void testParseUsingPolicyRequired() throws Exception {
final ErrorReceiverFilter errorReceiver = createErrorReceiver();
final InputSource source = getResourceSource("usingpolicy-required.wsdl");
final WsimportOptions options = new WsimportOptions();
options.addWSDL(source);
final WSDLParser instance = new WSDLParser(options, errorReceiver, null);
final WSDLDocument wsdl = instance.parse();
assertNotNull(wsdl);
assertFalse(errorReceiver.hadError());
}
use of com.sun.tools.ws.wscompile.WsimportOptions in project metro-jax-ws by eclipse-ee4j.
the class WSDLParserTest method testParseSimple.
public void testParseSimple() throws Exception {
final ErrorReceiverFilter errorReceiver = createErrorReceiver();
final InputSource source = getResourceSource("simple.wsdl");
final WsimportOptions options = new WsimportOptions();
options.addWSDL(source);
final WSDLParser instance = new WSDLParser(options, errorReceiver, null);
final WSDLDocument wsdl = instance.parse();
assertNotNull(wsdl);
assertFalse(errorReceiver.hadError());
}
use of com.sun.tools.ws.wscompile.WsimportOptions in project metro-jax-ws by eclipse-ee4j.
the class WSDLParserTest method testParseUsingPolicy.
public void testParseUsingPolicy() throws Exception {
final ErrorReceiverFilter errorReceiver = createErrorReceiver();
final InputSource source = getResourceSource("usingpolicy.wsdl");
final WsimportOptions options = new WsimportOptions();
options.addWSDL(source);
final WSDLParser instance = new WSDLParser(options, errorReceiver, null);
final WSDLDocument wsdl = instance.parse();
assertNotNull(wsdl);
assertFalse(errorReceiver.hadError());
}
Aggregations