Class TestOut
java.lang.Object
org.netbeans.jemmy.TestOut
-
Constructor Summary
ConstructorsConstructorDescriptionTestOut()Creates unstance using System.in, System.out and System.err streams.TestOut(InputStream in, PrintStream out, PrintStream err) Constructor.TestOut(InputStream in, PrintStream out, PrintStream err, PrintStream golden) Constructor.TestOut(InputStream in, PrintWriter out, PrintWriter err) Constructor.TestOut(InputStream in, PrintWriter out, PrintWriter err, PrintWriter golden) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionCreates an output which prints only error messages.voidflush()Flushes all output threads.booleanSays if flush is invoked after each output.Returns errput writer.Returns golden output writer.getInput()Returns input stream.static TestOutCreates output which does not print any message anywhere.Returns output writer.voidPrints a line into output.voidprintErrLine(String line) Prints a line into error output.voidprintError(String text) Prints a error line.voidprintGolden(String line) Prints a line into golden output.voidPrints a line into either output or errput.voidPrints a line and then terminate the line by writing the line separator string.voidPrints an exception stack trace into error stream.voidprintTrace(String text) Prints a trace line.intread()Read one byte from input.readLine()Read a line from input.booleansetAutoFlushMode(boolean autoFlushMode) Specifies either flush is invoked after each output.
-
Constructor Details
-
TestOut
Constructor.- Parameters:
in- Input streamout- Output streamerr- Errput stream
-
TestOut
Constructor.- Parameters:
in- Input streamout- Output streamerr- Errput streamgolden- Golgen output stream
-
TestOut
Constructor.- Parameters:
in- Input streamout- Output streamerr- Errput stream
-
TestOut
Constructor.- Parameters:
in- Input streamout- Output streamerr- Errput streamgolden- Golgen output stream
-
TestOut
public TestOut()Creates unstance using System.in, System.out and System.err streams.
-
-
Method Details
-
getNullOutput
Creates output which does not print any message anywhere.- Returns:
- a TestOut object which does not print any message anywhere.
-
setAutoFlushMode
public boolean setAutoFlushMode(boolean autoFlushMode) Specifies either flush is invoked after each output.- Parameters:
autoFlushMode- If true flush is invoking after each output.- Returns:
- Old value of the auto flush mode.
- See Also:
-
getAutoFlushMode
public boolean getAutoFlushMode()Says if flush is invoked after each output.- Returns:
- Value of the auto flush mode.
- See Also:
-
read
Read one byte from input.- Returns:
- an int from input stream.
- Throws:
IOException
-
readLine
Read a line from input.- Returns:
- a line from input stream.
- Throws:
IOException
-
print
Prints a line into output.- Parameters:
line- a string to print into output stream.
-
printLine
Prints a line and then terminate the line by writing the line separator string.- Parameters:
line- a string to print into output stream.
-
printGolden
Prints a line into golden output.- Parameters:
line- a string to print into golden output stream.
-
printErrLine
Prints a line into error output.- Parameters:
line- a string to print into error output stream.
-
printLine
Prints a line into either output or errput.- Parameters:
toOut- If true prints a line into output.line- a string to print.
-
printTrace
-
printError
-
printStackTrace
Prints an exception stack trace into error stream.- Parameters:
e- exception
-
getInput
-
getOutput
-
getErrput
-
getGolden
-
createErrorOutput
Creates an output which prints only error messages.- Returns:
- a TestOut instance which has only error stream.
-
flush
public void flush()Flushes all output threads.
-