com.googlecode.lightest.core
Class LightestReporter

java.lang.Object
  extended by com.googlecode.lightest.core.LightestReporter
All Implemented Interfaces:
ILightestReporter, groovy.lang.GroovyObject
Direct Known Subclasses:
DefaultDetailsReporter, DefaultSummaryReporter, LightestReporterAdapter, PendingReporter, ReporterInvoker

public class LightestReporter
extends Object
implements groovy.lang.GroovyObject, ILightestReporter

An adapter class with no actual reporting functionality. Subclasses can choose to implement any or all of the reporting-related methods.


Field Summary
static int DEFAULT_COOLDOWN_FACTOR
          the default value for cooldownFactor
 
Constructor Summary
LightestReporter()
          The reporter is not marked as scheduled, by default.
 
Method Summary
 void generateBaseReport(TestRegistry testRegistry, String outputDir)
          No-op.
 String getConfigText()
           
 int getCooldownFactor()
          Returns a factor by which the runtime of the report should be multipled by to obtain a cooldown period during which the report should not be updated.
 groovy.lang.MetaClass getMetaClass()
           
 Object getProperty(String name)
           
 boolean getScheduled()
           
 Object invokeMethod(String name, Object args)
           
 boolean isScheduled()
          Returns true if this reporter may be scheduled, false otherwise.
 void onUpdateDeferred()
          No-op.
 void setConfigText(String value)
          Sets the textual configuration used to configure this run.
 void setCooldownFactor(int value)
           
 void setMetaClass(groovy.lang.MetaClass metaClass)
           
 void setProperty(String name, Object value)
           
 void setScheduled(boolean value)
          Sets whether this reporter can be scheduled.
 void updateReport(ISuite suite, TestRegistry testRegistry, String outputDir)
          No-op.
 void updateReport(LightestTestResult result, TestRegistry testRegistry, List xmlSuites, List suites, String outputDirectory)
          No-op.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_COOLDOWN_FACTOR

public static final int DEFAULT_COOLDOWN_FACTOR
the default value for cooldownFactor

See Also:
Constant Field Values
Constructor Detail

LightestReporter

public LightestReporter()
The reporter is not marked as scheduled, by default. configText is null by default.

Method Detail

getConfigText

public String getConfigText()

setConfigText

public void setConfigText(String value)
Description copied from interface: ILightestReporter
Sets the textual configuration used to configure this run.

Specified by:
setConfigText in interface ILightestReporter
Parameters:
value - the textual configuration, or null

getScheduled

public boolean getScheduled()

isScheduled

public boolean isScheduled()
Description copied from interface: ILightestReporter
Returns true if this reporter may be scheduled, false otherwise.

Specified by:
isScheduled in interface ILightestReporter

setScheduled

public void setScheduled(boolean value)
Description copied from interface: ILightestReporter
Sets whether this reporter can be scheduled.

Specified by:
setScheduled in interface ILightestReporter

getCooldownFactor

public int getCooldownFactor()
Description copied from interface: ILightestReporter
Returns a factor by which the runtime of the report should be multipled by to obtain a cooldown period during which the report should not be updated. Non-positive values indicate no cooldown need be observed.

Specified by:
getCooldownFactor in interface ILightestReporter

setCooldownFactor

public void setCooldownFactor(int value)

generateBaseReport

public void generateBaseReport(TestRegistry testRegistry,
                               String outputDir)
No-op.

Specified by:
generateBaseReport in interface ILightestReporter
Parameters:
testRegistry - the registry contains all known information about pending tests.

updateReport

public void updateReport(ISuite suite,
                         TestRegistry testRegistry,
                         String outputDir)
No-op.

Specified by:
updateReport in interface ILightestReporter
Parameters:
suite - the suite that is about to run
testRegistry - the registry contains all known information about pending and completed tests

updateReport

public void updateReport(LightestTestResult result,
                         TestRegistry testRegistry,
                         List xmlSuites,
                         List suites,
                         String outputDirectory)
No-op.

Specified by:
updateReport in interface ILightestReporter
Parameters:
result - the result for which to update the report.
testRegistry - the registry contains all known information about pending and completed tests

onUpdateDeferred

public void onUpdateDeferred()
No-op.

Specified by:
onUpdateDeferred in interface ILightestReporter

getMetaClass

public groovy.lang.MetaClass getMetaClass()
Specified by:
getMetaClass in interface groovy.lang.GroovyObject

setMetaClass

public void setMetaClass(groovy.lang.MetaClass metaClass)
Specified by:
setMetaClass in interface groovy.lang.GroovyObject

invokeMethod

public Object invokeMethod(String name,
                           Object args)
Specified by:
invokeMethod in interface groovy.lang.GroovyObject

getProperty

public Object getProperty(String name)
Specified by:
getProperty in interface groovy.lang.GroovyObject

setProperty

public void setProperty(String name,
                        Object value)
Specified by:
setProperty in interface groovy.lang.GroovyObject


Copyright © 2009. All Rights Reserved.