本文整理汇总了Java中org.jbehave.core.reporters.FilePrintStreamFactory.ResolveToPackagedName类的典型用法代码示例。如果您正苦于以下问题:Java ResolveToPackagedName类的具体用法?Java ResolveToPackagedName怎么用?Java ResolveToPackagedName使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ResolveToPackagedName类属于org.jbehave.core.reporters.FilePrintStreamFactory包,在下文中一共展示了ResolveToPackagedName类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: configuration
import org.jbehave.core.reporters.FilePrintStreamFactory.ResolveToPackagedName; //导入依赖的package包/类
@Override
public Configuration configuration() {
return new MostUsefulConfiguration().usePendingStepStrategy(new FailingUponPendingStep()).useStoryReporterBuilder(
new StoryReporterBuilder()
.withDefaultFormats()
.withPathResolver(new ResolveToPackagedName())
.withFormats(Format.HTML)
.withFailureTrace(true)
.withFailureTraceCompression(true));
}
示例2: storyReporterBuilder
import org.jbehave.core.reporters.FilePrintStreamFactory.ResolveToPackagedName; //导入依赖的package包/类
private StoryReporterBuilder storyReporterBuilder() {
return new StoryReporterBuilder()
.withCodeLocation(CodeLocations.codeLocationFromClass(this.getClass()))
.withPathResolver(new ResolveToPackagedName())
.withFailureTrace(true)
.withDefaultFormats()
.withFormats(IDE_CONSOLE, TXT, HTML);
}
示例3: configuration
import org.jbehave.core.reporters.FilePrintStreamFactory.ResolveToPackagedName; //导入依赖的package包/类
@Override
public Configuration configuration() {
Class<? extends Embeddable> embeddableClass = this.getClass();
Properties viewResources = new Properties();
viewResources.put("decorateNonHtml", "true");
// 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, new TableTransformers());
// add custom converters
parameterConverters.addConverters(new DateConverter(new SimpleDateFormat("yyyy-MM-dd")),
new ExamplesTableConverter(examplesTableFactory));
return new MostUsefulConfiguration()
.useStoryControls(new StoryControls().doDryRun(false).doSkipScenariosAfterFailure(false))
.useStoryLoader(new LoadFromClasspath(embeddableClass))
.useStoryParser(new RegexStoryParser(examplesTableFactory))
.useStoryPathResolver(new UnderscoredCamelCaseResolver())
.useStoryReporterBuilder(
new StoryReporterBuilder()
.withCodeLocation(CodeLocations.codeLocationFromClass(embeddableClass))
.withDefaultFormats().withPathResolver(new ResolveToPackagedName())
.withViewResources(viewResources).withFormats(CONSOLE, TXT, HTML, XML)
.withFailureTrace(true).withFailureTraceCompression(true).withCrossReference(xref))
.useParameterConverters(parameterConverters)
// use '%' instead of '$' to identify parameters
.useStepPatternParser(new RegexPrefixCapturingPatternParser("%")).useStepMonitor(xref.getStepMonitor());
}
示例4: shouldBuildWithCustomPathResolver
import org.jbehave.core.reporters.FilePrintStreamFactory.ResolveToPackagedName; //导入依赖的package包/类
@Test
public void shouldBuildWithCustomPathResolver() throws IOException {
// Given
StoryReporterBuilder builder = new StoryReporterBuilder();
String storyPath = storyPath(MyStory.class);
// When
assertThat(builder.pathResolver(), instanceOf(ResolveToPackagedName.class));
builder.withPathResolver(new ResolveToSimpleName()).build(storyPath);
// Then
assertThat(builder.pathResolver(), instanceOf(ResolveToSimpleName.class));
assertThat(builder.fileConfiguration("").getPathResolver(), instanceOf(ResolveToSimpleName.class));
}