Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
DirectoryScannerParameters |
|
| 1.0;1 |
1 | package org.apache.maven.surefire.testset; | |
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 java.io.File; | |
23 | import java.util.List; | |
24 | ||
25 | /** | |
26 | * @author Kristian Rosenvold | |
27 | */ | |
28 | public class DirectoryScannerParameters | |
29 | { | |
30 | private final File testClassesDirectory; | |
31 | ||
32 | private final List includes; | |
33 | ||
34 | private final List excludes; | |
35 | ||
36 | private final Boolean failIfNoTests; | |
37 | ||
38 | private final String runOrder; | |
39 | ||
40 | public DirectoryScannerParameters( File testClassesDirectory, List includes, List excludes, Boolean failIfNoTests, String runOrder ) | |
41 | 0 | { |
42 | 0 | this.testClassesDirectory = testClassesDirectory; |
43 | 0 | this.includes = includes; |
44 | 0 | this.excludes = excludes; |
45 | 0 | this.failIfNoTests = failIfNoTests; |
46 | 0 | this.runOrder = runOrder; |
47 | 0 | } |
48 | ||
49 | /** | |
50 | * Returns the directory of the compiled classes, normally ${project.build.testOutputDirectory} | |
51 | * @return A directory that can be scanned for .class files | |
52 | */ | |
53 | public File getTestClassesDirectory() | |
54 | { | |
55 | 0 | return testClassesDirectory; |
56 | } | |
57 | ||
58 | /** | |
59 | * The includes pattern list, as specified on the plugin includes parameter. | |
60 | * @return A list of patterns. May contain both source file designators and .class extensions. | |
61 | */ | |
62 | public List getIncludes() | |
63 | { | |
64 | 0 | return includes; |
65 | } | |
66 | ||
67 | /** | |
68 | * The excludes pattern list, as specified on the plugin includes parameter. | |
69 | * @return A list of patterns. May contain both source file designators and .class extensions. | |
70 | */ | |
71 | public List getExcludes() | |
72 | { | |
73 | 0 | return excludes; |
74 | } | |
75 | ||
76 | /** | |
77 | * Indicates if lack of runable tests should fail the entire build | |
78 | * @return true if no tests should fail the build | |
79 | */ | |
80 | public Boolean isFailIfNoTests() | |
81 | { | |
82 | 0 | return failIfNoTests; |
83 | } | |
84 | ||
85 | public String getRunOrder() | |
86 | { | |
87 | 0 | return runOrder; |
88 | } | |
89 | } |