Package org.apache.batik.test
Class DefaultTestReport
java.lang.Object
org.apache.batik.test.DefaultTestReport
- All Implemented Interfaces:
TestReport
Simple, default implementation for the
TestReport
interface.- Version:
- $Id: DefaultTestReport.java 1733416 2016-03-03 07:07:13Z gadams $
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.batik.test.TestReport
TestReport.Entry
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected TestReport.Entry[]
private String
protected TestSuiteReport
Parent report, in case this report is part of aTestSuiteReport
private boolean
protected Test
Fields inherited from interface org.apache.batik.test.TestReport
ENTRY_KEY_ERROR_CONDITION_STACK_TRACE, ENTRY_KEY_INTERNAL_TEST_FAILURE_EXCEPTION_CLASS, ENTRY_KEY_INTERNAL_TEST_FAILURE_EXCEPTION_MESSAGE, ENTRY_KEY_INTERNAL_TEST_FAILURE_EXCEPTION_STACK_TRACE, ENTRY_KEY_REPORTED_TEST_FAILURE_EXCEPTION_CLASS, ENTRY_KEY_REPORTED_TEST_FAILURE_EXCEPTION_MESSAGE, ENTRY_KEY_REPORTED_TEST_FAILURE_EXCEPTION_STACK_TRACE, ERROR_ASSERTION_FAILED, ERROR_INTERNAL_TEST_FAILURE, ERROR_TEST_FAILED
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDescriptionEntry
(String key, Object value) Appendsentry
to the array of description entry.protected void
Returns an array ofEntry
objects describing the test result.Returns the error code.Returns the parent report in case thisTestReport
is part of aTestSuiteReport
.getTest()
Returns theTest
object that generated thisTestReport
boolean
Returns the overall test resultvoid
setDescription
(TestReport.Entry[] description) void
setErrorCode
(String errorCode) void
setParentReport
(TestSuiteReport parent) Set this report's parent.void
setPassed
(boolean passed)
-
Field Details
-
passed
private boolean passed -
description
-
test
-
errorCode
-
parent
Parent report, in case this report is part of aTestSuiteReport
-
-
Constructor Details
-
DefaultTestReport
-
-
Method Details
-
getParentReport
Description copied from interface:TestReport
Returns the parent report in case thisTestReport
is part of aTestSuiteReport
. This may be null.- Specified by:
getParentReport
in interfaceTestReport
-
setParentReport
Description copied from interface:TestReport
Set this report's parent.- Specified by:
setParentReport
in interfaceTestReport
-
getTest
Description copied from interface:TestReport
Returns theTest
object that generated thisTestReport
- Specified by:
getTest
in interfaceTestReport
-
getErrorCode
Description copied from interface:TestReport
Returns the error code. This should never be null if the test failed (i.e., if hasPassed returns false).- Specified by:
getErrorCode
in interfaceTestReport
-
setErrorCode
-
hasPassed
public boolean hasPassed()Description copied from interface:TestReport
Returns the overall test result- Specified by:
hasPassed
in interfaceTestReport
-
setPassed
public void setPassed(boolean passed) -
getDescription
Description copied from interface:TestReport
Returns an array ofEntry
objects describing the test result. Accepted value types areString
objects,URL
objects,File
objects andTestReport
objects.File
objects should be considered as temporary files- Specified by:
getDescription
in interfaceTestReport
-
setDescription
-
addDescriptionEntry
Description copied from interface:TestReport
Appendsentry
to the array of description entry.- Specified by:
addDescriptionEntry
in interfaceTestReport
-
addDescriptionEntry
-