Class 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)
    • Method Detail

      • getName

        @NotNull
        public TestName getName()
        Description copied from interface: STest
        Returns associated (low-level) TestName object
        Specified by:
        getName in interface STest
        Returns:
        associated TestName object
      • getTestNameId

        public long getTestNameId()
        Description copied from interface: STest
        Returns identifier of the test name.
        Specified by:
        getTestNameId in interface STest
        Returns:
        test name identifier.
      • getTestId

        @Deprecated
        public long getTestId()
        Deprecated.
        Description copied from interface: STest
        Returns the id associated with this test
        Specified by:
        getTestId in interface STest
        Returns:
        test id
      • getProjectId

        @NotNull
        public String getProjectId()
        Description copied from interface: STest
        Returns related project id
        Specified by:
        getProjectId in interface STest
        Returns:
        related project id
      • getProjectExternalId

        @Nullable
        public String getProjectExternalId()
        Description copied from interface: STest
        Returns related project external id
        Specified by:
        getProjectExternalId in interface STest
        Returns:
        related project external id
      • getProject

        @Nullable
        public SProject getProject()
        Description copied from interface: TestEx
        Returns the associated project instance.
        Specified by:
        getProject in interface TestEx
        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 interface STest
        Returns:
        responsibility information 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.

        Specified by:
        isMuted in interface STest
        Returns:
        whether this test is muted.
      • getCurrentMuteInfo

        @Nullable
        public CurrentMuteInfo getCurrentMuteInfo()
        Description copied from interface: STest
        Returns current test mute info.
        Specified by:
        getCurrentMuteInfo in interface STest
        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 interface TestEx
        Parameters:
        projectId - new project id
        Returns:
        new test
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object