• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java Embeddable类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.jbehave.core.Embeddable的典型用法代码示例。如果您正苦于以下问题:Java Embeddable类的具体用法?Java Embeddable怎么用?Java Embeddable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Embeddable类属于org.jbehave.core包,在下文中一共展示了Embeddable类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: resolveName

import org.jbehave.core.Embeddable; //导入依赖的package包/类
@Override
protected String resolveName(
		Class<? extends Embeddable> embeddableClass) {
       String simpleName = embeddableClass.getSimpleName();
       simpleName = simpleName.replace(wordToRemove, "");
       Matcher matcher = compile(resolutionPattern).matcher(
               simpleName);
	int startAt = 0;
	StringBuilder builder = new StringBuilder();
	while (matcher.find(startAt)) {
		builder.append(matcher.group(1).toLowerCase(locale));
		builder.append(SEPARATOR);
		startAt = matcher.start(2);
	}
	return builder.substring(0, builder.length() - 1);
}
 
开发者ID:verhagen,项目名称:text-adventure,代码行数:17,代码来源:DashCamelCaseResolver.java


示例2: configuration

import org.jbehave.core.Embeddable; //导入依赖的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 converters
    parameterConverters.addConverters(
            new DateConverter(new SimpleDateFormat("yyyy-MM-dd")),
            new ParameterConverters.EnumConverter()
    );
    return new MostUsefulConfiguration()
            .useStoryLoader(new LoadFromClasspath(embeddableClass))
            .useStoryParser(new RegexStoryParser(examplesTableFactory))
            .useStoryReporterBuilder(new StoryReporterBuilder()
                    .withCodeLocation(CodeLocations.codeLocationFromClass(embeddableClass))
                    .withDefaultFormats()
                    .withFormats(CONSOLE, TXT, HTML, XML))
            .useParameterConverters(parameterConverters);
}
 
开发者ID:apache,项目名称:rave,代码行数:22,代码来源:Stories.java


示例3: configuration

import org.jbehave.core.Embeddable; //导入依赖的package包/类
/**
 * <p>
 * Configuration de l'environnement d'exécution de JBehave :
 * <ul>
 * <li>CONSOLE : sortie des rapports en console pour facilitrer la phase de
 * développement dans l'IDE</li>
 * <li>HTML_TEMPLATE : génération de rapports HTML pour une meilleure
 * lisibilité au niveau de la PIC</li>
 * <li>Stratégie transmise à useStepMonitor() :
 * <ul>
 * <li>Par défaut : stratégie qui veut que les étapes du test à PENDING
 * soient ignorées, ainsi le test passe.</li>
 * <li>new FailingUponPendingStep() : stratégie qui veut que les étapes du
 * test à PENDING fassent échouer le test.</li>
 * </ul>
 * </li>
 * </ul>
 * </p>
 */
@Override
public Configuration configuration() {
    Class<? extends Embeddable> embeddableClass = this.getClass();
    URL codeLocation = codeLocationFromClass(embeddableClass);
    StoryReporterBuilder storyReporter = //
    new StoryReporterBuilder() //
            .withCodeLocation(codeLocation) //
            .withDefaultFormats() //
            .withFormats(CONSOLE, //
                    HTML_TEMPLATE) //
            .withFailureTrace(true) //
            .withFailureTraceCompression(true) //
            .withCrossReference(xref);
    return new MostUsefulConfiguration() //
            .useStoryLoader(new UTF8StoryLoader(embeddableClass)) //
            .useStoryReporterBuilder(storyReporter) //
            .usePendingStepStrategy(new FailingUponPendingStep()) //
            .useStepMonitor(xref.getStepMonitor());
}
 
开发者ID:wemanity,项目名称:Acceptance-Tests-with-JBehave,代码行数:39,代码来源:AllStoriesTest.java


示例4: configuration

import org.jbehave.core.Embeddable; //导入依赖的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 converters
    parameterConverters.addConverters(new DateConverter(new SimpleDateFormat("yyyy-MM-dd")),
            new ExamplesTableConverter(examplesTableFactory));
    return new MostUsefulConfiguration()
        .useStoryLoader(new LoadFromClasspath(embeddableClass))
        .useStoryParser(new RegexStoryParser(examplesTableFactory)) 
        .useStoryReporterBuilder(new StoryReporterBuilder()
            .withCodeLocation(CodeLocations.codeLocationFromClass(embeddableClass))
            .withDefaultFormats()
            .withFormats(CONSOLE, TXT, HTML, XML))
        .useParameterConverters(parameterConverters);
}
 
