org.apache.maven.plugin.surefire.booterclient
Class MockReporter

java.lang.Object
  extended by org.apache.maven.plugin.surefire.booterclient.MockReporter
All Implemented Interfaces:
ConsoleLogger, ConsoleOutputReceiver, RunListener

public class MockReporter
extends Object
implements RunListener, ConsoleLogger, ConsoleOutputReceiver

Internal use only


Field Summary
static String CONSOLE_OUTPUT
           
static String SET_COMPLETED
           
static String SET_STARTING
           
static String STDERR
           
static String STDOUT
           
static String TEST_ASSUMPTION_FAIL
           
static String TEST_ERROR
           
static String TEST_FAILED
           
static String TEST_SKIPPED
           
static String TEST_STARTING
           
static String TEST_SUCCEEDED
           
 
Constructor Summary
MockReporter()
           
 
Method Summary
 List getData()
           
 List getEvents()
           
 ReportEntry getFirstData()
           
 String getFirstEvent()
           
 void info(String message)
           
 void testAssumptionFailure(ReportEntry report)
          Event fired when a test assumption failure was encountered.
 void testError(ReportEntry report)
          Event fired when a test ended with an error (non anticipated problem)
 void testFailed(ReportEntry report)
          Event fired when a test ended with a failure (anticipated problem)
 void testSetCompleted(ReportEntry report)
          Indicates end of a given test-set
 void testSetStarting(ReportEntry report)
          Indicates the start of a given test-set
 void testSkipped(ReportEntry report)
          Event fired when a test is skipped
 void testStarting(ReportEntry report)
          Event fired when a test is about to start
 void testSucceeded(ReportEntry report)
          Event fired when a test ended successfully
 void writeTestOutput(byte[] buf, int off, int len, boolean stdout)
          Forwards process output from the running test-case into the reporting system
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SET_STARTING

public static final String SET_STARTING
See Also:
Constant Field Values

SET_COMPLETED

public static final String SET_COMPLETED
See Also:
Constant Field Values

TEST_STARTING

public static final String TEST_STARTING
See Also:
Constant Field Values

TEST_SUCCEEDED

public static final String TEST_SUCCEEDED
See Also:
Constant Field Values

TEST_FAILED

public static final String TEST_FAILED
See Also:
Constant Field Values

TEST_ERROR

public static final String TEST_ERROR
See Also:
Constant Field Values

TEST_SKIPPED

public static final String TEST_SKIPPED
See Also:
Constant Field Values

TEST_ASSUMPTION_FAIL

public static final String TEST_ASSUMPTION_FAIL
See Also:
Constant Field Values

CONSOLE_OUTPUT

public static final String CONSOLE_OUTPUT
See Also:
Constant Field Values

STDOUT

public static final String STDOUT
See Also:
Constant Field Values

STDERR

public static final String STDERR
See Also:
Constant Field Values
Constructor Detail

MockReporter

public MockReporter()
Method Detail

testSetStarting

public void testSetStarting(ReportEntry report)
Description copied from interface: RunListener
Indicates the start of a given test-set

Specified by:
testSetStarting in interface RunListener
Parameters:
report - the report entry describing the testset

testSetCompleted

public void testSetCompleted(ReportEntry report)
Description copied from interface: RunListener
Indicates end of a given test-set

Specified by:
testSetCompleted in interface RunListener
Parameters:
report - the report entry describing the testset

testStarting

public void testStarting(ReportEntry report)
Description copied from interface: RunListener
Event fired when a test is about to start

Specified by:
testStarting in interface RunListener
Parameters:
report - The report entry to log for

testSucceeded

public void testSucceeded(ReportEntry report)
Description copied from interface: RunListener
Event fired when a test ended successfully

Specified by:
testSucceeded in interface RunListener
Parameters:
report - The report entry to log for

testError

public void testError(ReportEntry report)
Description copied from interface: RunListener
Event fired when a test ended with an error (non anticipated problem)

Specified by:
testError in interface RunListener
Parameters:
report - The report entry to log for

testFailed

public void testFailed(ReportEntry report)
Description copied from interface: RunListener
Event fired when a test ended with a failure (anticipated problem)

Specified by:
testFailed in interface RunListener
Parameters:
report - The report entry to log for

testSkipped

public void testSkipped(ReportEntry report)
Description copied from interface: RunListener
Event fired when a test is skipped

Specified by:
testSkipped in interface RunListener
Parameters:
report - The report entry to log for

getEvents

public List getEvents()

getData

public List getData()

getFirstEvent

public String getFirstEvent()

getFirstData

public ReportEntry getFirstData()

testAssumptionFailure

public void testAssumptionFailure(ReportEntry report)
Description copied from interface: RunListener
Event fired when a test assumption failure was encountered. An assumption failure indicates that the test is not relevant

Specified by:
testAssumptionFailure in interface RunListener
Parameters:
report - The report entry to log for

info

public void info(String message)
Specified by:
info in interface ConsoleLogger

writeTestOutput

public void writeTestOutput(byte[] buf,
                            int off,
                            int len,
                            boolean stdout)
Description copied from interface: ConsoleOutputReceiver
Forwards process output from the running test-case into the reporting system

Specified by:
writeTestOutput in interface ConsoleOutputReceiver
Parameters:
buf - the buffer to write
off - offset
len - len
stdout - Indicates if this is stdout


Copyright © 2004-2012 Apache Software Foundation. All Rights Reserved.