1 | |
package org.apache.maven.surefire.booter; |
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | |
|
19 | |
|
20 | |
|
21 | |
|
22 | |
import java.io.File; |
23 | |
import java.util.List; |
24 | |
import java.util.Properties; |
25 | |
import org.apache.maven.surefire.report.ReporterConfiguration; |
26 | |
import org.apache.maven.surefire.testset.DirectoryScannerParameters; |
27 | |
import org.apache.maven.surefire.testset.RunOrderParameters; |
28 | |
import org.apache.maven.surefire.testset.TestArtifactInfo; |
29 | |
import org.apache.maven.surefire.testset.TestRequest; |
30 | |
|
31 | |
|
32 | |
|
33 | |
|
34 | |
|
35 | |
|
36 | |
|
37 | |
|
38 | |
|
39 | |
|
40 | |
|
41 | |
public class ProviderConfiguration |
42 | |
{ |
43 | |
|
44 | |
|
45 | |
|
46 | |
public static final int TESTS_SUCCEEDED_EXIT_CODE = 0; |
47 | |
|
48 | |
public static final int TESTS_FAILED_EXIT_CODE = 255; |
49 | |
|
50 | |
public static final int NO_TESTS_EXIT_CODE = 254; |
51 | |
|
52 | |
private final DirectoryScannerParameters dirScannerParams; |
53 | |
|
54 | |
private final ReporterConfiguration reporterConfiguration; |
55 | |
|
56 | |
private final TestArtifactInfo testArtifact; |
57 | |
|
58 | |
private final TestRequest testSuiteDefinition; |
59 | |
|
60 | |
private final RunOrderParameters runOrderParameters; |
61 | |
|
62 | |
private final Properties providerProperties; |
63 | |
|
64 | |
private final boolean failIfNoTests; |
65 | |
|
66 | |
private final TypeEncodedValue forkTestSet; |
67 | |
|
68 | |
public ProviderConfiguration( DirectoryScannerParameters directoryScannerParameters, |
69 | |
RunOrderParameters runOrderParameters, boolean failIfNoTests, |
70 | |
ReporterConfiguration reporterConfiguration, TestArtifactInfo testArtifact, |
71 | |
TestRequest testSuiteDefinition, Properties providerProperties, |
72 | |
TypeEncodedValue typeEncodedTestSet ) |
73 | 0 | { |
74 | 0 | this.runOrderParameters = runOrderParameters; |
75 | 0 | this.providerProperties = providerProperties; |
76 | 0 | this.reporterConfiguration = reporterConfiguration; |
77 | 0 | this.testArtifact = testArtifact; |
78 | 0 | this.testSuiteDefinition = testSuiteDefinition; |
79 | 0 | this.dirScannerParams = directoryScannerParameters; |
80 | 0 | this.failIfNoTests = failIfNoTests; |
81 | 0 | this.forkTestSet = typeEncodedTestSet; |
82 | 0 | } |
83 | |
|
84 | |
|
85 | |
public ReporterConfiguration getReporterConfiguration() |
86 | |
{ |
87 | 0 | return reporterConfiguration; |
88 | |
} |
89 | |
|
90 | |
|
91 | |
public Boolean isFailIfNoTests() |
92 | |
{ |
93 | 0 | return ( failIfNoTests ) ? Boolean.TRUE : Boolean.FALSE; |
94 | |
} |
95 | |
|
96 | |
public File getBaseDir() |
97 | |
{ |
98 | 0 | return dirScannerParams.getTestClassesDirectory(); |
99 | |
} |
100 | |
|
101 | |
|
102 | |
public DirectoryScannerParameters getDirScannerParams() |
103 | |
{ |
104 | 0 | return dirScannerParams; |
105 | |
} |
106 | |
|
107 | |
public List getIncludes() |
108 | |
{ |
109 | 0 | return dirScannerParams.getIncludes(); |
110 | |
} |
111 | |
|
112 | |
public List getExcludes() |
113 | |
{ |
114 | 0 | return dirScannerParams.getExcludes(); |
115 | |
} |
116 | |
|
117 | |
public TestArtifactInfo getTestArtifact() |
118 | |
{ |
119 | 0 | return testArtifact; |
120 | |
} |
121 | |
|
122 | |
public TestRequest getTestSuiteDefinition() |
123 | |
{ |
124 | 0 | return testSuiteDefinition; |
125 | |
} |
126 | |
|
127 | |
public Properties getProviderProperties() |
128 | |
{ |
129 | 0 | return providerProperties; |
130 | |
} |
131 | |
|
132 | |
public TypeEncodedValue getTestForFork() |
133 | |
{ |
134 | 0 | return forkTestSet; |
135 | |
} |
136 | |
|
137 | |
public RunOrderParameters getRunOrderParameters() |
138 | |
{ |
139 | 0 | return runOrderParameters; |
140 | |
} |
141 | |
} |