开发者ID:wemanity,项目名称:Acceptance-Tests-with-JBehave,代码行数:20,代码来源:MyStories.java


示例5: configuration

import org.jbehave.core.Embeddable; //导入依赖的package包/类
@Override
public Configuration configuration() {
    Class<? extends Embeddable> embeddableClass = this.getClass();
    Properties viewResources = new Properties();
    viewResources.put("decorateNonHtml", "true");
    return new MostUsefulConfiguration()
            .useParanamer(paranamer)
            .useStoryLoader(new LoadFromClasspath(embeddableClass))
            .useStoryPathResolver(new UnderscoredCamelCaseResolver().removeFromClassName("Story"))
            .useStoryReporterBuilder(new StoryReporterBuilder()
                    .withCodeLocation(CodeLocations.codeLocationFromClass(embeddableClass))
                    .withDefaultFormats()
                    .withPathResolver(new FilePrintStreamFactory.ResolveToPackagedName())
                    .withViewResources(viewResources)
                    .withFormats(CONSOLE, TXT, HTML, XML))
            .useParameterConverters(new ParameterConverters()
                    .addConverters(new ParameterConverters.NumberConverter(), new DateConverter(new SimpleDateFormat("yyyy-MM-dd")))) // use custom date pattern
            .useStepPatternParser(new RegexPrefixCapturingPatternParser(
                    "$")) // use '%' instead of '$' to identify parameters
            .useStepMonitor(new SilentStepMonitor());
}
 
开发者ID:yujunliang,项目名称:seleniumcapsules,代码行数:22,代码来源:AllStoryRunner.java


示例6: resolveName

import org.jbehave.core.Embeddable; //导入依赖的package包/类
@Override
protected String resolveName(final Class<? extends Embeddable> embeddableClass) {
	String simpleName = embeddableClass.getSimpleName();
	for (final String wordToRemove : this.wordsToRemove) {
		simpleName = simpleName.replace(wordToRemove, "");
	}
	final Matcher matcher = Pattern.compile(this.resolutionPattern).matcher(simpleName);
	int startAt = 0;
	final StringBuilder builder = new StringBuilder();
	while (matcher.find(startAt)) {
		builder.append(matcher.group(1).toLowerCase(this.locale));
		builder.append(JBossUnderscoredCamelCaseResolver.UNDERSCORE);
		startAt = matcher.start(4);
	}
	return builder.substring(0, builder.length() - 1);
}
 
开发者ID:andreiserea,项目名称:arquillian-jbehave,代码行数:17,代码来源:JBossUnderscoredCamelCaseResolver.java


示例7: configuration

import org.jbehave.core.Embeddable; //导入依赖的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 converters
    parameterConverters.addConverters(new DateConverter(new SimpleDateFormat("yyyy-MM-dd")),
            new ExamplesTableConverter(examplesTableFactory));
    return new MostUsefulConfiguration()
    .useStoryLoader(new LoadFromClasspath(embeddableClass))
    .useStoryParser(new RegexStoryParser(examplesTableFactory))
    .useStoryReporterBuilder(new StoryReporterBuilder()
    .withCodeLocation(CodeLocations.codeLocationFromClass(embeddableClass))
    .withDefaultFormats()
    .withFormats(CONSOLE, TXT, HTML, XML))
    .useParameterConverters(parameterConverters);
}
 
开发者ID:vactowb,项目名称:jbehave-core,代码行数:20,代码来源:MyStories.java


示例8: runStoriesWithAnnotatedEmbedderRunner

