本文整理汇总了Java中org.jbehave.core.reporters.CrossReference类的典型用法代码示例。如果您正苦于以下问题:Java CrossReference类的具体用法?Java CrossReference怎么用?Java CrossReference使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CrossReference类属于org.jbehave.core.reporters包,在下文中一共展示了CrossReference类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: PortalStories
import org.jbehave.core.reporters.CrossReference; //导入依赖的package包/类
protected PortalStories() {
CrossReference crossReference = new CrossReference().withJsonOnly().withOutputAfterEachStory(true)
.excludingStoriesWithNoExecutedScenarios(true);
ContextView contextView = new LocalFrameContextView().sized(640, 120);
SeleniumContext seleniumContext = new SeleniumContext();
SeleniumStepMonitor stepMonitor = new SeleniumStepMonitor(contextView, seleniumContext,
crossReference.getStepMonitor());
Format[] formats = new Format[]{new SeleniumContextOutput(seleniumContext), CONSOLE, WEB_DRIVER_HTML};
StoryReporterBuilder reporterBuilder = new StoryReporterBuilder()
.withCodeLocation(codeLocationFromClass(this.getClass())).withFailureTrace(true)
.withFailureTraceCompression(true).withDefaultFormats().withFormats(formats)
.withCrossReference(crossReference);
Configuration configuration = new SeleniumConfiguration().useSeleniumContext(seleniumContext)
.useFailureStrategy(new FailingUponPendingStep())
.useStoryControls(new StoryControls().doResetStateBeforeScenario(false)).useStepMonitor(stepMonitor)
.useStoryLoader(new LoadFromClasspath(this.getClass()))
.useStoryReporterBuilder(reporterBuilder);
useConfiguration(configuration);
ApplicationContext context = new SpringApplicationContextFactory("applicationContext-tests.xml").createApplicationContext();
useStepsFactory(new SpringStepsFactory(configuration, context));
}
开发者ID:apache,项目名称:rave,代码行数:24,代码来源:PortalStories.java
示例2: InvoiceStories
import org.jbehave.core.reporters.CrossReference; //导入依赖的package包/类
public InvoiceStories() {
CrossReference crossReference = new CrossReference().withJsonOnly().withOutputAfterEachStory(true)
.excludingStoriesWithNoExecutedScenarios(true);
ContextView contextView = new LocalFrameContextView().sized(640, 120);
SeleniumContext seleniumContext = new SeleniumContext();
SeleniumStepMonitor stepMonitor = new SeleniumStepMonitor(contextView, seleniumContext,
crossReference.getStepMonitor());
Format[] formats = new Format[] { new SeleniumContextOutput(seleniumContext), CONSOLE, WEB_DRIVER_HTML };
StoryReporterBuilder reporterBuilder = new StoryReporterBuilder()
.withCodeLocation(codeLocationFromClass(InvoiceStories.class)).withFailureTrace(true)
.withFailureTraceCompression(true).withDefaultFormats().withFormats(formats)
.withCrossReference(crossReference);
Configuration configuration = new SeleniumConfiguration().useSeleniumContext(seleniumContext)
.useFailureStrategy(new FailingUponPendingStep())
.useStoryControls(new StoryControls().doResetStateBeforeScenario(false)).useStepMonitor(stepMonitor)
.useStoryLoader(new LoadFromClasspath(InvoiceStories.class))
.useStoryReporterBuilder(reporterBuilder);
useConfiguration(configuration);
ApplicationContext context = new SpringApplicationContextFactory("invoice-steps.xml").createApplicationContext();
useStepsFactory(new SpringStepsFactory(configuration, context));
}
开发者ID:bartgeluykens,项目名称:Invoice-Keeper,代码行数:26,代码来源:InvoiceStories.java
示例3: configuration
import org.jbehave.core.reporters.CrossReference; //导入依赖的package包/类
@Override
public Configuration configuration() {
Class<? extends TraderEmbedder> embedderClass = this.getClass();
return new MostUsefulConfiguration()
.useStoryLoader(new LoadFromClasspath(embedderClass.getClassLoader()))
.useStoryReporterBuilder(new StoryReporterBuilder()
.withCodeLocation(CodeLocations.codeLocationFromClass(embedderClass))
.withDefaultFormats()
.withFormats(CONSOLE, TXT, HTML, XML)
.withCrossReference(new CrossReference()))
.useParameterConverters(new ParameterConverters()
.addConverters(new DateConverter(new SimpleDateFormat("yyyy-MM-dd")))) // use custom date pattern
.useStepPatternParser(new RegexPrefixCapturingPatternParser(
"%")) // use '%' instead of '$' to identify parameters
.useStepMonitor(new SilentStepMonitor());
}
开发者ID:vactowb,项目名称:jbehave-core,代码行数:17,代码来源:TraderEmbedder.java
示例4: configuration
import org.jbehave.core.reporters.CrossReference; //导入依赖的package包/类
@Override
public Configuration configuration() {
Class<? extends Embeddable> embeddableClass = this.getClass();
// Start from default ParameterConverters instance
ParameterConverters parameterConverters = new ParameterConverters();
// factory to allow parameter conversion and loading from external resources (used by StoryParser too)
ExamplesTableFactory examplesTableFactory = new ExamplesTableFactory(new LocalizedKeywords(), new LoadFromClasspath(embeddableClass), parameterConverters);
// add custom coverters
parameterConverters.addConverters(new DateConverter(new SimpleDateFormat("yyyy-MM-dd")),
new ExamplesTableConverter(examplesTableFactory));
// parameterConverters.addConverters(new MyConverter());
// parameterConverters.addConverters(new StudentConverter(new ExamplesTableFactory()));
CrossReference xref = new CrossReference();
return new MostUsefulConfiguration()
.useStoryLoader(new LoadFromClasspath(embeddableClass))
.useStoryParser(new RegexStoryParser(examplesTableFactory))
.useStoryReporterBuilder(new StoryReporterBuilder()
.withCodeLocation(CodeLocations.codeLocationFromClass(embeddableClass))
.withDefaultFormats()
.withCrossReference(xref )
.withFormats(CONSOLE, TXT, WebDriverHtmlOutput.WEB_DRIVER_HTML, XML))
.useParameterConverters(parameterConverters);
}
开发者ID:saikrishna321,项目名称:JBehave-Selendroid-Android-Automation,代码行数:25,代码来源:MyStoriesMaps.java
示例5: shouldGenerateCrossReferenceWhenAvailable
import org.jbehave.core.reporters.CrossReference; //导入依赖的package包/类
@Test
public void shouldGenerateCrossReferenceWhenAvailable() {
Embedder embedder = new Embedder();
embedder.useConfiguration(new MostUsefulConfiguration().useStoryReporterBuilder(new StoryReporterBuilder()
.withCrossReference(new CrossReference())));
// When
embedder.generateCrossReference();
// Then
assertXrefExists(embedder.configuration().storyReporterBuilder(), "json");
assertXrefExists(embedder.configuration().storyReporterBuilder(), "xml");
}
开发者ID:vactowb,项目名称:jbehave-core,代码行数:16,代码来源:EmbedderBehaviour.java
注:本文中的org.jbehave.core.reporters.CrossReference类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论