Package org.apache.batik.test
Class DefaultTestReport
- java.lang.Object
-
- org.apache.batik.test.DefaultTestReport
-
- All Implemented Interfaces:
TestReport
public class DefaultTestReport extends java.lang.Object implements TestReport
Simple, default implementation for theTestReportinterface.- 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
Fields Modifier and Type Field Description protected TestReport.Entry[]descriptionprivate java.lang.StringerrorCodeprotected TestSuiteReportparentParent report, in case this report is part of aTestSuiteReportprivate booleanpassedprotected Testtest-
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 Constructor Description DefaultTestReport(Test test)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDescriptionEntry(java.lang.String key, java.lang.Object value)Appendsentryto the array of description entry.protected voidaddDescriptionEntry(TestReport.Entry entry)TestReport.Entry[]getDescription()Returns an array ofEntryobjects describing the test result.java.lang.StringgetErrorCode()Returns the error code.TestSuiteReportgetParentReport()Returns the parent report in case thisTestReportis part of aTestSuiteReport.TestgetTest()Returns theTestobject that generated thisTestReportbooleanhasPassed()Returns the overall test resultvoidsetDescription(TestReport.Entry[] description)voidsetErrorCode(java.lang.String errorCode)voidsetParentReport(TestSuiteReport parent)Set this report's parent.voidsetPassed(boolean passed)
-
-
-
Field Detail
-
passed
private boolean passed
-
description
protected TestReport.Entry[] description
-
test
protected Test test
-
errorCode
private java.lang.String errorCode
-
parent
protected TestSuiteReport parent
Parent report, in case this report is part of aTestSuiteReport
-
-
Constructor Detail
-
DefaultTestReport
public DefaultTestReport(Test test)
-
-
Method Detail
-
getParentReport
public TestSuiteReport getParentReport()
Description copied from interface:TestReportReturns the parent report in case thisTestReportis part of aTestSuiteReport. This may be null.- Specified by:
getParentReportin interfaceTestReport
-
setParentReport
public void setParentReport(TestSuiteReport parent)
Description copied from interface:TestReportSet this report's parent.- Specified by:
setParentReportin interfaceTestReport
-
getTest
public Test getTest()
Description copied from interface:TestReportReturns theTestobject that generated thisTestReport- Specified by:
getTestin interfaceTestReport
-
getErrorCode
public java.lang.String getErrorCode()
Description copied from interface:TestReportReturns the error code. This should never be null if the test failed (i.e., if hasPassed returns false).- Specified by:
getErrorCodein interfaceTestReport
-
setErrorCode
public void setErrorCode(java.lang.String errorCode)
-
hasPassed
public boolean hasPassed()
Description copied from interface:TestReportReturns the overall test result- Specified by:
hasPassedin interfaceTestReport
-
setPassed
public void setPassed(boolean passed)
-
getDescription
public TestReport.Entry[] getDescription()
Description copied from interface:TestReportReturns an array ofEntryobjects describing the test result. Accepted value types areStringobjects,URLobjects,Fileobjects andTestReportobjects.Fileobjects should be considered as temporary files- Specified by:
getDescriptionin interfaceTestReport
-
setDescription
public void setDescription(TestReport.Entry[] description)
-
addDescriptionEntry
public void addDescriptionEntry(java.lang.String key, java.lang.Object value)Description copied from interface:TestReportAppendsentryto the array of description entry.- Specified by:
addDescriptionEntryin interfaceTestReport
-
addDescriptionEntry
protected void addDescriptionEntry(TestReport.Entry entry)
-
-