Class MethodSource

    • Method Detail

      • from

        public static MethodSource from​(String className,
                                        String methodName)
        Create a new MethodSource using the supplied class name and method name.
        Parameters:
        className - the class name; must not be null or blank
        methodName - the method name; must not be null or blank
      • from

        public static MethodSource from​(String className,
                                        String methodName,
                                        String methodParameterTypes)
        Create a new MethodSource using the supplied class name, method name, and method parameter types.
        Parameters:
        className - the class name; must not be null or blank
        methodName - the method name; must not be null or blank
        methodParameterTypes - the method parameter types as a string
      • from

        @API(status=STABLE,
             since="1.3")
        public static MethodSource from​(Class<?> testClass,
                                        Method testMethod)
        Create a new MethodSource using the supplied class and method.

        This method should be used in favor of from(Method) if the test method is inherited from a superclass or present as an interface default method.

        Parameters:
        testClass - the Java class; must not be null
        testMethod - the Java method; must not be null
        Since:
        1.3
      • getClassName

        public String getClassName()
        Get the class name of this source.
      • getMethodName

        public final String getMethodName()
        Get the method name of this source.
      • getMethodParameterTypes

        public final String getMethodParameterTypes()
        Get the method parameter types of this source.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object