1 package org.objectweb.celtix.tools; 2 3 import java.io.*; 4 import java.net.URL ; 5 6 import org.objectweb.celtix.tools.common.ToolTestBase; 7 8 public class WSDLToJavaTest extends ToolTestBase { 9 10 private File output; 11 12 public void setUp() { 13 super.setUp(); 14 try { 15 URL url = WSDLToJavaTest.class.getResource("."); 16 output = new File(url.getFile()); 17 output = new File(output, "/resources"); 18 19 if (!output.exists()) { 20 output.mkdir(); 21 } 22 } catch (Exception e) { 23 } 25 } 26 27 public void tearDown() { 28 output.deleteOnExit(); 29 output = null; 30 } 31 32 public void testVersionOutput() throws Exception { 33 String [] args = new String []{"-v"}; 34 WSDLToJava.main(args); 35 assertNotNull(getStdOut()); 36 } 37 38 public void testHelpOutput() { 39 String [] args = new String []{"-help"}; 40 WSDLToJava.main(args); 41 assertNotNull(getStdOut()); 42 } 43 44 public void testBadUsage() { 45 String [] args = new String []{"-bad"}; 46 WSDLToJava.main(args); 47 assertNotNull(getStdOut()); 48 } 49 50 public void testWSDLToJava() throws Exception { 51 String [] args = new String []{"-ant", "-V", "-d", output.getCanonicalPath(), wsdlLocation.getFile()}; 52 WSDLToJava.main(args); 53 assertNotNull(getStdOut()); 54 } 55 } 56 | Popular Tags |