public interface SystemStreamRule extends TestListenerRule
out
/
err
stream.
This rule will replace the stream with the passed one ; In case it is not
possible to change the stream (because of a
SecurityException
) no change is done and the exception is
ignored.
Modifier and Type | Method and Description |
---|---|
static SystemStreamRule |
disableBothStreams()
Provide a test rule that suppress both
system
err and system out . |
static SystemStreamRule |
disableErrStream()
Provide a test rule that suppress the
system
err stream. |
static SystemStreamRule |
disableOutStream()
Provide a test rule that suppress the
system
out stream. |
PrintStream |
getRealSystemErr()
Return the
system err that was set before
entering the rule. |
PrintStream |
getRealSystemOut()
Return the
system out that was set before
entering the rule. |
static SystemStreamRule |
replaceBothStream(PrintStream outReplacement,
PrintStream errRemplacement)
Provide a test rule that replace both
system
err and system out with the provided one. |
static SystemStreamRule |
replaceErrStream(PrintStream errReplacement)
Privde a test rule that replace the
system
err stream with the provided one |
static SystemStreamRule |
replaceOutStream(PrintStream outReplacement)
Privde a test rule that replace the
system
out stream with the provided one |
computeStatement, of, onAssumptionSkip, onEnd, onEnd, onError, onFailure, onStart, onStart
PrintStream getRealSystemOut()
system out
that was set before
entering the rule.system out
.PrintStream getRealSystemErr()
system err
that was set before
entering the rule.system err
.static SystemStreamRule disableBothStreams()
system
err
and system out
.The complete description of the
functionnality of the rule.
static SystemStreamRule replaceBothStream(PrintStream outReplacement, PrintStream errRemplacement)
system
err
and system out
with the provided one.outReplacement
- the replacement of the system out
stream.errRemplacement
- the replacement of the system err
stream.The complete description of the
functionnality of the rule.
static SystemStreamRule disableOutStream()
system
out
stream.The complete description of the
functionnality of the rule.
static SystemStreamRule disableErrStream()
system
err
stream.The complete description of the
functionnality of the rule.
static SystemStreamRule replaceOutStream(PrintStream outReplacement)
system
out
stream with the provided oneoutReplacement
- the replacement of the system out
stream.The complete description of the
functionnality of the rule.
static SystemStreamRule replaceErrStream(PrintStream errReplacement)
system
err
stream with the provided oneerrReplacement
- the replacement of the system err
stream.The complete description of the
functionnality of the rule.
Copyright © 2015 Powerunit. All rights reserved.