1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.maven.continuum.reports.surefire;
20
21 import java.util.LinkedList;
22 import java.util.List;
23
24
25
26
27
28
29 public class ReportTestResult
30 {
31
32 private int testCount = 0;
33
34 private int failureCount = 0;
35
36 private int errorCount = 0;
37
38 private float totalTime = 0;
39
40 private List<ReportTestSuite> suiteResults;
41
42 public void addReportTestSuite( ReportTestSuite reportTestSuite )
43 {
44 if ( this.suiteResults == null )
45 {
46 this.suiteResults = new LinkedList<ReportTestSuite>();
47 }
48 this.suiteResults.add( reportTestSuite );
49 this.testCount += reportTestSuite.getNumberOfTests();
50 this.failureCount += reportTestSuite.getNumberOfFailures();
51 this.errorCount += reportTestSuite.getNumberOfErrors();
52 this.totalTime += reportTestSuite.getTimeElapsed();
53 }
54
55
56 public int getTestCount()
57 {
58 return testCount;
59 }
60
61 public void setTestCount( int testCount )
62 {
63 this.testCount = testCount;
64 }
65
66 public int getFailureCount()
67 {
68 return failureCount;
69 }
70
71 public void setFailureCount( int failureCount )
72 {
73 this.failureCount = failureCount;
74 }
75
76 public int getErrorCount()
77 {
78 return errorCount;
79 }
80
81 public void setErrorCount( int errorCount )
82 {
83 this.errorCount = errorCount;
84 }
85
86 public List<ReportTestSuite> getSuiteResults()
87 {
88 return suiteResults;
89 }
90
91 public void setSuiteResults( List<ReportTestSuite> suiteResults )
92 {
93 this.suiteResults = suiteResults;
94 }
95
96 public float getTotalTime()
97 {
98 return totalTime;
99 }
100
101 public void setTotalTime( float totalTime )
102 {
103 this.totalTime = totalTime;
104 }
105
106 }