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>
public class SystemErrRule extends SystemErr implements SystemStubTestRule
JUnit4 test rule that capturesSystem.errduring tests.- Since:
- 1.0.0
- See Also:
SystemErr
-
-
Field Summary
-
Fields inherited from class uk.org.webcompere.systemstubs.stream.SystemStreamBase
currentTarget, originalStream, printStreamGetter, printStreamSetter, targetFactory
-
-
Constructor Summary
Constructors Constructor Description SystemErrRule()Default 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, wrap
-
Methods inherited from class uk.org.webcompere.systemstubs.resource.SingularTestResource
isActive, setup, teardown
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface uk.org.webcompere.systemstubs.resource.Executable
execute
-
Methods inherited from interface uk.org.webcompere.systemstubs.stream.output.Output
closeOutput, factoryOfSelf, getLines, getLinesNormalized, getLinesNormalized, getOutput
-
Methods inherited from interface uk.org.webcompere.systemstubs.rules.internal.SystemStubTestRule
apply
-
Methods inherited from interface uk.org.webcompere.systemstubs.resource.TestResource
execute, setup, teardown
-
-
-
-
Constructor Detail
-
SystemErrRule
public SystemErrRule(Output<? extends OutputStream> output)
Construct with an alternativeOutputto use- Parameters:
output- the output to write system error to
-
SystemErrRule
public SystemErrRule(OutputFactory<? extends OutputStream> outputFactory)
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
-
-