public class MockTerminal extends Object implements TextTerminal
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_READS |
Constructor and Description |
---|
MockTerminal() |
Modifier and Type | Method and Description |
---|---|
List<String> |
getInputs() |
int |
getMaxReads() |
String |
getOutput() |
int |
getReadCalls() |
void |
println()
Terminates the current line by writing the line separator string.
|
void |
rawPrint(String message)
Prints the message in its raw form.
|
String |
read(boolean masking)
Reads a line of text
|
void |
setMaxReads(int maxReads) |
static String |
stripAll(String text) |
public static final int DEFAULT_MAX_READS
public String read(boolean masking)
TextTerminal
read
in interface TextTerminal
masking
- true, if the input should be masked (for example to enter a password)public void rawPrint(String message)
TextTerminal
rawPrint
in interface TextTerminal
public void println()
TextTerminal
println
in interface TextTerminal
public String getOutput()
public int getReadCalls()
public int getMaxReads()
public void setMaxReads(int maxReads)