public class TestListResolver extends Object implements GenericTestPattern<ResolvedTest,String,String>
shouldRun(String, String)
are filters easily used in JUnit filter or TestNG.
This class is independent of JUnit and TestNG API.org.apache.maven.surefire.booter.SurefireReflector
using specific ClassLoader.Constructor and Description |
---|
TestListResolver(Collection<String> tests) |
TestListResolver(Collection<String> included,
Collection<String> excluded) |
TestListResolver(String csvTests) |
public TestListResolver(Collection<String> tests)
public TestListResolver(String csvTests)
public TestListResolver(Collection<String> included, Collection<String> excluded)
public static TestListResolver newTestListResolver(Set<ResolvedTest> includedPatterns, Set<ResolvedTest> excludedPatterns)
public boolean hasIncludedMethodPatterns()
hasIncludedMethodPatterns
in interface GenericTestPattern<ResolvedTest,String,String>
public boolean hasExcludedMethodPatterns()
hasExcludedMethodPatterns
in interface GenericTestPattern<ResolvedTest,String,String>
public boolean hasMethodPatterns()
hasMethodPatterns
in interface GenericTestPattern<ResolvedTest,String,String>
public static TestListResolver optionallyWildcardFilter(TestListResolver resolver)
resolver
- filter possibly having method patternsresolver
if resolver.hasMethodPatterns()
returns true
; Otherwise wildcard filter *.class
is returned.public static TestListResolver getEmptyTestListResolver()
public final boolean isWildcard()
public TestFilter<String,String> and(TestListResolver another)
public TestFilter<String,String> or(TestListResolver another)
public boolean shouldRun(String testClassFile, String methodName)
true
if satisfies testClassFile
and methodName
filter.shouldRun
in interface TestFilter<String,String>
testClassFile
- format must be e.g. "my/package/MyTest.class" including class extension; or nullmethodName
- real test-method name; or nullpublic boolean isEmpty()
isEmpty
in interface GenericTestPattern<ResolvedTest,String,String>
public String getPluginParameterTest()
getPluginParameterTest
in interface GenericTestPattern<ResolvedTest,String,String>
public Set<ResolvedTest> getIncludedPatterns()
getIncludedPatterns
in interface GenericTestPattern<ResolvedTest,String,String>
public Set<ResolvedTest> getExcludedPatterns()
getExcludedPatterns
in interface GenericTestPattern<ResolvedTest,String,String>
Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.