Class TestClassImpl
- java.lang.Object
-
- com.atlassian.core.bean.EntityObject
-
- com.atlassian.bamboo.core.BambooEntityObject
-
- com.atlassian.bamboo.resultsummary.tests.TestClassImpl
-
- All Implemented Interfaces:
BambooIdProvider
,BambooObject
,TestClass
,Cloneable
,Comparable<TestClass>
@Entity public class TestClassImpl extends BambooEntityObject implements TestClass
-
-
Constructor Summary
Constructors Constructor Description TestClassImpl()
TestClassImpl(String name, Plan plan, long masterJobId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTest(@NotNull TestCase testCase)
Add a testCase to this groupint
compareTo(TestClass testClass)
@NotNull TestClass
copyTestClass(@NotNull Plan plan)
Creates a copy of theTestClass
.boolean
equals(Object o)
long
getMasterJobId()
Get id of the master of the job this test class belongs to.String
getName()
The real name of the test classPlan
getPlan()
Get the plan that this test class belongs to.String
getShortName()
Get the short name for this class for the UI@NotNull Collection<TestCase>
getTestCaseCollection()
Retrieve the TestCases that are part of this class.@NotNull List<TestCase>
getTestCases()
Retrieve the TestCases that are part of this class.int
hashCode()
void
setMasterJobId(long masterJobId)
protected void
setName(String name)
protected void
setPlan(Plan plan)
String
toString()
-
Methods inherited from class com.atlassian.core.bean.EntityObject
clone, getCreationDate, getCurrentDate, getId, getLastModificationDate, setClock, setCreationDate, setId, setLastModificationDate
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getId
-
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
-
-
-
-
Method Detail
-
getShortName
public String getShortName()
Description copied from interface:TestClass
Get the short name for this class for the UI- Specified by:
getShortName
in interfaceTestClass
- Returns:
- the name of this class without preceding packages.
-
addTest
public void addTest(@NotNull @NotNull TestCase testCase)
Description copied from interface:TestClass
Add a testCase to this group
-
getName
public String getName()
Description copied from interface:TestClass
The real name of the test class
-
setName
protected void setName(String name)
-
getTestCases
@NotNull public @NotNull List<TestCase> getTestCases()
Description copied from interface:TestClass
Retrieve the TestCases that are part of this class. Note that this method performs a copy, therefore it's not recommended for performance reason.- Specified by:
getTestCases
in interfaceTestClass
- Returns:
- the TestCases that are part of this class.
-
getTestCaseCollection
@NotNull public @NotNull Collection<TestCase> getTestCaseCollection()
Description copied from interface:TestClass
Retrieve the TestCases that are part of this class.- Specified by:
getTestCaseCollection
in interfaceTestClass
- Returns:
- the TestCases that are part of this class.
-
getPlan
public Plan getPlan()
Description copied from interface:TestClass
Get the plan that this test class belongs to. Since 6.9 returns chain instead of job.
-
setPlan
protected void setPlan(Plan plan)
-
getMasterJobId
public long getMasterJobId()
Description copied from interface:TestClass
Get id of the master of the job this test class belongs to. Use together withTestClass.getPlan()
to find the actual branched job this class belongs to.- Specified by:
getMasterJobId
in interfaceTestClass
-
setMasterJobId
public void setMasterJobId(long masterJobId)
-
copyTestClass
@NotNull public @NotNull TestClass copyTestClass(@NotNull @NotNull Plan plan)
Description copied from interface:TestClass
- Specified by:
copyTestClass
in interfaceTestClass
- Returns:
- testClass
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classcom.atlassian.core.bean.EntityObject
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classcom.atlassian.core.bean.EntityObject
-
compareTo
public int compareTo(TestClass testClass)
- Specified by:
compareTo
in interfaceComparable<TestClass>
-
-