1 package org
.argeo
.slc
.core
.test
;
5 import java
.util
.Vector
;
7 import org
.apache
.commons
.logging
.Log
;
8 import org
.apache
.commons
.logging
.LogFactory
;
10 import org
.argeo
.slc
.core
.SlcException
;
13 * Basic implementation of a test result containing only a list of result parts.
15 public class SimpleTestResult
implements TestResult
{
16 private static Log log
= LogFactory
.getLog(SimpleTestResult
.class);
18 private Boolean throwError
= true;
20 private TestResultId testResultId
;
21 private Date closeDate
;
22 private List
<TestResultPart
> parts
= new Vector
<TestResultPart
>();
24 public void addResultPart(TestResultPart part
) {
25 if (throwError
&& part
.getStatus() == ERROR
) {
26 throw new SlcException("There was an error in the underlying test",
30 if (log
.isDebugEnabled())
36 closeDate
= new Date();
39 public TestResultId
getTestResultId() {
43 /** Sets the test result id. */
44 public void setTestResultId(TestResultId testResultId
) {
45 this.testResultId
= testResultId
;
48 public List
<TestResultPart
> getParts() {
52 public Date
getCloseDate() {
56 public void setThrowError(Boolean throwError
) {
57 this.throwError
= throwError
;