Class TextReporter

  • All Implemented Interfaces:
    Reporter

    public class TextReporter
    extends java.lang.Object
    implements Reporter
    Reports results from TCK as tabulated text, suitable for dumping to the console or a file and being read by a human.
    See Also:
    TCK, Reporter
    • Constructor Summary

      Constructors 
      Constructor Description
      TextReporter​(java.io.PrintStream summary, java.io.PrintStream log)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void endTests()
      Report that all tests have finished.
      void exception​(Candidate.CandidateType type, java.lang.Exception exception)
      Report that something bad happened during the test.
      boolean hasErrors()
      Return true if the reporter has registered some errors
      void result​(Candidate.CandidateType type, boolean success)
      Report details about what happened when performing an instantiation test or a serialization feature test.
      void startTest​(Candidate candidate)
      Report that a test between a candidate and an objenesis instance is about to start.
      void startTests​(java.lang.String platformDescription, Objenesis objenesisStandard, Objenesis objenesisSerializer)
      Report that the tests are starting.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TextReporter

        public TextReporter​(java.io.PrintStream summary,
                            java.io.PrintStream log)
        Parameters:
        summary - Output of main report.
        log - Any additional information, useful for diagnostics.
    • Method Detail

      • startTests

        public void startTests​(java.lang.String platformDescription,
                               Objenesis objenesisStandard,
                               Objenesis objenesisSerializer)
        Description copied from interface: Reporter
        Report that the tests are starting. Provides information that is useful to be reported.
        Specified by:
        startTests in interface Reporter
        Parameters:
        platformDescription - Description the platform being run on (i.e. JVM version, vendor, etc)
        objenesisStandard - Standard Objenesis instance used
        objenesisSerializer - Serialization Objenesis instance used
      • startTest

        public void startTest​(Candidate candidate)
        Description copied from interface: Reporter
        Report that a test between a candidate and an objenesis instance is about to start.
        Specified by:
        startTest in interface Reporter
        Parameters:
        candidate - Starting to test this candidate.
      • result

        public void result​(Candidate.CandidateType type,
                           boolean success)
        Description copied from interface: Reporter
        Report details about what happened when performing an instantiation test or a serialization feature test.
        Specified by:
        result in interface Reporter
        Parameters:
        type - type of test
        success - Whether the test was successful or not
      • exception

        public void exception​(Candidate.CandidateType type,
                              java.lang.Exception exception)
        Description copied from interface: Reporter
        Report that something bad happened during the test.
        Specified by:
        exception in interface Reporter
        Parameters:
        type - type of test
        exception - Exception thrown
      • endTests

        public void endTests()
        Description copied from interface: Reporter
        Report that all tests have finished. Nothing will be called after this method.
        Specified by:
        endTests in interface Reporter
      • hasErrors

        public boolean hasErrors()
        Return true if the reporter has registered some errors
        Returns:
        if there was errors during execution