Class ResolvedTest


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

      • CLASS_FILE_EXTENSION

        private static final java.lang.String CLASS_FILE_EXTENSION
        Deprecated.
        See Also:
        Constant Field Values
      • JAVA_FILE_EXTENSION

        private static final java.lang.String JAVA_FILE_EXTENSION
        Deprecated.
        See Also:
        Constant Field Values
      • WILDCARD_PATH_PREFIX

        private static final java.lang.String WILDCARD_PATH_PREFIX
        Deprecated.
        See Also:
        Constant Field Values
      • WILDCARD_FILENAME_POSTFIX

        private static final java.lang.String WILDCARD_FILENAME_POSTFIX
        Deprecated.
        See Also:
        Constant Field Values
      • classPattern

        private final java.lang.String classPattern
        Deprecated.
      • methodPattern

        private final java.lang.String methodPattern
        Deprecated.
      • isRegexTestClassPattern

        private final boolean isRegexTestClassPattern
        Deprecated.
      • isRegexTestMethodPattern

        private final boolean isRegexTestMethodPattern
        Deprecated.
      • description

        private final java.lang.String description
        Deprecated.
    • Constructor Detail

      • ResolvedTest

        public ResolvedTest​(java.lang.String classPattern,
                            java.lang.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,
                            java.lang.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 Detail

      • getTestClassPattern

        public java.lang.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 java.lang.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​(java.lang.String testClassFile,
                                        java.lang.String methodName)
        Deprecated.
      • matchAsExclusive

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

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

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

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

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

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

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

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

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

        private boolean alwaysInclusiveQuietly​(java.lang.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​(java.lang.String testClassFile,
                              java.lang.String methodName)
        Deprecated.
      • matchClass

        private boolean matchClass​(java.lang.String testClassFile)
        Deprecated.
      • matchMethod

        private boolean matchMethod​(java.lang.String methodName)
        Deprecated.
      • tryBlank

        private static java.lang.String tryBlank​(java.lang.String s)
        Deprecated.
      • reformatClassPattern

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

        private static java.lang.String convertToPath​(java.lang.String className)
        Deprecated.
      • wrapRegex

        static java.lang.String wrapRegex​(java.lang.String unwrapped)
        Deprecated.
      • fromFullyQualifiedClass

        static java.lang.String fromFullyQualifiedClass​(java.lang.String cls)
        Deprecated.
      • checkIllegalCharacters

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

        private static void throwSanityError​(java.lang.IllegalArgumentException e)
        Deprecated.