import org.jbehave.core.Embeddable; //导入依赖的package包/类
public void runStoriesWithAnnotatedEmbedderRunner(List<String> classNames) {
    EmbedderClassLoader classLoader = classLoader();
    for (String className : classNames) {
        embedderMonitor.runningWithAnnotatedEmbedderRunner(className);
        AnnotatedEmbedderRunner runner = AnnotatedEmbedderUtils.annotatedEmbedderRunner(className, classLoader);
        try {
            Object annotatedInstance = runner.createTest();
            if (annotatedInstance instanceof Embeddable) {
                ((Embeddable) annotatedInstance).run();
            } else {
                embedderMonitor.annotatedInstanceNotOfType(annotatedInstance, Embeddable.class);
            }
        } catch (Throwable e) {
            throw new AnnotatedEmbedderRunFailed(runner, e);
        }
    }
}
 
开发者ID:vactowb,项目名称:jbehave-core,代码行数:18,代码来源:Embedder.java


示例9: reportStepdocsAsEmbeddables

import org.jbehave.core.Embeddable; //导入依赖的package包/类
public void reportStepdocsAsEmbeddables(List<String> classNames) {
    EmbedderControls embedderControls = embedderControls();
    if (embedderControls.skip()) {
        embedderMonitor.embeddablesSkipped(classNames);
        return;
    }

    for (Embeddable embeddable : embeddables(classNames, classLoader())) {
        if (embeddable instanceof ConfigurableEmbedder) {
            ConfigurableEmbedder configurableEmbedder = (ConfigurableEmbedder) embeddable;
            List<CandidateSteps> steps = configurableEmbedder.candidateSteps();
            if (steps.isEmpty()) {
                steps = configurableEmbedder.stepsFactory().createCandidateSteps();
            }
            reportStepdocs(configurableEmbedder.configuration(), steps);
        } else {
            embedderMonitor.embeddableNotConfigurable(embeddable.getClass().getName());
        }
    }
}
 
开发者ID:vactowb,项目名称:jbehave-core,代码行数:21,代码来源:Embedder.java


示例10: injectEmbedder

import org.jbehave.core.Embeddable; //导入依赖的package包/类
protected Object injectEmbedder(Embedder embedder, Class<?> annotatedClass) {
    try {
        Object instance = annotatedClass.newInstance();
        if (instance instanceof Embeddable) {
            Embeddable embeddable = (Embeddable) instance;
            embeddable.useEmbedder(embedder);
        }
        if (instance instanceof ConfigurableEmbedder) {
            ConfigurableEmbedder configurableEmbedder = (ConfigurableEmbedder) instance;
            configurableEmbedder.useConfiguration(embedder.configuration());
            configurableEmbedder.addSteps(embedder.candidateSteps());
            configurableEmbedder.useStepsFactory(embedder.stepsFactory());
        }
        return instance;
    } catch (Exception e) {
        annotationMonitor.elementCreationFailed(annotatedClass, e);
        throw new InstantiationFailed(annotatedClass, e);
    }
}
 
开发者ID:vactowb,项目名称:jbehave-core,代码行数:20,代码来源:AnnotationBuilder.java


示例11: resolveName

import org.jbehave.core.Embeddable; //导入依赖的package包/类
@Override
protected String resolveName(
		Class<? extends Embeddable> embeddableClass) {
       String simpleName = embeddableClass.getSimpleName();
       simpleName = simpleName.replace(wordToRemove, "");
       Matcher matcher = compile(resolutionPattern).matcher(
               simpleName);
	int startAt = 0;
	StringBuilder builder = new StringBuilder();
	while (matcher.find(startAt)) {
		builder.append(matcher.group(1).toLowerCase(locale));
		builder.append(UNDERSCORE);
		startAt = matcher.start(2);
	}
	return builder.substring(0, builder.length() - 1);
}
 
开发者ID:vactowb,项目名称:jbehave-core,代码行数:17,代码来源:UnderscoredCamelCaseResolver.java


示例12: shouldMapStoriesAsEmbeddables

