class TestNgMethodUtils
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
private |
TestNgMethodUtils() |
Modifier and Type | Method and Description |
---|---|
(package private) static boolean |
cannotRunMethodIndependently(ITestNGMethod tm) |
private static boolean |
containsConfigurationMethod(ITestNGMethod method,
java.util.List<ITestNGMethod> methods)
A helper method which checks if a given method is a configuration method and is part of list of
TestNG methods
|
private static boolean |
doesConfigMethodPassGroupFilters(ConfigurationMethod cm,
ITestNGMethod tm) |
private static boolean |
doesSetupMethodPassFirstTimeFilter(ConfigurationMethod cm,
ITestNGMethod tm) |
private static boolean |
doesTeardownMethodPassLastTimeFilter(ConfigurationMethod cm,
ITestNGMethod tm) |
(package private) static ITestNGMethod[] |
filterAfterTestMethods(ITestClass testClass,
java.util.function.BiPredicate<ITestNGMethod,IClass> predicate) |
(package private) static ITestNGMethod[] |
filterBeforeTestMethods(ITestClass testClass,
java.util.function.BiPredicate<ITestNGMethod,IClass> predicate) |
(package private) static ITestNGMethod[] |
filterMethods(IClass testClass,
ITestNGMethod[] methods,
java.util.function.BiPredicate<ITestNGMethod,IClass> predicate) |
(package private) static ITestNGMethod[] |
filterSetupConfigurationMethods(ITestNGMethod tm,
ITestNGMethod[] methods) |
(package private) static ITestNGMethod[] |
filterTeardownConfigurationMethods(ITestNGMethod tm,
ITestNGMethod[] methods) |
(package private) static java.lang.Object |
getMethodInvocationToken(ITestNGMethod method,
java.lang.Object instance) |
(package private) static boolean |
isConfigurationMethod(ITestNGMethod method)
A helper method that checks to see if a method is a configuration method or not.
|
private static boolean |
isConfigurationMethod(ITestNGMethod method,
boolean includeGroupConfigs)
A helper method that checks to see if a method is a configuration method or not.
|
static boolean isConfigurationMethod(ITestNGMethod method)
method
- - A ITestNGMethod
object which needs to be checked.true
if the method is a configuration method and false if its a test
method.private static boolean isConfigurationMethod(ITestNGMethod method, boolean includeGroupConfigs)
method
- - A ITestNGMethod
object which needs to be checked.includeGroupConfigs
- - true
if before/after group configuration annotations
are also to be taken into consideration.true
if the method is a configuration method and false if its a test
method.private static boolean containsConfigurationMethod(ITestNGMethod method, java.util.List<ITestNGMethod> methods)
method
- - A ITestNGMethod
object which needs to be checked.methods
- - A List of ITestNGMethod
in which the check needs to be done.true
if the method is a configuration method and exists in the list of
methods passed.static ITestNGMethod[] filterBeforeTestMethods(ITestClass testClass, java.util.function.BiPredicate<ITestNGMethod,IClass> predicate)
static ITestNGMethod[] filterAfterTestMethods(ITestClass testClass, java.util.function.BiPredicate<ITestNGMethod,IClass> predicate)
static ITestNGMethod[] filterMethods(IClass testClass, ITestNGMethod[] methods, java.util.function.BiPredicate<ITestNGMethod,IClass> predicate)
static ITestNGMethod[] filterSetupConfigurationMethods(ITestNGMethod tm, ITestNGMethod[] methods)
static ITestNGMethod[] filterTeardownConfigurationMethods(ITestNGMethod tm, ITestNGMethod[] methods)
static boolean cannotRunMethodIndependently(ITestNGMethod tm)
tm
- - The ITestNGMethod
object which is to be tested.true
if the method depends on other methods and cannot be run
independently.static java.lang.Object getMethodInvocationToken(ITestNGMethod method, java.lang.Object instance)
private static boolean doesSetupMethodPassFirstTimeFilter(ConfigurationMethod cm, ITestNGMethod tm)
private static boolean doesTeardownMethodPassLastTimeFilter(ConfigurationMethod cm, ITestNGMethod tm)
private static boolean doesConfigMethodPassGroupFilters(ConfigurationMethod cm, ITestNGMethod tm)