Class SystemErrRule
java.lang.Object
uk.org.webcompere.systemstubs.resource.SingularTestResource
uk.org.webcompere.systemstubs.stream.SystemStreamBase
uk.org.webcompere.systemstubs.stream.SystemErr
uk.org.webcompere.systemstubs.rules.SystemErrRule
- All Implemented Interfaces:
org.junit.rules.TestRule,Executable,TestResource,SystemStubTestRule,Output<OutputStream>
JUnit4 test rule that captures
System.err during tests.- Since:
- 1.0.0
- See Also:
-
Field Summary
Fields inherited from class uk.org.webcompere.systemstubs.stream.SystemStreamBase
currentTarget, originalStream, printStreamGetter, printStreamSetter, targetFactory -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor, uses aTapStreamto tap system error while the rule is activeSystemErrRule(Output<? extends OutputStream> output) Construct with an alternativeOutputto useSystemErrRule(OutputFactory<? extends OutputStream> outputFactory) Construct with aOutputFactoryfor creating output objects from the existing output -
Method Summary
Methods inherited from class uk.org.webcompere.systemstubs.stream.SystemStreamBase
clear, doSetup, doTeardown, getOutputStream, getText, wrapMethods inherited from class uk.org.webcompere.systemstubs.resource.SingularTestResource
isActive, setup, teardownMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface uk.org.webcompere.systemstubs.resource.Executable
executeMethods inherited from interface uk.org.webcompere.systemstubs.stream.output.Output
closeOutput, factoryOfSelf, getLines, getLinesNormalized, getLinesNormalized, getOutputMethods inherited from interface uk.org.webcompere.systemstubs.rules.internal.SystemStubTestRule
applyMethods inherited from interface uk.org.webcompere.systemstubs.resource.TestResource
execute, setup, teardown
-
Constructor Details
-
SystemErrRule
Construct with an alternativeOutputto use- Parameters:
output- the output to write system error to
-
SystemErrRule
Construct with aOutputFactoryfor creating output objects from the existing output- Parameters:
outputFactory- the factory to use
-
SystemErrRule
public SystemErrRule()Default constructor, uses aTapStreamto tap system error while the rule is active
-