Class NameConverter

java.lang.Object
net.thucydides.core.util.NameConverter

public final class NameConverter extends Object
Utility class to convert test case and method names into human-readable form.
Author:
johnsmart
  • Method Details

    • humanize

      public static String humanize(String name)
      Converts a class or method name into a human-readable sentence.
      Parameters:
      name - a class or method name
      Returns:
      the human-readable form
    • splitCamelCase

      public static String splitCamelCase(String name)
      Inserts spaces between words in a CamelCase name.
      Parameters:
      name - a name in camel-case
      Returns:
      the name with spaces instead of underscores
    • withNoArguments

      public static String withNoArguments(String methodName)
    • withNoIssueNumbers

      public static String withNoIssueNumbers(String methodName)
    • stripArgumentsFrom

      public static String stripArgumentsFrom(String methodName)
    • stripIndexesFrom

      public static String stripIndexesFrom(String methodName)
    • underscore

      public static String underscore(String name)
      Transform a camel-case word to underscored-version.
      Parameters:
      name - name to be converted
      Returns:
      a name with underscore separators
    • filesystemSafe

      public static String filesystemSafe(String name)