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 | |
public class ProviderConfiguration |
41 | |
{ |
42 | |
|
43 | |
|
44 | |
|
45 | |
public static final int TESTS_SUCCEEDED_EXIT_CODE = 0; |
46 | |
|
47 | |
private final DirectoryScannerParameters dirScannerParams; |
48 | |
|
49 | |
private final ReporterConfiguration reporterConfiguration; |
50 | |
|
51 | |
private final TestArtifactInfo testArtifact; |
52 | |
|
53 | |
private final TestRequest testSuiteDefinition; |
54 | |
|
55 | |
private final RunOrderParameters runOrderParameters; |
56 | |
|
57 | |
private final Properties providerProperties; |
58 | |
|
59 | |
private final boolean failIfNoTests; |
60 | |
|
61 | |
private final TypeEncodedValue forkTestSet; |
62 | |
|
63 | |
private final boolean readTestsFromInStream; |
64 | |
|
65 | |
public ProviderConfiguration( DirectoryScannerParameters directoryScannerParameters, |
66 | |
RunOrderParameters runOrderParameters, boolean failIfNoTests, |
67 | |
ReporterConfiguration reporterConfiguration, TestArtifactInfo testArtifact, |
68 | |
TestRequest testSuiteDefinition, Properties providerProperties, |
69 | |
TypeEncodedValue typeEncodedTestSet, boolean readTestsFromInStream ) |
70 | 0 | { |
71 | 0 | this.runOrderParameters = runOrderParameters; |
72 | 0 | this.providerProperties = providerProperties; |
73 | 0 | this.reporterConfiguration = reporterConfiguration; |
74 | 0 | this.testArtifact = testArtifact; |
75 | 0 | this.testSuiteDefinition = testSuiteDefinition; |
76 | 0 | this.dirScannerParams = directoryScannerParameters; |
77 | 0 | this.failIfNoTests = failIfNoTests; |
78 | 0 | this.forkTestSet = typeEncodedTestSet; |
79 | 0 | this.readTestsFromInStream = readTestsFromInStream; |
80 | 0 | } |
81 | |
|
82 | |
|
83 | |
public ReporterConfiguration getReporterConfiguration() |
84 | |
{ |
85 | 0 | return reporterConfiguration; |
86 | |
} |
87 | |
|
88 | |
|
89 | |
public Boolean isFailIfNoTests() |
90 | |
{ |
91 | 0 | return ( failIfNoTests ) ? Boolean.TRUE : Boolean.FALSE; |
92 | |
} |
93 | |
|
94 | |
public File getBaseDir() |
95 | |
{ |
96 | 0 | return dirScannerParams.getTestClassesDirectory(); |
97 | |
} |
98 | |
|
99 | |
|
100 | |
public DirectoryScannerParameters getDirScannerParams() |
101 | |
{ |
102 | 0 | return dirScannerParams; |
103 | |
} |
104 | |
|
105 | |
public List getIncludes() |
106 | |
{ |
107 | 0 | return dirScannerParams.getIncludes(); |
108 | |
} |
109 | |
|
110 | |
public List getExcludes() |
111 | |
{ |
112 | 0 | return dirScannerParams.getExcludes(); |
113 | |
} |
114 | |
|
115 | |
public TestArtifactInfo getTestArtifact() |
116 | |
{ |
117 | 0 | return testArtifact; |
118 | |
} |
119 | |
|
120 | |
public TestRequest getTestSuiteDefinition() |
121 | |
{ |
122 | 0 | return testSuiteDefinition; |
123 | |
} |
124 | |
|
125 | |
public Properties getProviderProperties() |
126 | |
{ |
127 | 0 | return providerProperties; |
128 | |
} |
129 | |
|
130 | |
public TypeEncodedValue getTestForFork() |
131 | |
{ |
132 | 0 | return forkTestSet; |
133 | |
} |
134 | |
|
135 | |
public RunOrderParameters getRunOrderParameters() |
136 | |
{ |
137 | 0 | return runOrderParameters; |
138 | |
} |
139 | |
|
140 | |
|
141 | |
public boolean isReadTestsFromInStream() |
142 | |
{ |
143 | 0 | return readTestsFromInStream; |
144 | |
} |
145 | |
} |