com.atlassian.bamboo.resultsummary.tests
Class TestClassResultImpl

java.lang.Object
  extended by com.atlassian.core.bean.EntityObject
      extended by com.atlassian.bamboo.core.BambooEntityObject
          extended by com.atlassian.bamboo.resultsummary.tests.TestClassResultImpl
All Implemented Interfaces:
BambooObject, TestClassResult, TestClassResultDescriptor, NameProvider, java.lang.Cloneable, java.lang.Comparable<TestClassResult>

public class TestClassResultImpl
extends BambooEntityObject
implements TestClassResult


Field Summary
 
Fields inherited from class com.atlassian.bamboo.core.BambooEntityObject
id
 
Constructor Summary
TestClassResultImpl()
           
TestClassResultImpl(TestClass testClass, BuildResultsSummary summary)
           
 
Method Summary
 void addTestCase(TestCaseResult testCaseResult)
          Add a testCase to this TestClassResult (to this group)
 int compareTo(TestClassResult testClassResult)
           
 boolean equals(java.lang.Object o)
           
 BuildResultsSummary getBuildResultsSummary()
           
 long getDuration()
          The total running time (in milliseconds) for this class (cumulation of all TestCaseResults durations)
 int getFailedTestCount()
           
 java.lang.String getName()
           
 java.lang.String getShortName()
           
 int getSuccessfulTestCount()
           
 java.util.List<TestCaseResult> getTestCaseResults()
          Retrieve the TestCaseResults contained within this TestClassResult
 TestClass getTestClass()
           
 int hashCode()
           
 void incrementFailedTestCount()
          add 1 to the current failed test count
 void incrementSuccessfulTestCount()
          add 1 to the current successful test count
 void setBuildResultsSummary(BuildResultsSummary buildResultsSummary)
           
 void setDuration(long duration)
          Set how long this testClassResult took.
 void setFailedTestCount(int failedTestCount)
          Set the number of failing tests in this group
 void setSuccessfulTestCount(int successfulTestCount)
          Set the number of successful tests in this group
protected  void setTestClass(TestClass testClass)
           
 
Methods inherited from class com.atlassian.bamboo.core.BambooEntityObject
getId, setId
 
Methods inherited from class com.atlassian.core.bean.EntityObject
clone, getCreationDate, getCurrentDate, getLastModificationDate, setClock, setCreationDate, setLastModificationDate
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestClassResultImpl

public TestClassResultImpl()

TestClassResultImpl

public TestClassResultImpl(TestClass testClass,
                           BuildResultsSummary summary)
Method Detail

getName

@Nullable
public java.lang.String getName()
Specified by:
getName in interface TestClassResultDescriptor
Specified by:
getName in interface NameProvider
Returns:
the name of TestClass

getShortName

@Nullable
public java.lang.String getShortName()
Specified by:
getShortName in interface TestClassResultDescriptor
Returns:
the short name of the TestClass (strips leading package names)

incrementSuccessfulTestCount

public void incrementSuccessfulTestCount()
Description copied from interface: TestClassResult
add 1 to the current successful test count

Specified by:
incrementSuccessfulTestCount in interface TestClassResult

incrementFailedTestCount

public void incrementFailedTestCount()
Description copied from interface: TestClassResult
add 1 to the current failed test count

Specified by:
incrementFailedTestCount in interface TestClassResult

getTestClass

public TestClass getTestClass()
Specified by:
getTestClass in interface TestClassResult
Returns:
The associated TestClass this is a 'run' of.

setTestClass

protected void setTestClass(TestClass testClass)

getDuration

public long getDuration()
Description copied from interface: TestClassResult
The total running time (in milliseconds) for this class (cumulation of all TestCaseResults durations)

Specified by:
getDuration in interface TestClassResult
Returns:
total running time for this TestClass

setDuration

public void setDuration(long duration)
Description copied from interface: TestClassResult
Set how long this testClassResult took.

Specified by:
setDuration in interface TestClassResult
Parameters:
duration - - time in milliseconds

getTestCaseResults

@NotNull
public java.util.List<TestCaseResult> getTestCaseResults()
Description copied from interface: TestClassResult
Retrieve the TestCaseResults contained within this TestClassResult

Specified by:
getTestCaseResults in interface TestClassResult
Returns:
the TestCaseResults contained within this TestClassResult

addTestCase

public void addTestCase(TestCaseResult testCaseResult)
Description copied from interface: TestClassResult
Add a testCase to this TestClassResult (to this group)

Specified by:
addTestCase in interface TestClassResult
Parameters:
testCaseResult - to add

getFailedTestCount

public int getFailedTestCount()
Specified by:
getFailedTestCount in interface TestClassResult
Returns:
Number of failed TestCaseResults in this TestClassResult

setFailedTestCount

public void setFailedTestCount(int failedTestCount)
Description copied from interface: TestClassResult
Set the number of failing tests in this group

Specified by:
setFailedTestCount in interface TestClassResult
Parameters:
failedTestCount - - number of failed tests in this group

getSuccessfulTestCount

public int getSuccessfulTestCount()
Specified by:
getSuccessfulTestCount in interface TestClassResult
Returns:
Number of successful TestCaseResults in this TestClassResult

setSuccessfulTestCount

public void setSuccessfulTestCount(int successfulTestCount)
Description copied from interface: TestClassResult
Set the number of successful tests in this group

Specified by:
setSuccessfulTestCount in interface TestClassResult
Parameters:
successfulTestCount - - number of successful tests in this group

getBuildResultsSummary

public BuildResultsSummary getBuildResultsSummary()
Specified by:
getBuildResultsSummary in interface TestClassResult
Returns:
the BuildResultsSummary this test class result is associated with.

setBuildResultsSummary

public void setBuildResultsSummary(BuildResultsSummary buildResultsSummary)

hashCode

public int hashCode()
Overrides:
hashCode in class com.atlassian.core.bean.EntityObject

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class com.atlassian.core.bean.EntityObject

compareTo

public int compareTo(TestClassResult testClassResult)
Specified by:
compareTo in interface java.lang.Comparable<TestClassResult>


Copyright © 2011 Atlassian. All Rights Reserved.