Class ResolvedTest

java.lang.Object
org.apache.maven.surefire.api.testset.ResolvedTest

@Deprecated public final class ResolvedTest extends Object
Deprecated.
will be renamed to ResolvedTestPattern
Single pattern test filter resolved from multi pattern filter -Dtest=MyTest#test,AnotherTest#otherTest.
  • Field Details

    • CLASS_FILE_EXTENSION

      private static final String CLASS_FILE_EXTENSION
      Deprecated.
      See Also:
    • JAVA_FILE_EXTENSION

      private static final String JAVA_FILE_EXTENSION
      Deprecated.
      See Also:
    • WILDCARD_PATH_PREFIX

      private static final String WILDCARD_PATH_PREFIX
      Deprecated.
      See Also:
    • WILDCARD_FILENAME_POSTFIX

      private static final String WILDCARD_FILENAME_POSTFIX
      Deprecated.
      See Also:
    • classPattern

      private final String classPattern
      Deprecated.
    • methodPattern

      private final String methodPattern
      Deprecated.
    • isRegexTestClassPattern

      private final boolean isRegexTestClassPattern
      Deprecated.
    • isRegexTestMethodPattern

      private final boolean isRegexTestMethodPattern
      Deprecated.
    • description

      private final String description
      Deprecated.
    • classMatcher

      private final ResolvedTest.ClassMatcher classMatcher
      Deprecated.
    • methodMatcher

      private final ResolvedTest.MethodMatcher methodMatcher
      Deprecated.
  • Constructor Details

    • ResolvedTest

      public ResolvedTest(String classPattern, String methodPattern, boolean isRegex)
      Deprecated.
      '*' means zero or more characters
      '?' means one and only one character The pattern %regex[] prefix and suffix does not appear. The regex pattern is always unwrapped by the caller.
      Parameters:
      classPattern - test class file pattern
      methodPattern - test method
      isRegex - true if pattern is regex
    • ResolvedTest

      public ResolvedTest(ResolvedTest.Type type, String pattern, boolean isRegex)
      Deprecated.
      The regex pattern is always unwrapped.
      Parameters:
      type - class or method
      pattern - pattern or regex
      isRegex - true if pattern is regex
  • Method Details

    • getTestClassPattern

      public String getTestClassPattern()
      Deprecated.
      Test class file pattern, e.g. org/**/Cat*.class
      , or null if not any and hasTestClassPattern() returns false. Other examples: org/animals/Cat*, org/animals/Ca?.class, %regex[Cat.class|Dog.*]

      '*' means zero or more characters
      '?' means one and only one character
      Returns:
      class pattern or regex
    • hasTestClassPattern

      public boolean hasTestClassPattern()
      Deprecated.
    • getTestMethodPattern

      public String getTestMethodPattern()
      Deprecated.
      Test method, e.g. "realTestMethod".
      , or null if not any and hasTestMethodPattern() returns false. Other examples: test* or testSomethin? or %regex[testOne|testTwo] or %ant[testOne|testTwo]

      '*' means zero or more characters
      '?' means one and only one character
      Returns:
      method pattern or regex
    • hasTestMethodPattern

      public boolean hasTestMethodPattern()
      Deprecated.
    • isRegexTestClassPattern

      public boolean isRegexTestClassPattern()
      Deprecated.
    • isRegexTestMethodPattern

      public boolean isRegexTestMethodPattern()
      Deprecated.
    • isEmpty

      public boolean isEmpty()
      Deprecated.
    • matchAsInclusive

      public boolean matchAsInclusive(String testClassFile, String methodName)
      Deprecated.
    • matchAsExclusive

      public boolean matchAsExclusive(String testClassFile, String methodName)
      Deprecated.
    • equals

      public boolean equals(Object o)
      Deprecated.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Deprecated.
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Deprecated.
      Overrides:
      toString in class Object
    • description

      private static String description(String clazz, String method, boolean isRegex)
      Deprecated.
    • canMatchExclusive

      private boolean canMatchExclusive(String testClassFile, String methodName)
      Deprecated.
    • canMatchExclusiveMethods

      private boolean canMatchExclusiveMethods(String testClassFile, String methodName)
      Deprecated.
    • canMatchExclusiveClasses

      private boolean canMatchExclusiveClasses(String testClassFile, String methodName)
      Deprecated.
    • canMatchExclusiveAll

      private boolean canMatchExclusiveAll(String testClassFile, String methodName)
      Deprecated.
    • alwaysInclusiveQuietly

      private boolean alwaysInclusiveQuietly(String testClassFile)
      Deprecated.
      Prevents match(String, String) from throwing NPE in situations when inclusive returns true.
      Parameters:
      testClassFile - path to class file
      Returns:
      true if examined class in null and class pattern exists
    • match

      private boolean match(String testClassFile, String methodName)
      Deprecated.
    • matchClass

      private boolean matchClass(String testClassFile)
      Deprecated.
    • matchMethod

      private boolean matchMethod(String methodName)
      Deprecated.
    • tryBlank

      private static String tryBlank(String s)
      Deprecated.
    • reformatClassPattern

      private static String reformatClassPattern(String s, boolean isRegex)
      Deprecated.
    • convertToPath

      private static String convertToPath(String className)
      Deprecated.
    • wrapRegex

      static String wrapRegex(String unwrapped)
      Deprecated.
    • fromFullyQualifiedClass

      static String fromFullyQualifiedClass(String cls)
      Deprecated.
    • checkIllegalCharacters

      private static void checkIllegalCharacters(String... expressions)
      Deprecated.
    • throwSanityError

      private static void throwSanityError(IllegalArgumentException e)
      Deprecated.