import org.jbehave.core.Embeddable; //导入依赖的package包/类
@Test
public void shouldMapStoriesAsEmbeddables() throws Throwable {
    // Given
    StoryRunner runner = mock(StoryRunner.class);
    OutputStream out = new ByteArrayOutputStream();
    EmbedderMonitor monitor = new PrintStreamEmbedderMonitor(new PrintStream(out));
    String myEmbeddableName = MyStoryMaps.class.getName();
    List<String> classNames = asList(myEmbeddableName);
    Embeddable myEmbeddable = new MyStoryMaps();
    List<Embeddable> embeddables = asList(myEmbeddable);
    EmbedderClassLoader classLoader = mock(EmbedderClassLoader.class);
    when(classLoader.newInstance(Embeddable.class, myEmbeddableName)).thenReturn(myEmbeddable);

    // When
    Configuration configuration = new MostUsefulConfiguration();
    Embedder embedder = embedderWith(runner, new EmbedderControls(), monitor);
    embedder.useClassLoader(classLoader);
    embedder.useConfiguration(configuration);
    embedder.runAsEmbeddables(classNames);

    // Then
    for (Embeddable embeddable : embeddables) {
        assertThat(out.toString(), containsString("Running embeddable " + embeddable.getClass().getName()));
    }
    assertThat(MyStoryMaps.run, is(true));
}
 
开发者ID:vactowb,项目名称:jbehave-core,代码行数:27,代码来源:EmbedderBehaviour.java


示例13: shouldThrowExceptionUponFailingStoriesAsEmbeddablesIfIgnoreFailureInStoriesFlagIsNotSet

import org.jbehave.core.Embeddable; //导入依赖的package包/类
@Test(expected = RunningEmbeddablesFailed.class)
public void shouldThrowExceptionUponFailingStoriesAsEmbeddablesIfIgnoreFailureInStoriesFlagIsNotSet()
        throws Throwable {
    // Given
    StoryRunner runner = mock(StoryRunner.class);
    EmbedderControls embedderControls = new EmbedderControls();
    OutputStream out = new ByteArrayOutputStream();
    EmbedderMonitor monitor = new PrintStreamEmbedderMonitor(new PrintStream(out));
    String myEmbeddableName = MyEmbeddable.class.getName();
    String myOtherEmbeddableName = MyOtherEmbeddable.class.getName();
    List<String> classNames = asList(myEmbeddableName, myOtherEmbeddableName);
    Embeddable myEmbeddable = new MyFailingEmbeddable();
    Embeddable myOtherEmbeddable = new MyOtherEmbeddable();
    EmbedderClassLoader classLoader = mock(EmbedderClassLoader.class);
    when(classLoader.newInstance(Embeddable.class, myEmbeddableName)).thenReturn(myEmbeddable);
    when(classLoader.newInstance(Embeddable.class, myOtherEmbeddableName)).thenReturn(myOtherEmbeddable);

    // When
    Embedder embedder = embedderWith(runner, embedderControls, monitor);
    embedder.useClassLoader(classLoader);
    embedder.runAsEmbeddables(classNames);

    // Then fail as expected
}
 
开发者ID:vactowb,项目名称:jbehave-core,代码行数:25,代码来源:EmbedderBehaviour.java


示例14: shouldThrowExceptionUponFailingStoriesAsEmbeddablesInBatchIfIgnoreFailureInStoriesFlagIsNotSet

import org.jbehave.core.Embeddable; //导入依赖的package包/类
@Test(expected = RunningEmbeddablesFailed.class)
public void shouldThrowExceptionUponFailingStoriesAsEmbeddablesInBatchIfIgnoreFailureInStoriesFlagIsNotSet()
        throws Throwable {
    // Given
    StoryRunner runner = mock(StoryRunner.class);
    EmbedderControls embedderControls = new EmbedderControls().doBatch(true);
    OutputStream out = new ByteArrayOutputStream();
    EmbedderMonitor monitor = new PrintStreamEmbedderMonitor(new PrintStream(out));
    String myStoryName = MyStory.class.getName();
    String myOtherStoryName = MyOtherEmbeddable.class.getName();
    List<String> classNames = asList(myStoryName, myOtherStoryName);
    Embeddable myStory = new MyFailingEmbeddable();
    Embeddable myOtherStory = new MyOtherEmbeddable();
    EmbedderClassLoader classLoader = mock(EmbedderClassLoader.class);
    when(classLoader.newInstance(Embeddable.class, myStoryName)).thenReturn(myStory);
    when(classLoader.newInstance(Embeddable.class, myOtherStoryName)).thenReturn(myOtherStory);

    // When
    Embedder embedder = embedderWith(runner, embedderControls, monitor);
    embedder.useClassLoader(classLoader);
    embedder.runAsEmbeddables(classNames);

    // Then fail as expected

}
 
