1 package org.apache.maven.plugins.surefire.report;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import org.apache.maven.shared.utils.StringUtils;
23
24
25
26
27 public final class ReportTestCase
28 {
29 private String fullClassName;
30
31 private String className;
32
33 private String fullName;
34
35 private String name;
36
37 private float time;
38
39 private String failureMessage;
40
41 private String failureType;
42
43 private String failureErrorLine;
44
45 private String failureDetail;
46
47 private boolean hasFailure;
48
49 public String getName()
50 {
51 return name;
52 }
53
54 public ReportTestCase setName( String name )
55 {
56 this.name = name;
57 return this;
58 }
59
60 public String getFullClassName()
61 {
62 return fullClassName;
63 }
64
65 public ReportTestCase setFullClassName( String name )
66 {
67 fullClassName = name;
68 return this;
69 }
70
71 public String getClassName()
72 {
73 return className;
74 }
75
76 public ReportTestCase setClassName( String name )
77 {
78 className = name;
79 return this;
80 }
81
82 public float getTime()
83 {
84 return time;
85 }
86
87 public ReportTestCase setTime( float time )
88 {
89 this.time = time;
90 return this;
91 }
92
93 public String getFullName()
94 {
95 return fullName;
96 }
97
98 public ReportTestCase setFullName( String fullName )
99 {
100 this.fullName = fullName;
101 return this;
102 }
103
104 public String getFailureMessage()
105 {
106 return failureMessage;
107 }
108
109 private ReportTestCase setFailureMessage( String failureMessage )
110 {
111 this.failureMessage = failureMessage;
112 return this;
113 }
114
115 public String getFailureType()
116 {
117 return failureType;
118 }
119
120 private ReportTestCase setFailureType( String failureType )
121 {
122 this.failureType = failureType;
123 return this;
124 }
125
126 public String getFailureErrorLine()
127 {
128 return failureErrorLine;
129 }
130
131 public ReportTestCase setFailureErrorLine( String failureErrorLine )
132 {
133 this.failureErrorLine = failureErrorLine;
134 return this;
135 }
136
137 public String getFailureDetail()
138 {
139 return failureDetail;
140 }
141
142 public ReportTestCase setFailureDetail( String failureDetail )
143 {
144 this.failureDetail = failureDetail;
145 return this;
146 }
147
148 public ReportTestCase setFailure( String message, String type )
149 {
150 hasFailure = StringUtils.isNotBlank( type );
151 return setFailureMessage( message ).setFailureType( type );
152 }
153
154 public boolean hasFailure()
155 {
156 return hasFailure;
157 }
158
159
160
161
162 public String toString()
163 {
164 return fullName;
165 }
166 }