|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.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(java.lang.String name)
|
Method Summary | |
---|---|
void |
clear()
Clear the queue. |
boolean |
consume(java.lang.String output)
Consume string symbol from the queue - false is failure (string didn't match). |
boolean |
consume(java.lang.String[] output)
Try to consume many strings, false - one of them didn't match, failure. |
boolean |
consumeAnyOrder(java.lang.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(java.lang.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(java.lang.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(java.lang.String name)
Method Detail |
---|
public void push(java.lang.String output)
output
- public boolean consumeMany(java.lang.String... outputs)
outputs
-
public boolean consume(java.lang.String output)
output
-
public boolean consume(java.lang.String[] output)
output
-
public boolean consumeAnyOrder(java.lang.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 |