Package jadex.base.test
Class Testcase
- java.lang.Object
 - 
- jadex.base.test.Testcase
 
 
- 
public class Testcase extends java.lang.ObjectA testcase consists of an component type to test and the result reports. 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected intcntThe number of tests to be performed.protected longdurationThe time needed to perform the test.static java.lang.StringPROPERTY_TEST_TIMEOUTThe name of the property for defining a test timeout.protected TestReport[]reportsThe test reports. 
- 
Constructor Summary
Constructors Constructor Description Testcase()Create a new testcase.Testcase(int cnt)Create a new testcase.Testcase(int cnt, TestReport[] reports)Create a testcase which is already performed. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddReport(TestReport report)Add a report.longgetDuration()Get the test duration.java.lang.StringgetHTMLFragment(int number, java.lang.String name)Create an HTML representation of this element that can be included in an HTML document.TestReport[]getReports()Get the reports.intgetTestCount()Get the test count.booleanisPerformed()Check if this test case has been performed and is finished.booleanisSucceeded()Have all component tests succeeded.voidsetDuration(long duration)Get the test duration.voidsetReports(TestReport[] reports)Set the reports.voidsetTestCount(int cnt)Set the test count.java.lang.StringtoString()Returns a string representation of the object. 
 - 
 
- 
- 
Field Detail
- 
PROPERTY_TEST_TIMEOUT
public static final java.lang.String PROPERTY_TEST_TIMEOUT
The name of the property for defining a test timeout.- See Also:
 - Constant Field Values
 
 
- 
cnt
protected int cnt
The number of tests to be performed. 
- 
reports
protected TestReport[] reports
The test reports. 
- 
duration
protected long duration
The time needed to perform the test. 
 - 
 
- 
Constructor Detail
- 
Testcase
public Testcase()
Create a new testcase. 
- 
Testcase
public Testcase(int cnt)
Create a new testcase. 
- 
Testcase
public Testcase(int cnt, TestReport[] reports)Create a testcase which is already performed. 
 - 
 
- 
Method Detail
- 
getTestCount
public int getTestCount()
Get the test count.- Returns:
 - The test count.
 
 
- 
setTestCount
public void setTestCount(int cnt)
Set the test count.- Parameters:
 cnt- The test count.
 
- 
getDuration
public long getDuration()
Get the test duration.- Returns:
 - The test duration.
 
 
- 
setDuration
public void setDuration(long duration)
Get the test duration. 
- 
getReports
public TestReport[] getReports()
Get the reports.- Returns:
 - The reports.
 
 
- 
addReport
public void addReport(TestReport report)
Add a report.- Parameters:
 report- The report.
 
- 
setReports
public void setReports(TestReport[] reports)
Set the reports.- Parameters:
 reports- The reports.
 
- 
isSucceeded
public boolean isSucceeded()
Have all component tests succeeded. 
- 
isPerformed
public boolean isPerformed()
Check if this test case has been performed and is finished. 
- 
toString
public java.lang.String toString()
Returns a string representation of the object. In general, thetoStringmethod returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read.- Overrides:
 toStringin classjava.lang.Object- Returns:
 - a string representation of the object.
 
 
- 
getHTMLFragment
public java.lang.String getHTMLFragment(int number, java.lang.String name)Create an HTML representation of this element that can be included in an HTML document.- Parameters:
 number- The number of the testcase (when displayed in a longer list), -1 for no number.name- The name of the testcase (when displayed in a longer list), null for no name.
 
 - 
 
 -