Package jetbrains.buildServer.serverSide
Class TestImpl
- java.lang.Object
-
- jetbrains.buildServer.serverSide.TestImpl
-
- All Implemented Interfaces:
Comparable<STest>
,STest
,TestEx
public class TestImpl extends Object implements TestEx, Comparable<STest>
Represents a test in a project, provides information about responsibility and current mute info.Used everywhere where we show a popup with test status.
- Since:
- 5.0
- Author:
- Kir, Sergey Anchipolevsky, Maxim Podkolzine (maxim.podkolzine@jetbrains.com)
-
-
Constructor Summary
Constructors Constructor Description TestImpl(TestContext services, TestName testName, long testNameId, String projectId)
TestImpl(TestContext services, TestName testName, String projectId)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description STest
changeProject(String projectId)
Returns a copy of the test in a new project.int
compareTo(STest o)
boolean
equals(Object o)
List<TestNameResponsibilityEntry>
getAllResponsibilities()
Returns all responsibilities for the testCurrentMuteInfo
getCurrentMuteInfo()
Returns current test mute info.TestName
getName()
Returns associated (low-level) TestName objectSProject
getProject()
Returns the associated project instance.String
getProjectExternalId()
Returns related project external idString
getProjectId()
Returns related project idTestNameResponsibilityEntry
getResponsibility()
Returns responsibility information for the test.long
getTestId()
Deprecated.long
getTestNameId()
Returns identifier of the test name.int
hashCode()
boolean
isMuted()
Determines whether this test is currently muted (in project or in build type).String
toString()
-
-
-
Constructor Detail
-
TestImpl
@Deprecated public TestImpl(@NotNull TestContext services, @NotNull TestName testName, @NotNull String projectId)
Deprecated.
-
TestImpl
public TestImpl(@NotNull TestContext services, @NotNull TestName testName, long testNameId, @NotNull String projectId)
-
-
Method Detail
-
getName
@NotNull public TestName getName()
Description copied from interface:STest
Returns associated (low-level) TestName object
-
getTestNameId
public long getTestNameId()
Description copied from interface:STest
Returns identifier of the test name.- Specified by:
getTestNameId
in interfaceSTest
- Returns:
- test name identifier.
-
getTestId
@Deprecated public long getTestId()
Deprecated.Description copied from interface:STest
Returns the id associated with this test
-
getProjectId
@NotNull public String getProjectId()
Description copied from interface:STest
Returns related project id- Specified by:
getProjectId
in interfaceSTest
- Returns:
- related project id
-
getProjectExternalId
@Nullable public String getProjectExternalId()
Description copied from interface:STest
Returns related project external id- Specified by:
getProjectExternalId
in interfaceSTest
- Returns:
- related project external id
-
getProject
@Nullable public SProject getProject()
Description copied from interface:TestEx
Returns the associated project instance.- Specified by:
getProject
in interfaceTestEx
- Returns:
- the associated project instance
- See Also:
STest.getProjectId()
-
getResponsibility
@Nullable public TestNameResponsibilityEntry getResponsibility()
Description copied from interface:STest
Returns responsibility information for the test.This is a shortcut method to check quickly whether the test has a responsibility. For a full information of the test responsibility, the client is expected to use
STest.getAllResponsibilities()
.- Specified by:
getResponsibility
in interfaceSTest
- Returns:
- responsibility information for the test
-
getAllResponsibilities
@NotNull public List<TestNameResponsibilityEntry> getAllResponsibilities()
Description copied from interface:STest
Returns all responsibilities for the test- Specified by:
getAllResponsibilities
in interfaceSTest
- Returns:
- all responsibilities for the test
-
isMuted
public boolean isMuted()
Description copied from interface:STest
Determines whether this test is currently muted (in project or in build type).The returned information is up-do-date on the moment of call only and can change at any moment.
Can be significantly faster than
getCurrentMuteInfo() != null
check.
-
getCurrentMuteInfo
@Nullable public CurrentMuteInfo getCurrentMuteInfo()
Description copied from interface:STest
Returns current test mute info.- Specified by:
getCurrentMuteInfo
in interfaceSTest
- Returns:
- current test mute info
-
changeProject
@NotNull public STest changeProject(@NotNull String projectId)
Description copied from interface:TestEx
Returns a copy of the test in a new project. Note: despite the name, this test is not modified.- Specified by:
changeProject
in interfaceTestEx
- Parameters:
projectId
- new project id- Returns:
- new test
-
compareTo
public int compareTo(@NotNull STest o)
- Specified by:
compareTo
in interfaceComparable<STest>
-
-