|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectcz.cuni.amis.utils.TestOutput
public class TestOutput
Used to produce text strings during tests, those strings are then consumed by the test case.
Used to control that everything is OK in tested objects / classes.
| Constructor Summary | |
|---|---|
TestOutput(String name)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TestOutput(String name)
| Method Detail |
|---|
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 -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||