| Constructor and Description |
|---|
DefaultReporter()
Constructs a reporter that writes to standard out.
|
DefaultReporter(java.io.OutputStream stream)
Constructs a reporter that writes to the specified stream, using the JVM's default charset.
|
DefaultReporter(java.io.OutputStream stream,
java.nio.charset.Charset charset)
Constructs a reporter that writes to the specified stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
blockHookFail(Hook hook,
java.util.List<TestBlock> parents,
java.lang.Throwable cause)
Called when a before or after hook failed due to it throwing an exception.
|
void |
end()
Called after all tests have been run.
|
void |
start(TestBlock rootBlock)
Called before any tests are run.
|
void |
testBlockEnd(TestBlock testBlock,
java.util.List<TestBlock> parents)
Called after all tests in a test block have completed.
|
void |
testBlockStart(TestBlock testBlock,
java.util.List<TestBlock> parents)
Called before any tests are run in a test block.
|
void |
testFail(Test test,
java.util.List<TestBlock> parents,
java.lang.Throwable cause)
Called after a test has failed due to it throwing an exception.
|
void |
testHookFail(Hook hook,
java.util.List<TestBlock> hookParents,
Test test,
java.util.List<TestBlock> testParents,
java.lang.Throwable cause)
Called when a beforeEach or afterEach hook failed due to it throwing an exception.
|
void |
testPass(Test test,
java.util.List<TestBlock> parents)
Called after a test has successfully executed without throwing an exception.
|
void |
testPending(Test test,
java.util.List<TestBlock> parents)
Called when a test cannot be run as it has not yet been implemented.
|
void |
testSkip(Test test,
java.util.List<TestBlock> parents)
Called when a test has been skipped.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitblockHookPass, blockHookStart, hookFail, testEnd, testHookPass, testHookStart, testStartpublic DefaultReporter()
public DefaultReporter(java.io.OutputStream stream)
stream - A stream to write to.public DefaultReporter(java.io.OutputStream stream,
java.nio.charset.Charset charset)
throws java.io.UnsupportedEncodingException
stream - A stream to write to.charset - The charset to convert the output to.java.io.UnsupportedEncodingException - If the charset is not supported by the JVM.public void start(TestBlock rootBlock)
Reporterpublic void end()
Reporterpublic void testBlockStart(TestBlock testBlock, java.util.List<TestBlock> parents)
ReportertestBlockStart in interface ReportertestBlock - The test block.parents - The ancestor test blocks, starting with the root block and ending with the immediate parent.public void testBlockEnd(TestBlock testBlock, java.util.List<TestBlock> parents)
ReportertestBlockEnd in interface ReportertestBlock - The test block.parents - The ancestor test blocks, starting with the root block and ending with the immediate parent.public void testHookFail(Hook hook, java.util.List<TestBlock> hookParents, Test test, java.util.List<TestBlock> testParents, java.lang.Throwable cause)
ReportertestHookFail in interface Reporterhook - The hook that threw an exception.hookParents - The parent test blocks of the hook, starting with the root block and ending with the immediate
parent.test - The test that was associated with the beforeEach/afterEach.testParents - The parent test blocks of the test, starting with the root block and ending with the immediate
parent.cause - The throwable that the hook threw.public void blockHookFail(Hook hook, java.util.List<TestBlock> parents, java.lang.Throwable cause)
ReporterblockHookFail in interface Reporterhook - The hook that threw an exception.parents - The parent test blocks of the hook, starting with the root block and ending with the immediate
parent.cause - The throwable that the hook threw.public void testPass(Test test, java.util.List<TestBlock> parents)
Reporterpublic void testFail(Test test, java.util.List<TestBlock> parents, java.lang.Throwable cause)
Reporterpublic void testPending(Test test, java.util.List<TestBlock> parents)
ReportertestPending in interface Reportertest - The pending test.parents - The ancestor test blocks, starting with the root block and ending with the immediate parent.