Class TestClassResultImpl
java.lang.Object
com.atlassian.core.bean.EntityObject
com.atlassian.bamboo.core.BambooEntityObject
com.atlassian.bamboo.hibernate.HibernateBambooEntityObject
com.atlassian.bamboo.resultsummary.tests.TestClassResultImpl
- All Implemented Interfaces:
BambooIdProvider,BambooObject,TestClassResult,TestClassResultDescriptor,NameProvider,Cloneable,Comparable<TestClassResult>
@Entity
public class TestClassResultImpl
extends HibernateBambooEntityObject
implements TestClassResult
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTestCase(TestCaseResult testCaseResult) Add a testCase to this TestClassResult (to this group)intcompareTo(TestClassResult testClassResult) booleanlongThe total running time (in milliseconds) for this class (cumulation of all TestCaseResults durations)int@Nullable StringgetName()@Nullable Stringintint@NotNull List<TestCaseResult>Retrieve the TestCaseResults contained within this TestClassResult@NotNull Set<TestCaseResult>Retrieve the TestCaseResults contained within this TestClassResultinthashCode()voidadd 1 to the current failed test countvoidadd 1 to the current skipped test count.voidadd 1 to the current successful test countvoidsetBuildResultsSummary(BuildResultsSummary buildResultsSummary) voidsetDuration(long duration) Set how long this testClassResult took.voidsetFailedTestCount(int failedTestCount) Set the number of failing tests in this groupvoidsetSkippedTestCount(int skippedTestCount) Set the number of skipped tests in this groupvoidsetSuccessfulTestCount(int successfulTestCount) Set the number of successful tests in this groupprotected voidsetTestClass(TestClass testClass) Methods inherited from class com.atlassian.bamboo.hibernate.HibernateBambooEntityObject
getId, setIdMethods inherited from class com.atlassian.core.bean.EntityObject
clone, getCreationDate, getCurrentDate, getLastModificationDate, setClock, setCreationDate, setLastModificationDateMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getIdMethods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
-
Constructor Details
-
TestClassResultImpl
public TestClassResultImpl() -
TestClassResultImpl
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceNameProvider- Specified by:
getNamein interfaceTestClassResultDescriptor- Returns:
- the name of TestClass
-
getShortName
- Specified by:
getShortNamein interfaceTestClassResultDescriptor- Returns:
- the short name of the TestClass (strips leading package names)
-
incrementSuccessfulTestCount
public void incrementSuccessfulTestCount()Description copied from interface:TestClassResultadd 1 to the current successful test count- Specified by:
incrementSuccessfulTestCountin interfaceTestClassResult
-
incrementFailedTestCount
public void incrementFailedTestCount()Description copied from interface:TestClassResultadd 1 to the current failed test count- Specified by:
incrementFailedTestCountin interfaceTestClassResult
-
getTestClass
- Specified by:
getTestClassin interfaceTestClassResult- Returns:
- The associated TestClass this is a 'run' of.
-
setTestClass
-
getDuration
public long getDuration()Description copied from interface:TestClassResultThe total running time (in milliseconds) for this class (cumulation of all TestCaseResults durations)- Specified by:
getDurationin interfaceTestClassResult- Returns:
- total running time for this TestClass
-
setDuration
public void setDuration(long duration) Description copied from interface:TestClassResultSet how long this testClassResult took.- Specified by:
setDurationin interfaceTestClassResult- Parameters:
duration- - time in milliseconds
-
getTestCaseResults
Description copied from interface:TestClassResultRetrieve the TestCaseResults contained within this TestClassResult- Specified by:
getTestCaseResultsin interfaceTestClassResult- Returns:
- the TestCaseResults contained within this TestClassResult
-
getTestCaseResultsSet
Description copied from interface:TestClassResultRetrieve the TestCaseResults contained within this TestClassResult- Specified by:
getTestCaseResultsSetin interfaceTestClassResult- Returns:
- the TestCaseResults contained within this TestClassResult
-
addTestCase
Description copied from interface:TestClassResultAdd a testCase to this TestClassResult (to this group)- Specified by:
addTestCasein interfaceTestClassResult- Parameters:
testCaseResult- to add
-
getFailedTestCount
public int getFailedTestCount()- Specified by:
getFailedTestCountin interfaceTestClassResult- Returns:
- Number of failed TestCaseResults in this TestClassResult
-
setFailedTestCount
public void setFailedTestCount(int failedTestCount) Description copied from interface:TestClassResultSet the number of failing tests in this group- Specified by:
setFailedTestCountin interfaceTestClassResult- Parameters:
failedTestCount- - number of failed tests in this group
-
getSuccessfulTestCount
public int getSuccessfulTestCount()- Specified by:
getSuccessfulTestCountin interfaceTestClassResult- Returns:
- Number of successful TestCaseResults in this TestClassResult
-
setSuccessfulTestCount
public void setSuccessfulTestCount(int successfulTestCount) Description copied from interface:TestClassResultSet the number of successful tests in this group- Specified by:
setSuccessfulTestCountin interfaceTestClassResult- Parameters:
successfulTestCount- - number of successful tests in this group
-
incrementSkippedTestCount
public void incrementSkippedTestCount()Description copied from interface:TestClassResultadd 1 to the current skipped test count.- Specified by:
incrementSkippedTestCountin interfaceTestClassResult
-
getSkippedTestCount
public int getSkippedTestCount()- Specified by:
getSkippedTestCountin interfaceTestClassResult- Returns:
- Number of skipped TestCaseResults in this TestClassResult.
-
setSkippedTestCount
public void setSkippedTestCount(int skippedTestCount) Description copied from interface:TestClassResultSet the number of skipped tests in this group- Specified by:
setSkippedTestCountin interfaceTestClassResult- Parameters:
skippedTestCount- - number of skipped tests in this group
-
getBuildResultsSummary
- Specified by:
getBuildResultsSummaryin interfaceTestClassResult- Returns:
- the BuildResultsSummary this test class result is associated with.
-
setBuildResultsSummary
-
equals
- Overrides:
equalsin classcom.atlassian.core.bean.EntityObject
-
hashCode
public int hashCode()- Overrides:
hashCodein classcom.atlassian.core.bean.EntityObject
-
compareTo
- Specified by:
compareToin interfaceComparable<TestClassResult>
-