public class SystemInRule extends SystemIn implements SystemStubTestRule
SystemIn system stub as a JUnit 4 test rule| Constructor and Description |
|---|
SystemInRule(AltInputStream altInputStream)
Construct with any of the
AltInputStream objects - e.g. |
SystemInRule(InputStream inputStream)
Construct with an input stream to read from - this will be closed on tidy up
|
SystemInRule(String... lines)
Construct with multiple lines on System.in
|
andExceptionThrownOnInputEnd, andExceptionThrownOnInputEnd, doSetup, doTeardown, setInputStream, setInputStreamisActive, setup, teardownclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapplyexecute, setup, teardownexecutepublic SystemInRule(String... lines)
lines - lines to provide - will be separated by system line separatorpublic SystemInRule(InputStream inputStream)
inputStream - the stream to read frompublic SystemInRule(AltInputStream altInputStream)
AltInputStream objects - e.g.
LinesAltStreamaltInputStream - the stream to use while the rule is activeCopyright © 2020–2023. All rights reserved.