本文整理汇总了Java中org.testng.ITestNGMethod.isBeforeTestConfiguration方法的典型用法代码示例。如果您正苦于以下问题:Java ITestNGMethod.isBeforeTestConfiguration方法的具体用法?Java ITestNGMethod.isBeforeTestConfiguration怎么用?Java ITestNGMethod.isBeforeTestConfiguration使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.testng.ITestNGMethod
的用法示例。
在下文中一共展示了ITestNGMethod.isBeforeTestConfiguration方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ifTestFixtureStarted
import org.testng.ITestNGMethod; //导入方法依赖的package包/类
private void ifTestFixtureStarted(final ITestContext context, final ITestNGMethod testMethod) {
if (testMethod.isBeforeTestConfiguration()) {
startBefore(getUniqueUuid(context), testMethod);
}
if (testMethod.isAfterTestConfiguration()) {
startAfter(getUniqueUuid(context), testMethod);
}
}
示例2: sortMethods
import org.testng.ITestNGMethod; //导入方法依赖的package包/类
private static List<ITestNGMethod> sortMethods(boolean forTests,
List<ITestNGMethod> allMethods, IAnnotationFinder finder) {
List<ITestNGMethod> sl = Lists.newArrayList();
List<ITestNGMethod> pl = Lists.newArrayList();
ITestNGMethod[] allMethodsArray = allMethods.toArray(new ITestNGMethod[allMethods.size()]);
// Fix the method inheritance if these are @Configuration methods to make
// sure base classes are invoked before child classes if 'before' and the
// other way around if they are 'after'
if (!forTests && allMethodsArray.length > 0) {
ITestNGMethod m = allMethodsArray[0];
boolean before = m.isBeforeClassConfiguration()
|| m.isBeforeMethodConfiguration() || m.isBeforeSuiteConfiguration()
|| m.isBeforeTestConfiguration();
MethodInheritance.fixMethodInheritance(allMethodsArray, before);
}
topologicalSort(allMethodsArray, sl, pl);
List<ITestNGMethod> result = Lists.newArrayList();
result.addAll(sl);
result.addAll(pl);
return result;
}
示例3: isSupportedConfigurationFixture
import org.testng.ITestNGMethod; //导入方法依赖的package包/类
@SuppressWarnings("BooleanExpressionComplexity")
private boolean isSupportedConfigurationFixture(final ITestNGMethod testMethod) {
return testMethod.isBeforeMethodConfiguration() || testMethod.isAfterMethodConfiguration()
|| testMethod.isBeforeTestConfiguration() || testMethod.isAfterTestConfiguration()
|| testMethod.isBeforeClassConfiguration() || testMethod.isAfterClassConfiguration()
|| testMethod.isBeforeSuiteConfiguration() || testMethod.isAfterSuiteConfiguration();
}