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