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