public class TestOutput extends Object
Used to control that everything is OK in tested objects / classes.
Constructor and Description |
---|
TestOutput(String name) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear the queue.
|
boolean |
consume(String output)
Consume string symbol from the queue - false is failure (string didn't match).
|
boolean |
consume(String[] output)
Try to consume many strings, false - one of them didn't match, failure.
|
boolean |
consumeAnyOrder(String[] output)
Consume output in any order, returns false if first output.length string in
the queue can't be matched to the output strings.
|
boolean |
consumeMany(String... outputs)
Consume many strings from the output - if not equals, returns false as failure.
|
boolean |
isClear(boolean printIfNot)
Whether the queue is clear.
|
static boolean |
isLog()
Do we print the messages to the console (simple logging),
|
void |
printOutput() |
void |
push(String output)
Adds next String to the queue.
|
static void |
setLog(boolean log)
Set simple console logging.
|
public TestOutput(String name)
public void push(String output)
output
- public boolean consumeMany(String... outputs)
outputs
- public boolean consume(String output)
output
- public boolean consume(String[] output)
output
- public boolean consumeAnyOrder(String[] output)
output
- public boolean isClear(boolean printIfNot)
public void clear()
public void printOutput()
public static boolean isLog()
public static void setLog(boolean log)
log
- Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.