1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.maven.surefire.api.testset;
20
21 import java.io.File;
22
23 import org.apache.maven.surefire.api.util.RunOrder;
24
25 import static org.apache.maven.surefire.api.util.RunOrder.ALPHABETICAL;
26 import static org.apache.maven.surefire.api.util.RunOrder.DEFAULT;
27
28
29
30
31 public final class RunOrderParameters {
32 private final RunOrder[] runOrder;
33
34 private final File runStatisticsFile;
35
36 private final Long runOrderRandomSeed;
37
38 public RunOrderParameters(RunOrder[] runOrder, File runStatisticsFile) {
39 this(runOrder, runStatisticsFile, null);
40 }
41
42 public RunOrderParameters(String runOrder, File runStatisticsFile) {
43 this(runOrder, runStatisticsFile, null);
44 }
45
46 public RunOrderParameters(String runOrder, File runStatisticsFile, Long runOrderRandomSeed) {
47 this(runOrder == null ? DEFAULT : RunOrder.valueOfMulti(runOrder), runStatisticsFile, runOrderRandomSeed);
48 }
49
50 public RunOrderParameters(RunOrder[] runOrder, File runStatisticsFile, Long runOrderRandomSeed) {
51 this.runOrder = runOrder;
52 this.runStatisticsFile = runStatisticsFile;
53 this.runOrderRandomSeed = runOrderRandomSeed;
54 }
55
56 public static RunOrderParameters alphabetical() {
57 return new RunOrderParameters(new RunOrder[] {ALPHABETICAL}, null);
58 }
59
60 public RunOrder[] getRunOrder() {
61 return runOrder;
62 }
63
64 public Long getRunOrderRandomSeed() {
65 return runOrderRandomSeed;
66 }
67
68 public File getRunStatisticsFile() {
69 return runStatisticsFile;
70 }
71 }