br.eti.kinoshita.tap4j.consumer
Class AbstractTapConsumer

java.lang.Object
  extended by br.eti.kinoshita.tap4j.consumer.AbstractTapConsumer
All Implemented Interfaces:
TapConsumer
Direct Known Subclasses:
DefaultTapConsumer

public abstract class AbstractTapConsumer
extends Object
implements TapConsumer

Abstract TAP Consumer. Implements few basic methods.

Since:
1.0
Author:
Bruno P. Kinoshita - http://www.kinoshita.eti.br

Field Summary
protected  List<BailOut> bailOuts
          List of Bail Outs.
protected  List<Comment> comments
          List of Comments.
protected  Footer footer
          Footer.
protected  Header header
          Header.
protected  Plan plan
          Plan.
protected  List<TapResult> tapLines
          List of TAP Lines (test results, bail outs and comments).
protected  List<TestResult> testResults
          List of Test Results.
protected  TestSet testSet
          Test Set.
 
Constructor Summary
AbstractTapConsumer()
           
 
Method Summary
 Boolean containsBailOut()
           
 Boolean containsNotOk()
           
 Boolean containsOk()
           
 List<BailOut> getBailOuts()
           
 List<Comment> getComments()
           
 Footer getFooter()
           
 Header getHeader()
           
 Integer getNumberOfBailOuts()
           
 Integer getNumberOfComments()
           
 Integer getNumberOfTapLines()
           
 Integer getNumberOfTestResults()
           
 Plan getPlan()
           
 List<TapResult> getTapLines()
           
 TestResult getTestResult(Integer testNumber)
           
 List<TestResult> getTestResults()
           
 TestSet getTestSet()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface br.eti.kinoshita.tap4j.consumer.TapConsumer
parseFile, parseLine, parseTapStream, printDetails, printDetails, printSummary, printSummary
 

Field Detail

testSet

protected TestSet testSet
Test Set.


header

protected Header header
Header.


plan

protected Plan plan
Plan.


tapLines

protected List<TapResult> tapLines
List of TAP Lines (test results, bail outs and comments).


testResults

protected List<TestResult> testResults
List of Test Results.


bailOuts

protected List<BailOut> bailOuts
List of Bail Outs.


comments

protected List<Comment> comments
List of Comments.


footer

protected Footer footer
Footer.

Constructor Detail

AbstractTapConsumer

public AbstractTapConsumer()
Method Detail

getHeader

public Header getHeader()
Specified by:
getHeader in interface TapConsumer
Returns:
Header.

getPlan

public Plan getPlan()
Specified by:
getPlan in interface TapConsumer
Returns:
Plan.

getTapLines

public List<TapResult> getTapLines()
Specified by:
getTapLines in interface TapConsumer
Returns:
List of TAP Lines.

getNumberOfTapLines

public Integer getNumberOfTapLines()
Specified by:
getNumberOfTapLines in interface TapConsumer
Returns:
Number of TAP Lines.

getTestResults

public List<TestResult> getTestResults()
Specified by:
getTestResults in interface TapConsumer
Returns:
List of Test Results.

getTestResult

public TestResult getTestResult(Integer testNumber)
Specified by:
getTestResult in interface TapConsumer
Parameters:
testNumber - Number of test to be retrieved.
Returns:
A single test result.

containsOk

public Boolean containsOk()
Specified by:
containsOk in interface TapConsumer
Returns:
true if any ok occurred.

containsNotOk

public Boolean containsNotOk()
Specified by:
containsNotOk in interface TapConsumer
Returns:
true if any not ok occurred.

getNumberOfTestResults

public Integer getNumberOfTestResults()
Specified by:
getNumberOfTestResults in interface TapConsumer
Returns:
Number of Test Results.

containsBailOut

public Boolean containsBailOut()
Specified by:
containsBailOut in interface TapConsumer
Returns:
true if the Stream contains any Bail Outs.

getBailOuts

public List<BailOut> getBailOuts()
Specified by:
getBailOuts in interface TapConsumer
Returns:
List of Bail Outs.

getNumberOfBailOuts

public Integer getNumberOfBailOuts()
Specified by:
getNumberOfBailOuts in interface TapConsumer
Returns:
Number of Bail Outs.

getComments

public List<Comment> getComments()
Specified by:
getComments in interface TapConsumer
Returns:
List of Comments.

getNumberOfComments

public Integer getNumberOfComments()
Specified by:
getNumberOfComments in interface TapConsumer
Returns:
Number of Comments.

getFooter

public Footer getFooter()
Specified by:
getFooter in interface TapConsumer
Returns:
Footer.

getTestSet

public TestSet getTestSet()
Specified by:
getTestSet in interface TapConsumer
Returns:
Test Set.


Copyright © 2010. All Rights Reserved.