Class DefaultTestReport

java.lang.Object
org.apache.batik.test.DefaultTestReport
All Implemented Interfaces:
TestReport

public class DefaultTestReport extends Object implements TestReport
Simple, default implementation for the TestReport interface.
Version:
$Id: DefaultTestReport.java 1733416 2016-03-03 07:07:13Z gadams $
  • Field Details

    • passed

      private boolean passed
    • description

      protected TestReport.Entry[] description
    • test

      protected Test test
    • errorCode

      private String errorCode
    • parent

      protected TestSuiteReport parent
      Parent report, in case this report is part of a TestSuiteReport
  • Constructor Details

    • DefaultTestReport

      public DefaultTestReport(Test test)
  • Method Details

    • getParentReport

      public TestSuiteReport getParentReport()
      Description copied from interface: TestReport
      Returns the parent report in case this TestReport is part of a TestSuiteReport. This may be null.
      Specified by:
      getParentReport in interface TestReport
    • setParentReport

      public void setParentReport(TestSuiteReport parent)
      Description copied from interface: TestReport
      Set this report's parent.
      Specified by:
      setParentReport in interface TestReport
    • getTest

      public Test getTest()
      Description copied from interface: TestReport
      Returns the Test object that generated this TestReport
      Specified by:
      getTest in interface TestReport
    • getErrorCode

      public String 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 interface TestReport
    • setErrorCode

      public void setErrorCode(String errorCode)
    • hasPassed

      public boolean hasPassed()
      Description copied from interface: TestReport
      Returns the overall test result
      Specified by:
      hasPassed in interface TestReport
    • setPassed

      public void setPassed(boolean passed)
    • getDescription

      public TestReport.Entry[] getDescription()
      Description copied from interface: TestReport
      Returns an array of Entry objects describing the test result. Accepted value types are String objects, URL objects, File objects and TestReport objects. File objects should be considered as temporary files
      Specified by:
      getDescription in interface TestReport
    • setDescription

      public void setDescription(TestReport.Entry[] description)
    • addDescriptionEntry

      public void addDescriptionEntry(String key, Object value)
      Description copied from interface: TestReport
      Appends entry to the array of description entry.
      Specified by:
      addDescriptionEntry in interface TestReport
    • addDescriptionEntry

      protected void addDescriptionEntry(TestReport.Entry entry)