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 STestchangeProject(String projectId)Returns a copy of the test in a new project.intcompareTo(STest o)booleanequals(Object o)List<TestNameResponsibilityEntry>getAllResponsibilities()Returns all responsibilities for the testCurrentMuteInfogetCurrentMuteInfo()Returns current test mute info.TestNamegetName()Returns associated (low-level) TestName objectSProjectgetProject()Returns the associated project instance.StringgetProjectExternalId()Returns related project external idStringgetProjectId()Returns related project idTestNameResponsibilityEntrygetResponsibility()Returns responsibility information for the test.longgetTestId()Deprecated.longgetTestNameId()Returns identifier of the test name.inthashCode()booleanisMuted()Determines whether this test is currently muted (in project or in build type).StringtoString()
-
-
-
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:STestReturns associated (low-level) TestName object
-
getTestNameId
public long getTestNameId()
Description copied from interface:STestReturns identifier of the test name.- Specified by:
getTestNameIdin interfaceSTest- Returns:
- test name identifier.
-
getTestId
@Deprecated public long getTestId()
Deprecated.Description copied from interface:STestReturns the id associated with this test
-
getProjectId
@NotNull public String getProjectId()
Description copied from interface:STestReturns related project id- Specified by:
getProjectIdin interfaceSTest- Returns:
- related project id
-
getProjectExternalId
@Nullable public String getProjectExternalId()
Description copied from interface:STestReturns related project external id- Specified by:
getProjectExternalIdin interfaceSTest- Returns:
- related project external id
-
getProject
@Nullable public SProject getProject()
Description copied from interface:TestExReturns the associated project instance.- Specified by:
getProjectin interfaceTestEx- Returns:
- the associated project instance
- See Also:
STest.getProjectId()
-
getResponsibility
@Nullable public TestNameResponsibilityEntry getResponsibility()
Description copied from interface:STestReturns 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:
getResponsibilityin interfaceSTest- Returns:
- responsibility information for the test
-
getAllResponsibilities
@NotNull public List<TestNameResponsibilityEntry> getAllResponsibilities()
Description copied from interface:STestReturns all responsibilities for the test- Specified by:
getAllResponsibilitiesin interfaceSTest- Returns:
- all responsibilities for the test
-
isMuted
public boolean isMuted()
Description copied from interface:STestDetermines 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() != nullcheck.
-
getCurrentMuteInfo
@Nullable public CurrentMuteInfo getCurrentMuteInfo()
Description copied from interface:STestReturns current test mute info.- Specified by:
getCurrentMuteInfoin interfaceSTest- Returns:
- current test mute info
-
changeProject
@NotNull public STest changeProject(@NotNull String projectId)
Description copied from interface:TestExReturns a copy of the test in a new project. Note: despite the name, this test is not modified.- Specified by:
changeProjectin interfaceTestEx- Parameters:
projectId- new project id- Returns:
- new test
-
compareTo
public int compareTo(@NotNull STest o)- Specified by:
compareToin interfaceComparable<STest>
-
-