Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
JUnit4DirectoryTestSuite |
|
| 1.0;1 |
1 | package org.apache.maven.surefire.junit4; | |
2 | ||
3 | /* | |
4 | * Licensed to the Apache Software Foundation (ASF) under one | |
5 | * or more contributor license agreements. See the NOTICE file | |
6 | * distributed with this work for additional information | |
7 | * regarding copyright ownership. The ASF licenses this file | |
8 | * to you under the Apache License, Version 2.0 (the | |
9 | * "License"); you may not use this file except in compliance | |
10 | * with the License. You may obtain a copy of the License at | |
11 | * | |
12 | * http://www.apache.org/licenses/LICENSE-2.0 | |
13 | * | |
14 | * Unless required by applicable law or agreed to in writing, | |
15 | * software distributed under the License is distributed on an | |
16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
17 | * KIND, either express or implied. See the License for the | |
18 | * specific language governing permissions and limitations | |
19 | * under the License. | |
20 | */ | |
21 | ||
22 | import org.apache.maven.surefire.suite.AbstractDirectoryTestSuite; | |
23 | import org.apache.maven.surefire.testset.SurefireTestSet; | |
24 | import org.apache.maven.surefire.testset.TestSetFailedException; | |
25 | ||
26 | import java.io.File; | |
27 | import java.util.ArrayList; | |
28 | ||
29 | /** | |
30 | * Test suite for JUnit4 based on a directory of Java test classes. This is | |
31 | * capable of running both JUnit3 and JUnit4 test classes (I think). | |
32 | * | |
33 | * @author Karl M. Davis | |
34 | */ | |
35 | public class JUnit4DirectoryTestSuite | |
36 | extends AbstractDirectoryTestSuite | |
37 | { | |
38 | /** | |
39 | * Constructor. | |
40 | */ | |
41 | public JUnit4DirectoryTestSuite( File basedir, ArrayList includes, ArrayList excludes ) | |
42 | { | |
43 | 0 | super( basedir, includes, excludes ); |
44 | 0 | } |
45 | ||
46 | /** | |
47 | * This method will be called for each class to be run as a test. It returns | |
48 | * a surefire test set that will later be executed. | |
49 | * | |
50 | * @see org.apache.maven.surefire.suite.AbstractDirectoryTestSuite#createTestSet(java.lang.Class, | |
51 | *java.lang.ClassLoader) | |
52 | */ | |
53 | protected SurefireTestSet createTestSet( Class testClass, ClassLoader classLoader ) | |
54 | throws TestSetFailedException | |
55 | { | |
56 | 0 | return new JUnit4TestSet( testClass ); |
57 | } | |
58 | ||
59 | } |