2
* Licensed to the Apache Software Foundation (ASF) under one or more
3
* contributor license agreements. See the NOTICE file distributed with
4
* this work for additional information regarding copyright ownership.
5
* The ASF licenses this file to You under the Apache License, Version 2.0
6
* (the "License"); you may not use this file except in compliance with
7
* the License. You may obtain a copy of the License at
9
* http://www.apache.org/licenses/LICENSE-2.0
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
19
package org.apache.tools.ant.taskdefs;
21
import org.apache.tools.ant.BuildException;
22
import org.apache.tools.ant.BuildFileTest;
24
public class JavadocTest extends BuildFileTest {
26
public JavadocTest(String name) {
30
private static final String BUILD_PATH = "src/etc/testcases/taskdefs/javadoc/";
31
private static final String BUILD_FILENAME = "javadoc.xml";
32
private static final String BUILD_FILE = BUILD_PATH + BUILD_FILENAME;
34
protected void setUp() throws Exception {
36
configureProject(BUILD_FILE);
40
public void testDirsetPath() throws Exception {
41
executeTarget("dirsetPath");
45
public void testDirsetPathWithoutPackagenames() throws Exception {
47
executeTarget("dirsetPathWithoutPackagenames");
48
} catch (BuildException e) {
49
fail("Contents of path should be picked up without specifying package names: " + e);
54
public void testNestedDirsetPath() throws Exception {
55
executeTarget("nestedDirsetPath");
59
public void testFilesetPath() throws Exception {
61
executeTarget("filesetPath");
62
} catch (BuildException e) {
63
fail("A path can contain filesets: " + e);
68
public void testNestedFilesetPath() throws Exception {
70
executeTarget("nestedFilesetPath");
71
} catch (BuildException e) {
72
fail("A path can contain nested filesets: " + e);
77
public void testFilelistPath() throws Exception {
79
executeTarget("filelistPath");
80
} catch (BuildException e) {
81
fail("A path can contain filelists: " + e);
86
public void testNestedFilelistPath() throws Exception {
88
executeTarget("nestedFilelistPath");
89
} catch (BuildException e) {
90
fail("A path can contain nested filelists: " + e);
95
public void testPathelementPath() throws Exception {
96
executeTarget("pathelementPath");
100
public void testPathelementLocationPath() throws Exception {
102
executeTarget("pathelementLocationPath");
103
} catch (BuildException e) {
104
fail("A path can contain pathelements pointing to a file: " + e);
109
public void testNestedSource() throws Exception {
110
executeTarget("nestedSource");
114
public void testNestedFilesetRef() throws Exception {
115
executeTarget("nestedFilesetRef");
119
public void testNestedFilesetRefInPath() throws Exception {
120
executeTarget("nestedFilesetRefInPath");
123
public void testNestedFilesetNoPatterns() throws Exception {
124
executeTarget("nestedFilesetNoPatterns");
127
public void testDoublyNestedFileset() throws Exception {
128
executeTarget("doublyNestedFileset");
131
public void testDoublyNestedFilesetNoPatterns() throws Exception {
132
executeTarget("doublyNestedFilesetNoPatterns");
135
public void testNonJavaIncludes() throws Exception { // #41264
136
executeTarget("nonJavaIncludes");
2
* Licensed to the Apache Software Foundation (ASF) under one or more
3
* contributor license agreements. See the NOTICE file distributed with
4
* this work for additional information regarding copyright ownership.
5
* The ASF licenses this file to You under the Apache License, Version 2.0
6
* (the "License"); you may not use this file except in compliance with
7
* the License. You may obtain a copy of the License at
9
* http://www.apache.org/licenses/LICENSE-2.0
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
19
package org.apache.tools.ant.taskdefs;
21
import org.apache.tools.ant.BuildException;
22
import org.apache.tools.ant.BuildFileTest;
24
public class JavadocTest extends BuildFileTest {
26
public JavadocTest(String name) {
30
private static final String BUILD_PATH = "src/etc/testcases/taskdefs/javadoc/";
31
private static final String BUILD_FILENAME = "javadoc.xml";
32
private static final String BUILD_FILE = BUILD_PATH + BUILD_FILENAME;
34
protected void setUp() throws Exception {
36
configureProject(BUILD_FILE);
40
public void testDirsetPath() throws Exception {
41
executeTarget("dirsetPath");
45
public void testDirsetPathWithoutPackagenames() throws Exception {
47
executeTarget("dirsetPathWithoutPackagenames");
48
} catch (BuildException e) {
49
fail("Contents of path should be picked up without specifying package names: " + e);
54
public void testNestedDirsetPath() throws Exception {
55
executeTarget("nestedDirsetPath");
59
public void testFilesetPath() throws Exception {
61
executeTarget("filesetPath");
62
} catch (BuildException e) {
63
fail("A path can contain filesets: " + e);
68
public void testNestedFilesetPath() throws Exception {
70
executeTarget("nestedFilesetPath");
71
} catch (BuildException e) {
72
fail("A path can contain nested filesets: " + e);
77
public void testFilelistPath() throws Exception {
79
executeTarget("filelistPath");
80
} catch (BuildException e) {
81
fail("A path can contain filelists: " + e);
86
public void testNestedFilelistPath() throws Exception {
88
executeTarget("nestedFilelistPath");
89
} catch (BuildException e) {
90
fail("A path can contain nested filelists: " + e);
95
public void testPathelementPath() throws Exception {
96
executeTarget("pathelementPath");
100
public void testPathelementLocationPath() throws Exception {
102
executeTarget("pathelementLocationPath");
103
} catch (BuildException e) {
104
fail("A path can contain pathelements pointing to a file: " + e);
109
public void testNestedSource() throws Exception {
110
executeTarget("nestedSource");
114
public void testNestedFilesetRef() throws Exception {
115
executeTarget("nestedFilesetRef");
119
public void testNestedFilesetRefInPath() throws Exception {
120
executeTarget("nestedFilesetRefInPath");
123
public void testNestedFilesetNoPatterns() throws Exception {
124
executeTarget("nestedFilesetNoPatterns");
127
public void testDoublyNestedFileset() throws Exception {
128
executeTarget("doublyNestedFileset");
131
public void testDoublyNestedFilesetNoPatterns() throws Exception {
132
executeTarget("doublyNestedFilesetNoPatterns");
135
public void testNonJavaIncludes() throws Exception { // #41264
136
executeTarget("nonJavaIncludes");