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 Details

    • TestClassImpl

      public TestClassImpl()
    • TestClassImpl

      public TestClassImpl(String name, Plan plan, long masterJobId)
  • Method Details

    • getShortName

      public String getShortName()
      Description copied from interface: TestClass
      Get the short name for this class for the UI
      Specified by:
      getShortName in interface TestClass
      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
      Specified by:
      addTest in interface TestClass
      Parameters:
      testCase - to add.
    • getName

      public String getName()
      Description copied from interface: TestClass
      The real name of the test class
      Specified by:
      getName in interface TestClass
      Returns:
      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 interface TestClass
      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 interface TestClass
      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.
      Specified by:
      getPlan in interface TestClass
      Returns:
      the plan that this test class belongs to
    • 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 with TestClass.getPlan() to find the actual branched job this class belongs to.
      Specified by:
      getMasterJobId in interface TestClass
    • setMasterJobId

      public void setMasterJobId(long masterJobId)
    • copyTestClass

      @NotNull public @NotNull TestClass copyTestClass(@NotNull @NotNull Plan plan)
      Description copied from interface: TestClass
      Creates a copy of the TestClass. Includes all child TestCases but not the Plan
      Specified by:
      copyTestClass in interface TestClass
      Returns:
      testClass
    • equals

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

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

      public int compareTo(TestClass testClass)
      Specified by:
      compareTo in interface Comparable<TestClass>
    • toString

      public String toString()
      Overrides:
      toString in class Object