Class ImmutableTestInfo

    • Constructor Detail

      • ImmutableTestInfo

        public ImmutableTestInfo​(String testName,
                                 String testCaseName,
                                 Iterable<String> labels,
                                 Iterable<String> contacts,
                                 Object timeoutMs,
                                 boolean runTestsSeparately,
                                 String type)
        Construct a new immutable TestInfo instance.
        Parameters:
        testName - The value for the testName attribute
        testCaseName - The value for the testCaseName attribute
        labels - The value for the labels attribute
        contacts - The value for the contacts attribute
        timeoutMs - The value for the timeoutMs attribute
        runTestsSeparately - The value for the runTestsSeparately attribute
        type - The value for the type attribute
    • Method Detail

      • testName

        public String testName()
        Specified by:
        testName in class TestInfo
        Returns:
        the type of test. This should generally be the rule name
      • labels

        public com.google.common.collect.ImmutableSet<String> labels()
        Specified by:
        labels in class TestInfo
      • contacts

        public com.google.common.collect.ImmutableSet<String> contacts()
        Specified by:
        contacts in class TestInfo
      • type

        public String type()
        Specified by:
        type in class TestInfo
        Returns:
        the 'type' to pass to the external test runner
      • equals

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of ImmutableTestInfo that have equal attribute values.
        Overrides:
        equals in class Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Computes a hash code from attributes: testName, testCaseName, labels, contacts, timeoutMs, runTestsSeparately, type.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

        public String toString()
        Prints the immutable value TestInfo with attribute values.
        Overrides:
        toString in class Object
        Returns:
        A string representation of the value
      • typedTimeoutMs

        public Optional<Long> typedTimeoutMs()

        Returns a lazily initialized value of the typedTimeoutMs attribute. Initialized once and only once and stored for subsequent access with proper synchronization.

        Overrides:
        typedTimeoutMs in class TestInfo
        Returns:
        A lazily initialized value of the typedTimeoutMs attribute