Class ImmutableTestInfo

  • All Implemented Interfaces:
    TestInfo

    @Generated("org.immutables.processor.ProxyProcessor")
    public final class ImmutableTestInfo
    extends Object
    implements TestInfo
    Immutable implementation of TestInfo.

    Use the builder to create immutable instances: ImmutableTestInfo.builder().

    • Method Detail

      • getTestInstance

        public Object getTestInstance()
        Specified by:
        getTestInstance in interface TestInfo
        Returns:
        The value of the testInstance attribute
      • getTestClass

        public Class<?> getTestClass()
        Specified by:
        getTestClass in interface TestInfo
        Returns:
        The value of the testClass attribute
      • getTestMethod

        public Method getTestMethod()
        Specified by:
        getTestMethod in interface TestInfo
        Returns:
        The value of the testMethod attribute
      • getTestName

        public String getTestName()
        Specified by:
        getTestName in interface TestInfo
        Returns:
        The value of the testName attribute
      • withTestInstance

        public final ImmutableTestInfo withTestInstance​(Object value)
        Copy the current immutable object by setting a value for the testInstance attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for testInstance
        Returns:
        A modified copy of the this object
      • withTestClass

        public final ImmutableTestInfo withTestClass​(Class<?> value)
        Copy the current immutable object by setting a value for the testClass attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for testClass
        Returns:
        A modified copy of the this object
      • withTestMethod

        public final ImmutableTestInfo withTestMethod​(Method value)
        Copy the current immutable object by setting a value for the testMethod attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for testMethod
        Returns:
        A modified copy of the this object
      • withTestName

        public final ImmutableTestInfo withTestName​(String value)
        Copy the current immutable object by setting a value for the testName attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for testName
        Returns:
        A modified copy of the this object
      • equals

        public boolean equals​(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: testInstance, testClass, testMethod, testName.
        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
      • copyOf

        public static ImmutableTestInfo copyOf​(TestInfo instance)
        Creates an immutable copy of a TestInfo value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
        Parameters:
        instance - The instance to copy
        Returns:
        A copied immutable TestInfo instance