1 /**
2 * Copyright 2004-2013 The Kuali Foundation
3 *
4 * Licensed under the Educational Community License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.opensource.org/licenses/ecl2.php
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
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 * Tests AntTaskMojo
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 }