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 SummaryFields 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 SummaryConstructors 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 SummaryAll 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_TIMEOUTpublic static final java.lang.String PROPERTY_TEST_TIMEOUT The name of the property for defining a test timeout.- See Also:
- Constant Field Values
 
 - 
cntprotected int cnt The number of tests to be performed.
 - 
reportsprotected TestReport[] reports The test reports.
 - 
durationprotected long duration The time needed to perform the test.
 
- 
 - 
Constructor Detail- 
Testcasepublic Testcase() Create a new testcase.
 - 
Testcasepublic Testcase(int cnt) Create a new testcase.
 - 
Testcasepublic Testcase(int cnt, TestReport[] reports)Create a testcase which is already performed.
 
- 
 - 
Method Detail- 
getTestCountpublic int getTestCount() Get the test count.- Returns:
- The test count.
 
 - 
setTestCountpublic void setTestCount(int cnt) Set the test count.- Parameters:
- cnt- The test count.
 
 - 
getDurationpublic long getDuration() Get the test duration.- Returns:
- The test duration.
 
 - 
setDurationpublic void setDuration(long duration) Get the test duration.
 - 
getReportspublic TestReport[] getReports() Get the reports.- Returns:
- The reports.
 
 - 
addReportpublic void addReport(TestReport report) Add a report.- Parameters:
- report- The report.
 
 - 
setReportspublic void setReports(TestReport[] reports) Set the reports.- Parameters:
- reports- The reports.
 
 - 
isSucceededpublic boolean isSucceeded() Have all component tests succeeded.
 - 
isPerformedpublic boolean isPerformed() Check if this test case has been performed and is finished.
 - 
toStringpublic 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 class- java.lang.Object
- Returns:
- a string representation of the object.
 
 - 
getHTMLFragmentpublic 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.
 
 
- 
 
-