开发者ID:vactowb,项目名称:jbehave-core,代码行数:26,代码来源:EmbedderBehaviour.java


示例15: configuration

import org.jbehave.core.Embeddable; //导入依赖的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


示例16: resolveName

import org.jbehave.core.Embeddable; //导入依赖的package包/类
@Override
protected String resolveName(Class<? extends Embeddable> embeddableClass) {
    final String name = super.resolveName(embeddableClass);
    s = name;
    final URL storiesFolder = Thread.currentThread()
            .getContextClassLoader().getResource("stories");
    try {
        final Path start = Paths.get(storiesFolder.toURI());
        final Path path = Files.walkFileTree(start, new
                SimpleFileVisitor<Path>() {
            @Override
            public FileVisitResult visitFile(Path file,
                                             BasicFileAttributes attrs)
                    throws IOException {
                if (file.toFile().getName().contentEquals(name + "" +
                        ".story")) {
                    s = start.relativize(file).toString().replaceFirst
                            ("\\.story", "");
                    return FileVisitResult.TERMINATE;
                }
                return super.visitFile(file, attrs);
            }
        });
    } catch (IOException | URISyntaxException e) {
        e.printStackTrace();
    }
    return s;
}
 
开发者ID:tapack,项目名称:satisfy,代码行数:29,代码来源:SatisfyStoryPathResolver.java


示例17: resolveName

import org.jbehave.core.Embeddable; //导入依赖的package包/类
@Override
protected String resolveName(Class<? extends Embeddable> embeddableClass) {
	StoryFile ann;
	if ((ann = embeddableClass.getAnnotation(StoryFile.class)) != null) {
		return ann.value();
	}
	return super.resolveName(embeddableClass);
}
 
开发者ID:andreiserea,项目名称:arquillian-jbehave,代码行数:9,代码来源:AnnotationStoryPathResolver.java


示例18: configuration

import org.jbehave.core.Embeddable; //导入依赖的package包/类
@Override
public Configuration configuration() {
    Class<? extends Embeddable> embeddableClass = this.getClass();
    return new MostUsefulConfiguration().useStoryLoader(new LoadFromClasspath(embeddableClass))
            .useStoryReporterBuilder(
                    new StoryReporterBuilder()
                            .withCodeLocation(CodeLocations.codeLocationFromClass(embeddableClass))
                            .withDefaultFormats().withFormats(CONSOLE, HTML));
}
 
开发者ID:vactowb,项目名称:jbehave-core,代码行数:10,代码来源:PerformanceStories.java


示例19: configuration

import org.jbehave.core.Embeddable; //导入依赖的package包/类
@Override
public Configuration configuration() {
    Class<? extends Embeddable> embeddableClass = this.getClass();
    Properties viewResources = new Properties();
    viewResources.put("decorateNonHtml", "true");
    viewResources.put("reports", "ftl/jbehave-reports-with-totals.ftl");
    // 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()
        .useStoryLoader(new LoadFromClasspath(embeddableClass))
        .useStoryParser(new RegexStoryParser(examplesTableFactory)) 
        .useStoryReporterBuilder(new StoryReporterBuilder()
            .withCodeLocation(CodeLocations.codeLocationFromClass(embeddableClass))
            .withDefaultFormats()
            .withViewResources(viewResources)
            .withFormats(CONSOLE, TXT, HTML_TEMPLATE, XML_TEMPLATE)
            .withFailureTrace(true)
            .withFailureTraceCompression(true)                
            .withCrossReference(xref)) 
        .useParameterConverters(parameterConverters)                     
        // use '%' instead of '$' to identify parameters
        .useStepPatternParser(new RegexPrefixCapturingPatternParser(
                        "%")) 
        .useStepMonitor(xref.getStepMonitor());                               
}
 
开发者ID:vactowb,项目名称:jbehave-core,代码行数:31,代码来源:TraderStories.java


示例20: configuration

import org.jbehave.core.Embeddable; //导入依赖的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());
}
 
开发者ID:vactowb,项目名称:jbehave-core,代码行数:31,代码来源:TraderStory.java



注:本文中的org.jbehave.core.Embeddable类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java KeyCertificateParser类代码示例发布时间:2022-05-22
下一篇:
Java AggregateProgressFactory类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap