当前位置: 首页>>代码示例>>Java>>正文


Java GherkinStoryParser类代码示例

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


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

示例1: testCreateShouldCreateConfiguration

import org.jbehave.core.parsers.gherkin.GherkinStoryParser; //导入依赖的package包/类
@Test
public void testCreateShouldCreateConfiguration() {
    //GIVEN
    JBehaveTestCase testCase = new JBehaveTestCase() {
        @Override
        protected String getStoryPath() {
            return "something";
        }
    };
    GherkinStoryParser gherkinStoryParser = new GherkinStoryParser();
    StoryReporterBuilder storyReporterBuilder = new StoryReporterBuilder().withReporters(new JBehaveStoryReporter(testCase));
    FailingUponPendingStep pendingStepStrategy = new FailingUponPendingStep();
    given(storyParserFactory.createGherkinStoryParser()).willReturn(gherkinStoryParser);
    given(pendingStepStrategyFactory.createFailingUponPendingStep()).willReturn(pendingStepStrategy);
    given(storyReporterBuilderFactory.createForTestCase(testCase)).willReturn(storyReporterBuilder);
    //WHEN
    Configuration result = underTest.create(testCase);
    //THEN
    assertEquals(gherkinStoryParser, result.storyParser());
    assertEquals(pendingStepStrategy, result.pendingStepStrategy());
    assertEquals(storyReporterBuilder, result.storyReporterBuilder());
}
 
开发者ID:epam,项目名称:Gepard,代码行数:23,代码来源:ConfigurationFactoryTest.java

示例2: create

import org.jbehave.core.parsers.gherkin.GherkinStoryParser; //导入依赖的package包/类
/**
 * Creates the {@link Configuration} for the Embedder.
 * @param testCase the testCase that will be run by the Embedder.
 * @return the configuration
 */
public Configuration create(final JBehaveTestCase testCase) {
    Configuration configuration = new MostUsefulConfiguration();
    GherkinStoryParser gherkinStoryParser = storyParserFactory.createGherkinStoryParser();
    configuration.useStoryParser(gherkinStoryParser);
    StoryReporterBuilder storyReporterBuilder = storyReporterBuilderFactory.createForTestCase(testCase);
    configuration.useStoryReporterBuilder(storyReporterBuilder);
    FailingUponPendingStep pendingStepStrategy = pendingStepStrategyFactory.createFailingUponPendingStep();
    configuration.usePendingStepStrategy(pendingStepStrategy);
    return configuration;
}
 
开发者ID:epam,项目名称:Gepard,代码行数:16,代码来源:ConfigurationFactory.java

示例3: FeatureTests

import org.jbehave.core.parsers.gherkin.GherkinStoryParser; //导入依赖的package包/类
public FeatureTests() throws Exception {
	configuration = new MostUsefulConfiguration()
			.useStoryParser(new GherkinStoryParser())
			.useStoryLoader(new LoadFromRelativeFile(new File(features).toURI().toURL()))
			.useStoryReporterBuilder(new StoryReporterBuilder()
					.withDefaultFormats().withFormats(Format.CONSOLE));
}
 
开发者ID:grantjforrester,项目名称:bdd-rest,代码行数:8,代码来源:FeatureTests.java

示例4: JBehaveRestStepsTest

import org.jbehave.core.parsers.gherkin.GherkinStoryParser; //导入依赖的package包/类
public JBehaveRestStepsTest() throws Exception {
	configuration = new MostUsefulConfiguration()
			.useStoryParser(new GherkinStoryParser())
			.useStoryLoader(new LoadFromRelativeFile(new File(features).toURI().toURL()))
			.useStoryReporterBuilder(new StoryReporterBuilder()
					.withDefaultFormats().withFormats(Format.CONSOLE));
}
 
开发者ID:grantjforrester,项目名称:bdd-rest,代码行数:8,代码来源:JBehaveRestStepsTest.java

示例5: configuration

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

示例6: createGherkinStoryParser

import org.jbehave.core.parsers.gherkin.GherkinStoryParser; //导入依赖的package包/类
/**
 * Creates a new instance of {@link GherkinStoryParser}.
 * @return a new instance of {@link GherkinStoryParser}
 */
public GherkinStoryParser createGherkinStoryParser() {
    return new GherkinStoryParser();
}
 
开发者ID:epam,项目名称:Gepard,代码行数:8,代码来源:StoryParserFactory.java


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