public class MockTextTerminal extends AbstractTextTerminal<MockTextTerminal>
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_READS |
DEFAULT_USER_INTERRUPT_KEY, SYSPROP_PROPERTIES_FILE_LOCATION
Constructor and Description |
---|
MockTextTerminal() |
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.String> |
getInputs() |
int |
getMaxReads() |
java.lang.String |
getOutput() |
int |
getReadCalls() |
void |
println()
Terminates the current line by writing the line separator string.
|
void |
rawPrint(java.lang.String message)
Prints the message in its raw form.
|
java.lang.String |
read(boolean masking)
Reads a line of text
|
void |
setMaxReads(int maxReads) |
static java.lang.String |
stripAll(java.lang.String text) |
addDefaultProperty, getDefaultProperties, getProperties, getPropertiesPrefixes, getPropertiesReader, init, initProperties, initProperties, initProperties
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
abort, applyWithPropertiesConfigurator, dispose, dispose, executeWithPropertiesConfigurator, moveToLineStart, print, print, printf, printf, println, println, rawPrint, registerHandler, registerUserInterruptHandler, resetLine, resetToBookmark, setBookmark
public static final int DEFAULT_MAX_READS
public java.lang.String read(boolean masking)
TextTerminal
masking
- true, if the input should be masked (for example to enter a password)public void rawPrint(java.lang.String message)
TextTerminal
public void println()
TextTerminal
public java.util.List<java.lang.String> getInputs()
public java.lang.String getOutput()
public int getReadCalls()
public int getMaxReads()
public void setMaxReads(int maxReads)
public static java.lang.String stripAll(java.lang.String text)