Class MethodNameTransformer.Suffixing

    • Constructor Detail

      • Suffixing

        public Suffixing​(java.lang.String suffix)
        Creates a new suffixing method name transformer.
        Parameters:
        suffix - The suffix to add to the method name before the seed.
    • Method Detail

      • withRandomSuffix

        public static MethodNameTransformer withRandomSuffix()
        Creates a new suffixing method name transformer which adds a default suffix with a random name component.
        Returns:
        A method name transformer that adds a randomized suffix to the original method name.
      • transform

        public java.lang.String transform​(MethodDescription methodDescription)
        Description copied from interface: MethodNameTransformer
        Transforms a method's name to an alternative name. This name must not be equal to any existing method of the created class.
        Specified by:
        transform in interface MethodNameTransformer
        Parameters:
        methodDescription - The original method.
        Returns:
        The alternative name.