umagesh 2004/06/06 10:31:50 Added: src/testcases/org/apache/tools/ant DispatchTaskTest.java PickOneTask.java Log: Tasks extending from abstract DispatchTask may have multiple action methods that will get invoked depending upon the action attribute of the task. Revision Changes Path 1.1 ant/src/testcases/org/apache/tools/ant/DispatchTaskTest.java Index: DispatchTaskTest.java =================================================================== /* * Copyright 2004 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.tools.ant; import org.apache.tools.ant.BuildFileTest; public class DispatchTaskTest extends BuildFileTest { public DispatchTaskTest(String name) { super(name); } public void setUp() { configureProject("src/etc/testcases/core/dispatch/dispatch.xml"); } public void testDisp() { expectBuildException("disp", "list"); } } 1.1 ant/src/testcases/org/apache/tools/ant/PickOneTask.java Index: PickOneTask.java =================================================================== /* * Copyright 2004 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.tools.ant; import org.apache.tools.ant.dispatch.DispatchTask; public class PickOneTask extends DispatchTask { public void list() { throw new BuildException("list"); } public void show() { throw new BuildException("show"); } }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]