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.Map;
25
26 import org.apache.maven.surefire.cli.CommandLineOption;
27 import org.apache.maven.surefire.report.ReporterConfiguration;
28 import org.apache.maven.surefire.testset.DirectoryScannerParameters;
29 import org.apache.maven.surefire.testset.RunOrderParameters;
30 import org.apache.maven.surefire.testset.TestArtifactInfo;
31 import org.apache.maven.surefire.testset.TestRequest;
32
33
34
35
36
37
38
39
40
41
42 public class ProviderConfiguration
43 {
44
45
46
47 public static final int TESTS_SUCCEEDED_EXIT_CODE = 0;
48
49 private final DirectoryScannerParameters dirScannerParams;
50
51 private final ReporterConfiguration reporterConfiguration;
52
53 private final TestArtifactInfo testArtifact;
54
55 private final TestRequest testSuiteDefinition;
56
57 private final RunOrderParameters runOrderParameters;
58
59 private final Map<String, String> providerProperties;
60
61 private final boolean failIfNoTests;
62
63 private final TypeEncodedValue forkTestSet;
64
65 private final boolean readTestsFromInStream;
66
67 private final List<CommandLineOption> mainCliOptions;
68
69 private int skipAfterFailureCount;
70
71 private Shutdown shutdown;
72
73 @SuppressWarnings( "checkstyle:parameternumber" )
74 public ProviderConfiguration( DirectoryScannerParameters directoryScannerParameters,
75 RunOrderParameters runOrderParameters, boolean failIfNoTests,
76 ReporterConfiguration reporterConfiguration, TestArtifactInfo testArtifact,
77 TestRequest testSuiteDefinition, Map<String, String> providerProperties,
78 TypeEncodedValue typeEncodedTestSet, boolean readTestsFromInStream,
79 List<CommandLineOption> mainCliOptions, int skipAfterFailureCount,
80 Shutdown shutdown )
81 {
82 this.runOrderParameters = runOrderParameters;
83 this.providerProperties = providerProperties;
84 this.reporterConfiguration = reporterConfiguration;
85 this.testArtifact = testArtifact;
86 this.testSuiteDefinition = testSuiteDefinition;
87 this.dirScannerParams = directoryScannerParameters;
88 this.failIfNoTests = failIfNoTests;
89 this.forkTestSet = typeEncodedTestSet;
90 this.readTestsFromInStream = readTestsFromInStream;
91 this.mainCliOptions = mainCliOptions;
92 this.skipAfterFailureCount = skipAfterFailureCount;
93 this.shutdown = shutdown;
94 }
95
96 public ReporterConfiguration getReporterConfiguration()
97 {
98 return reporterConfiguration;
99 }
100
101
102 public boolean isFailIfNoTests()
103 {
104 return failIfNoTests;
105 }
106
107 public File getBaseDir()
108 {
109 return dirScannerParams.getTestClassesDirectory();
110 }
111
112
113 public DirectoryScannerParameters getDirScannerParams()
114 {
115 return dirScannerParams;
116 }
117
118 public List getIncludes()
119 {
120 return dirScannerParams.getIncludes();
121 }
122
123 public List getExcludes()
124 {
125 return dirScannerParams.getExcludes();
126 }
127
128 public TestArtifactInfo getTestArtifact()
129 {
130 return testArtifact;
131 }
132
133 public TestRequest getTestSuiteDefinition()
134 {
135 return testSuiteDefinition;
136 }
137
138 public Map<String, String> getProviderProperties()
139 {
140 return providerProperties;
141 }
142
143 public TypeEncodedValue getTestForFork()
144 {
145 return forkTestSet;
146 }
147
148 public RunOrderParameters getRunOrderParameters()
149 {
150 return runOrderParameters;
151 }
152
153 public boolean isReadTestsFromInStream()
154 {
155 return readTestsFromInStream;
156 }
157
158 public List<CommandLineOption> getMainCliOptions()
159 {
160 return mainCliOptions;
161 }
162
163 public int getSkipAfterFailureCount()
164 {
165 return skipAfterFailureCount;
166 }
167
168 public Shutdown getShutdown()
169 {
170 return shutdown;
171 }
172 }