本文整理汇总了Java中org.jbehave.core.annotations.UsingEmbedder类的典型用法代码示例。如果您正苦于以下问题:Java UsingEmbedder类的具体用法?Java UsingEmbedder怎么用?Java UsingEmbedder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UsingEmbedder类属于org.jbehave.core.annotations包,在下文中一共展示了UsingEmbedder类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: buildEmbedder
import org.jbehave.core.annotations.UsingEmbedder; //导入依赖的package包/类
public Embedder buildEmbedder() {
if (!finder.isAnnotationPresent(UsingEmbedder.class)) {
return new Embedder();
}
boolean batch = control(finder, "batch");
boolean skip = control(finder, "skip");
boolean generateViewAfterStories = control(finder, "generateViewAfterStories");
boolean ignoreFailureInStories = control(finder, "ignoreFailureInStories");
boolean ignoreFailureInView = control(finder, "ignoreFailureInView");
boolean verboseFailures = control(finder, "verboseFailures");
boolean verboseFiltering = control(finder, "verboseFiltering");
long storyTimeoutInSecs = finder.getAnnotatedValue(UsingEmbedder.class, Long.class, "storyTimeoutInSecs");
int threads = finder.getAnnotatedValue(UsingEmbedder.class, Integer.class, "threads");
Embedder embedder = embedder();
embedder.embedderControls().doBatch(batch).doSkip(skip).doGenerateViewAfterStories(generateViewAfterStories)
.doIgnoreFailureInStories(ignoreFailureInStories).doIgnoreFailureInView(ignoreFailureInView)
.doVerboseFailures(verboseFailures).doVerboseFiltering(verboseFiltering).useStoryTimeoutInSecs(storyTimeoutInSecs).useThreads(threads);
Configuration configuration = buildConfiguration();
embedder.useConfiguration(configuration);
boolean useStepsFactory = finder.getAnnotatedValue(UsingEmbedder.class, Boolean.class, "stepsFactory");
if (useStepsFactory) {
embedder.useStepsFactory(buildStepsFactory(configuration));
} else {
embedder.useCandidateSteps(buildCandidateSteps(configuration));
}
List<String> metaFilters = finder.getAnnotatedValues(UsingEmbedder.class, String.class, "metaFilters");
if (!metaFilters.isEmpty()) {
embedder.useMetaFilters(metaFilters);
}
Properties systemProperties = loadProperties(finder.getAnnotatedValue(UsingEmbedder.class, String.class,
"systemProperties"));
if (!systemProperties.isEmpty()) {
embedder.useSystemProperties(systemProperties);
}
return embedder;
}
开发者ID:vactowb,项目名称:jbehave-core,代码行数:38,代码来源:AnnotationBuilder.java
示例2: embedder
import org.jbehave.core.annotations.UsingEmbedder; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private Embedder embedder() {
return instanceOf(Embedder.class,
(Class<? extends Embedder>) finder.getAnnotatedValue(UsingEmbedder.class, Class.class, "embedder"));
}
开发者ID:vactowb,项目名称:jbehave-core,代码行数:6,代码来源:AnnotationBuilder.java
示例3: control
import org.jbehave.core.annotations.UsingEmbedder; //导入依赖的package包/类
private boolean control(AnnotationFinder finder, String name) {
return finder.getAnnotatedValue(UsingEmbedder.class, Boolean.class, name);
}
开发者ID:vactowb,项目名称:jbehave-core,代码行数:4,代码来源:AnnotationBuilder.java
注:本文中的org.jbehave.core.annotations.UsingEmbedder类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论