br.eti.kinoshita.tap4j.model
Class TestSet

java.lang.Object
  extended by br.eti.kinoshita.tap4j.model.TestSet
All Implemented Interfaces:
Serializable

public class TestSet
extends Object
implements Serializable

A Test Set is the top element in a TAP File. It holds references to the Header, Plan, List of Test Results and the rest of elements in TAP spec.

Since:
1.0
Author:
Bruno P. Kinoshita - http://www.kinoshita.eti.br
See Also:
Serialized Form

Constructor Summary
TestSet()
          Default constructor.
 
Method Summary
 boolean addBailOut(BailOut bailOut)
           
 boolean addComment(Comment comment)
           
 boolean addTapLine(TapResult tapLine)
          Adds a new TAP Line.
 boolean addTestResult(TestResult testResult)
           
 List<BailOut> getBailOuts()
           
 List<Comment> getComments()
           
 String getDetails()
           
 Footer getFooter()
           
 Header getHeader()
           
 int getNumberOfBailOuts()
           
 int getNumberOfComments()
           
 int getNumberOfTapLines()
           
 int getNumberOfTestResults()
           
 Plan getPlan()
           
 String getSummary()
           
 List<TapResult> getTapLines()
           
 List<TestResult> getTestResults()
           
 boolean hasBailOut()
           
 boolean removeBailOut(BailOut bailOut)
          Removes a Bail Out from the list.
 boolean removeComment(Comment comment)
          Removes a Comment from the list.
protected  boolean removeTapLine(TapResult tapLine)
          Removes a TAP Line from the list.
 boolean removeTestResult(TestResult testResult)
          Removes a Test Result from the list.
 void setFooter(Footer footer)
           
 void setHeader(Header header)
           
 void setPlan(Plan plan)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestSet

public TestSet()
Default constructor.

Method Detail

getHeader

public Header getHeader()
Returns:
TAP Header.

setHeader

public void setHeader(Header header)
Parameters:
header - TAP Header.

getPlan

public Plan getPlan()
Returns:
TAP Plan.

setPlan

public void setPlan(Plan plan)
Parameters:
plan - TAP Plan.

getTapLines

public List<TapResult> getTapLines()
Returns:
List of TAP Lines. These lines may be either a TestResult or a BailOut.
See Also:
TestResult}, BailOut}, Comment}

getTestResults

public List<TestResult> getTestResults()
Returns:
List of Test Results.

getBailOuts

public List<BailOut> getBailOuts()
Returns:
List of Bail Outs.

getComments

public List<Comment> getComments()
Returns:
List of Comments.

addTapLine

public boolean addTapLine(TapResult tapLine)
Adds a new TAP Line.

Parameters:
tapLine - TAP Line.
Returns:
True if the TAP Line could be added into the list successfully.

addTestResult

public boolean addTestResult(TestResult testResult)
Parameters:
testResult - Test Result.

addBailOut

public boolean addBailOut(BailOut bailOut)
Parameters:
bailOut - Bail Out.

addComment

public boolean addComment(Comment comment)
Parameters:
comment - Comment.

removeTapLine

protected boolean removeTapLine(TapResult tapLine)
Removes a TAP Line from the list.

Parameters:
tapLine - TAP Line object.
Returns:
True if could successfully remove the TAP Line from the list.

removeTestResult

public boolean removeTestResult(TestResult testResult)
Removes a Test Result from the list.

Parameters:
testResult - Test Result.
Returns:
True if could successfully remove the Test Result from the list.

removeBailOut

public boolean removeBailOut(BailOut bailOut)
Removes a Bail Out from the list.

Parameters:
bailOut - Bail Out object.
Returns:
True if could successfully remove the Bail Out from the list.

removeComment

public boolean removeComment(Comment comment)
Removes a Comment from the list.

Parameters:
comment - Comment.
Returns:
True if could successfully remove the Comment from the list.

getNumberOfTapLines

public int getNumberOfTapLines()
Returns:
Number of TAP Lines. It includes Test Results, Bail Outs and Comments (the footer is not included).

getNumberOfTestResults

public int getNumberOfTestResults()
Returns:
Number of Test Results.

getNumberOfBailOuts

public int getNumberOfBailOuts()
Returns:
Number of Bail Outs.

getNumberOfComments

public int getNumberOfComments()
Returns:
Number of Comments.

getFooter

public Footer getFooter()
Returns:
Footer

setFooter

public void setFooter(Footer footer)
Parameters:
footer - Footer

hasBailOut

public boolean hasBailOut()
Returns:
True if it has any Bail Out statement, false otherwise.

getSummary

public String getSummary()
Returns:
Summary of the TAP Stream.

getDetails

public String getDetails()
Returns:
Details of the TAP Stream.
See Also:
#toString()}

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2010. All Rights Reserved.