Package org.apache.maven.surefire.junit4
Class MockReporter
- java.lang.Object
-
- org.apache.maven.surefire.junit4.MockReporter
-
- All Implemented Interfaces:
RunListener
public class MockReporter extends java.lang.Object implements RunListener
Internal tests use only.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<java.lang.String>
events
static java.lang.String
SET_COMPLETED
static java.lang.String
SET_STARTED
static java.lang.String
TEST_COMPLETED
static java.lang.String
TEST_SKIPPED
static java.lang.String
TEST_STARTED
private java.util.concurrent.atomic.AtomicInteger
testError
private java.util.concurrent.atomic.AtomicInteger
testFailed
private java.util.concurrent.atomic.AtomicInteger
testIgnored
private java.util.concurrent.atomic.AtomicInteger
testSucceeded
-
Constructor Summary
Constructors Constructor Description MockReporter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsNotification(java.lang.String event)
int
getTestFailed()
int
getTestSucceeded()
RunMode
markAs(RunMode currentRunMode)
Marks the listener with run mode, e.g.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
testExecutionSkippedByUser()
Event fired skipping an execution of remaining test-set in other fork(s); or does nothing if no forks.void
testFailed(ReportEntry report)
Event fired when a test ended with a failure (anticipated problem)void
testSetCompleted(TestSetReportEntry report)
Indicates end of a given test-setvoid
testSetStarting(TestSetReportEntry report)
Indicates the start of a given test-setvoid
testSkipped(ReportEntry report)
Event fired when a test is skippedvoid
testSkippedByUser(ReportEntry report)
void
testStarting(ReportEntry report)
Event fired when a test is about to startvoid
testSucceeded(ReportEntry report)
Event fired when a test ended successfully
-
-
-
Field Detail
-
events
private final java.util.List<java.lang.String> events
-
SET_STARTED
public static final java.lang.String SET_STARTED
- See Also:
- Constant Field Values
-
SET_COMPLETED
public static final java.lang.String SET_COMPLETED
- See Also:
- Constant Field Values
-
TEST_STARTED
public static final java.lang.String TEST_STARTED
- See Also:
- Constant Field Values
-
TEST_COMPLETED
public static final java.lang.String TEST_COMPLETED
- See Also:
- Constant Field Values
-
TEST_SKIPPED
public static final java.lang.String TEST_SKIPPED
- See Also:
- Constant Field Values
-
testSucceeded
private final java.util.concurrent.atomic.AtomicInteger testSucceeded
-
testIgnored
private final java.util.concurrent.atomic.AtomicInteger testIgnored
-
testFailed
private final java.util.concurrent.atomic.AtomicInteger testFailed
-
testError
private final java.util.concurrent.atomic.AtomicInteger testError
-
-
Method Detail
-
testSetStarting
public void testSetStarting(TestSetReportEntry report)
Description copied from interface:RunListener
Indicates the start of a given test-set- Specified by:
testSetStarting
in interfaceRunListener
- Parameters:
report
- the report entry describing the testset
-
testSetCompleted
public void testSetCompleted(TestSetReportEntry report)
Description copied from interface:RunListener
Indicates end of a given test-set- Specified by:
testSetCompleted
in interfaceRunListener
- 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 interfaceRunListener
- 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 interfaceRunListener
- 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 interfaceRunListener
- Parameters:
report
- The report entry to log for
-
testExecutionSkippedByUser
public void testExecutionSkippedByUser()
Description copied from interface:RunListener
Event fired skipping an execution of remaining test-set in other fork(s); or does nothing if no forks. The method is called bySurefireProvider
.(The event is fired after the Nth test failed to signal skipping the rest of test-set.)
- Specified by:
testExecutionSkippedByUser
in interfaceRunListener
-
markAs
public RunMode markAs(RunMode currentRunMode)
Description copied from interface:RunListener
Marks the listener with run mode, e.g. normal run or re-run.- Specified by:
markAs
in interfaceRunListener
- Parameters:
currentRunMode
- set current run- Returns:
- previous run mode; never returns null
-
testSkippedByUser
public void testSkippedByUser(ReportEntry report)
-
getTestSucceeded
public int getTestSucceeded()
-
getTestFailed
public int getTestFailed()
-
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 interfaceRunListener
- 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 interfaceRunListener
- Parameters:
report
- The report entry to log for
-
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 interfaceRunListener
- Parameters:
report
- The report entry to log for
-
containsNotification
public boolean containsNotification(java.lang.String event)
-
-