View Javadoc

1   package org.apache.torque.mojo;
2   
3   import org.apache.tools.ant.taskdefs.Echo;
4   import org.codehaus.plexus.PlexusTestCase;
5   
6   /**
7    * Tests AntTaskMojo
8    */
9   public class AntTaskMojoTest extends PlexusTestCase {
10  
11  	/**
12  	 * 
13  	 */
14  	public void testExecute() throws Exception {
15  		try {
16  			System.out.println("execute");
17  
18  			Echo echoTask = new Echo();
19  			echoTask.setTaskName("empty task");
20  			AntTaskMojo instance = new AntTaskMojo();
21  			instance.setAntTask(echoTask);
22  			instance.configureTask();
23  			echoTask.addText("hello world");
24  			instance.execute();
25  		} catch (Throwable t) {
26  			t.printStackTrace();
27  		}
28  
29  	}
30  }