org.apache.maven.surefire.booter.output
Class FileOutputConsumerProxy

java.lang.Object
  extended by org.apache.maven.surefire.booter.output.OutputConsumerProxy
      extended by org.apache.maven.surefire.booter.output.FileOutputConsumerProxy
All Implemented Interfaces:
OutputConsumer

public class FileOutputConsumerProxy
extends OutputConsumerProxy

Surefire output consumer proxy that writes test output to a File for each test suite.

Since:
2.1
Version:
$Id: FileOutputConsumerProxy.java 510866 2007-02-23 08:13:49Z brett $
Author:
Carlos Sanchez

Constructor Summary
FileOutputConsumerProxy(OutputConsumer outputConsumer)
          Create a consumer that will write to a File for each test.
FileOutputConsumerProxy(OutputConsumer outputConsumer, java.io.File reportsDirectory)
          Create a consumer that will write to a File for each test
 
Method Summary
 void consumeOutputLine(java.lang.String line)
          Write the output to the current test file
 java.io.PrintWriter getPrintWriter()
          Get the PrintWriter used for the current test suite
 java.io.File getReportsDirectory()
          Get the directory where reports will be saved
 void setPrintWriter(java.io.PrintWriter writer)
          Set the PrintWriter used for the current test suite
 void setReportsDirectory(java.io.File reportsDirectory)
          Set the directory where reports will be saved
 void testSetCompleted()
          Delegate to proxied OutputConsumer
 void testSetStarting(org.apache.maven.surefire.report.ReportEntry reportEntry)
          Delegate to proxied OutputConsumer
 
Methods inherited from class org.apache.maven.surefire.booter.output.OutputConsumerProxy
consumeFooterLine, consumeHeaderLine, consumeMessageLine, getOutputConsumer, setOutputConsumer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileOutputConsumerProxy

public FileOutputConsumerProxy(OutputConsumer outputConsumer)
Create a consumer that will write to a File for each test. Files will be saved in working directory.


FileOutputConsumerProxy

public FileOutputConsumerProxy(OutputConsumer outputConsumer,
                               java.io.File reportsDirectory)
Create a consumer that will write to a File for each test

Parameters:
reportsDirectory - directory where files will be saved
Method Detail

setReportsDirectory

public void setReportsDirectory(java.io.File reportsDirectory)
Set the directory where reports will be saved

Parameters:
reportsDirectory - the directory

getReportsDirectory

public java.io.File getReportsDirectory()
Get the directory where reports will be saved


setPrintWriter

public void setPrintWriter(java.io.PrintWriter writer)
Set the PrintWriter used for the current test suite

Parameters:
writer -

getPrintWriter

public java.io.PrintWriter getPrintWriter()
Get the PrintWriter used for the current test suite


testSetStarting

public void testSetStarting(org.apache.maven.surefire.report.ReportEntry reportEntry)
Description copied from class: OutputConsumerProxy
Delegate to proxied OutputConsumer

Specified by:
testSetStarting in interface OutputConsumer
Overrides:
testSetStarting in class OutputConsumerProxy
Parameters:
reportEntry - The ReportEntry with the name and group (optional) of the test that starts

testSetCompleted

public void testSetCompleted()
Description copied from class: OutputConsumerProxy
Delegate to proxied OutputConsumer

Specified by:
testSetCompleted in interface OutputConsumer
Overrides:
testSetCompleted in class OutputConsumerProxy

consumeOutputLine

public void consumeOutputLine(java.lang.String line)
Write the output to the current test file

Specified by:
consumeOutputLine in interface OutputConsumer
Overrides:
consumeOutputLine in class OutputConsumerProxy
Parameters:
line - the line to process


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.