com.atlassian.bamboo.resultsummary.tests
Class TestCaseImpl

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

public class TestCaseImpl
extends BambooEntityObject
implements TestCase


Field Summary
 
Fields inherited from class com.atlassian.bamboo.core.BambooEntityObject
id
 
Constructor Summary
TestCaseImpl()
           
TestCaseImpl(java.lang.String name)
           
TestCaseImpl(java.lang.String name, TestClass testClass)
           
 
Method Summary
 int compareTo(TestCase testCase)
           
 TestCase copyTestCase()
          Creates a copy of the TestCase.
 boolean equals(java.lang.Object o)
           
 long getAverageDuration()
           
 long getAverageDurationInSeconds()
           
 int getFirstRanBuildNumber()
           
 int getLastRanBuildNumber()
           
 java.lang.String getMethodName()
          Returns a sentence describing the test, derived from the method name of the test.
 java.lang.String getName()
           
 int getNumberOfFailedRuns()
           
 int getNumberOfSuccessRuns()
           
 double getSuccessPercentage()
           
 TestClass getTestClass()
           
 int getTotalTestRuns()
           
 int hashCode()
           
 void setAverageDuration(long averageDuration)
           
 void setFirstRanBuildNumber(int firstRanBuildNumber)
           
 void setLastRanBuildNumber(int lastRanBuildNumber)
           
protected  void setName(java.lang.String name)
           
 void setNumberOfFailedRuns(int numberOfFailedRuns)
           
 void setNumberOfSuccessRuns(int numberOfSuccessRuns)
           
 void setTestClass(TestClass testClass)
          Set the testClass this test case belongs to
 
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
 
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
getId, setId
 

Constructor Detail

TestCaseImpl

public TestCaseImpl()

TestCaseImpl

public TestCaseImpl(java.lang.String name)

TestCaseImpl

public TestCaseImpl(java.lang.String name,
                    TestClass testClass)
Method Detail

getMethodName

public java.lang.String getMethodName()
Description copied from interface: TestCase
Returns a sentence describing the test, derived from the method name of the test.

Specified by:
getMethodName in interface TestCase
Returns:
The sentence

getSuccessPercentage

public double getSuccessPercentage()
Specified by:
getSuccessPercentage in interface TestCase
Returns:
how successful this test case has been. (success runs / total runs)

getTotalTestRuns

public int getTotalTestRuns()
Specified by:
getTotalTestRuns in interface TestCase
Returns:
the total number of times this test has run.

getName

public java.lang.String getName()
Specified by:
getName in interface TestCase
Returns:
The true name of the test case

setName

protected void setName(java.lang.String name)

getTestClass

public TestClass getTestClass()
Specified by:
getTestClass in interface TestCase
Returns:
the TestClass the testcase belongs to

setTestClass

public void setTestClass(TestClass testClass)
Description copied from interface: TestCase
Set the testClass this test case belongs to

Specified by:
setTestClass in interface TestCase
Parameters:
testClass - the test case belongs to

getNumberOfSuccessRuns

public int getNumberOfSuccessRuns()
Specified by:
getNumberOfSuccessRuns in interface TestCase
Returns:
the number of times this test has run successfully

setNumberOfSuccessRuns

public void setNumberOfSuccessRuns(int numberOfSuccessRuns)
Specified by:
setNumberOfSuccessRuns in interface TestCase

getNumberOfFailedRuns

public int getNumberOfFailedRuns()
Specified by:
getNumberOfFailedRuns in interface TestCase
Returns:
the number of times this test has run and failed

setNumberOfFailedRuns

public void setNumberOfFailedRuns(int numberOfFailedRuns)
Specified by:
setNumberOfFailedRuns in interface TestCase

getAverageDuration

public long getAverageDuration()
Specified by:
getAverageDuration in interface TestCase
Returns:
the average duration in milliseconds of this test case for all test runs.

getAverageDurationInSeconds

public long getAverageDurationInSeconds()
Specified by:
getAverageDurationInSeconds in interface TestCase
Returns:
the average duration in seconds of this test case for all test runs.

setAverageDuration

public void setAverageDuration(long averageDuration)
Specified by:
setAverageDuration in interface TestCase

getFirstRanBuildNumber

public int getFirstRanBuildNumber()
Specified by:
getFirstRanBuildNumber in interface TestCase
Returns:
the build number that this test was first run in.

setFirstRanBuildNumber

public void setFirstRanBuildNumber(int firstRanBuildNumber)
Specified by:
setFirstRanBuildNumber in interface TestCase

getLastRanBuildNumber

public int getLastRanBuildNumber()
Specified by:
getLastRanBuildNumber in interface TestCase
Returns:
the most recent build that this test was part of

setLastRanBuildNumber

public void setLastRanBuildNumber(int lastRanBuildNumber)
Specified by:
setLastRanBuildNumber in interface TestCase

copyTestCase

@NotNull
public TestCase copyTestCase()
Description copied from interface: TestCase
Creates a copy of the TestCase. Note that it does not include TestClass

Specified by:
copyTestCase in interface TestCase
Returns:
copyOfTestCase

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(TestCase testCase)
Specified by:
compareTo in interface java.lang.Comparable<TestCase>


Copyright © 2011 Atlassian. All Rights Reserved.