Newer
Older
package fr.emse.gitlab.saref.entities.tests;
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* @author Omar Qawasmeh
*
*
*/
@XmlRootElement(name = "testsuites")
@XmlType(propOrder = { "name", "tests", "failures", "errors", "testSuites" })
public class TestSuites implements Serializable {
@XmlAttribute
private String name = "";
@XmlAttribute
private int tests = 0;
@XmlAttribute
private int failures = 0;
@XmlAttribute
private int errors = 0;
@XmlElement(name = "testsuite")
private List<TestSuite> testSuites = new ArrayList<>();
public TestSuites() {}
public TestSuites(String name) {
this.name = name;
}
public String getName() {
return name;
}
public int getFailures() {
return failures;
}
public int getErrors() {
return errors;
}
public void addTestsuite(TestSuite testSuite) {
testSuites.add(testSuite);
tests+=testSuite.getTests();
failures+=testSuite.getFailures();
errors+=testSuite.getErrors();
}
public List<TestSuite> getTestSuites() {
return testSuites;
}
}