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


Java StoryFinder类代码示例

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


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

示例1: runTests

import org.jbehave.core.io.StoryFinder; //导入依赖的package包/类
public void runTests(final long timeOut,StepDefinition... stepDefinitions){
    JBehaveSettings jBehaveSettings = new JBehaveSettings();
    jBehaveSettings.setEmbedder(timeOut, stepDefinitions);
    List<String>s=new StoryFinder ( ).
            findPaths ( CodeLocations.codeLocationFromClass(this.getClass()),
                    "**/*.story", null );
    jBehaveSettings.getEmbedder().runStoriesAsPaths(s);

}
 
开发者ID:kishor32,项目名称:kabo,代码行数:10,代码来源:TestRunner.java

示例2: storyPaths

import org.jbehave.core.io.StoryFinder; //导入依赖的package包/类
@Override
protected List<String> storyPaths() {
   return new StoryFinder().
		   findPaths(CodeLocations.codeLocationFromClass(
				   this.getClass()), 
				   Arrays.asList("**/*.story"), 
				   Arrays.asList(""));
   
}
 
开发者ID:davidholiday,项目名称:java-compression-experiment,代码行数:10,代码来源:JBehaveRunner_Test.java

示例3: storyPaths

import org.jbehave.core.io.StoryFinder; //导入依赖的package包/类
@Override
    protected List<String> storyPaths() {
        return new StoryFinder().findPaths(
                "src/test/resources",
                Collections.singletonList("**/*.story"), // 全部的story
//                Collections.singletonList("**/漢字/*.story"), // 漢字底下的story
                null
        );

    }
 
开发者ID:sih4sing5hong5,项目名称:Android_with_JBehave,代码行数:11,代码来源:走全部試驗.java

示例4: getStoryPaths

import org.jbehave.core.io.StoryFinder; //导入依赖的package包/类
/**
 * Recursively searches for files in the given <tt>storiesDirectory</tt>,
 * using the given <tt>storyPathInclusion</tt>.
 * 
 * @param storiesDirectory
 *          the directory to recursively search. Cannot be <tt>null</tt>.
 * @param storyPathInclusion
 *          the inclusion regex expression. Cannot be <tt>null</tt>.
 * 
 * @return the story paths
 */
protected List<String> getStoryPaths(final String storiesDirectory, final String storyPathInclusion)
{
  Objects.requireNonNull(storiesDirectory, "storiesDirectory cannot be null.");
  Objects.requireNonNull(storyPathInclusion, "storyPathInclusion cannot be null.");
  System.out.println("Looking for stories in: " + storiesDirectory);
  LOG.debug("Looking for stories in: {}", storiesDirectory);
  LOG.debug("Using story path inclusion: {}", storyPathInclusion);

  final List<String> storyPaths = new StoryFinder().findPaths(storiesDirectory, storyPathInclusion, "**/partial_*,**/givenstory_*");

  LOG.info("Found {} stories: {}", storyPaths.size(), storyPaths);

  return storyPaths;
}
 
开发者ID:partnet,项目名称:seauto,代码行数:26,代码来源:DefaultWeldAnnotatedStoryRunner.java

示例5: storyPaths

import org.jbehave.core.io.StoryFinder; //导入依赖的package包/类
@Override
protected List<String> storyPaths() {
    String story = System.getProperty("story");
    if (story != null && !story.isEmpty()) {
        return new StoryFinder().findPaths(codeLocationFromClass(this.getClass()), "**/" + story + ".story", "**/excluded*.story");
    } else {
        return new StoryFinder().findPaths(codeLocationFromClass(this.getClass()), "**/*.story", "**/excluded*.story");
    }

}
 
开发者ID:apache,项目名称:rave,代码行数:11,代码来源:AdminStories.java

示例6: storyPaths

import org.jbehave.core.io.StoryFinder; //导入依赖的package包/类
@Override
protected List<String> storyPaths() {
	return new StoryFinder().findPaths(
			CodeLocations.codeLocationFromClass(this.getClass()),
			Arrays.asList("**/*.story"), Arrays.asList(""));

}
 
开发者ID:davidholiday,项目名称:ALTk,代码行数:8,代码来源:JBehaveRunner_Test.java

示例7: run

import org.jbehave.core.io.StoryFinder; //导入依赖的package包/类
@Test 
	@Override
	public void run() throws Throwable {

		List<String> paths = new StoryFinder().findPaths(CodeLocations
				.codeLocationFromClass(this.getClass()).getFile(),
				asList("**/*story.en.txt"), null);
		injectedEmbedder().runStoriesAsPaths(paths);
//		injectedEmbedder().configuration().;
	}
 
开发者ID:iunetworks,项目名称:training1-sudoku,代码行数:11,代码来源:ITestEnglishStories.java

示例8: run

import org.jbehave.core.io.StoryFinder; //导入依赖的package包/类
@Test 
	@Override
	public void run() throws Throwable {

		List<String> paths = new StoryFinder().findPaths(CodeLocations
				.codeLocationFromClass(this.getClass()).getFile(),
				asList("**/*story.hy.txt"), null);
		injectedEmbedder().runStoriesAsPaths(paths);
//		injectedEmbedder().configuration().;
	}
 
开发者ID:iunetworks,项目名称:training1-sudoku,代码行数:11,代码来源:ITestArmenianStories.java

示例9: storyPaths

import org.jbehave.core.io.StoryFinder; //导入依赖的package包/类
@Override
protected List<String> storyPaths() {
	return new StoryFinder().findPaths(
			codeLocationFromClass(this.getClass()), "**/*.story",
			"**/excluded*.story");

}
 
开发者ID:pau-minoves,项目名称:jseats,代码行数:8,代码来源:Stories.java

示例10: mapStories

import org.jbehave.core.io.StoryFinder; //导入依赖的package包/类
@Test
public void mapStories() {
    Embedder embedder = new Embedder();
    embedder.useMetaFilters(asList("+author *", "+theme *", "-skip"));
    List<String> storyPaths = new StoryFinder().findPaths(codeLocationFromClass(this.getClass()), "**/*.story", "");
    embedder.mapStoriesAsPaths(storyPaths);
}
 
开发者ID:vactowb,项目名称:jbehave-core,代码行数:8,代码来源:TraderStoryRunner.java

示例11: runClasspathLoadedStoriesAsJUnit

import org.jbehave.core.io.StoryFinder; //导入依赖的package包/类
@Test
public void runClasspathLoadedStoriesAsJUnit() {
    // TraderEmbedder defines the configuration and steps factory
    Embedder embedder = new TraderEmbedder();
    embedder.embedderControls().doIgnoreFailureInStories(true);
    List<String> storyPaths = new StoryFinder().findPaths(codeLocationFromClass(this.getClass()), "**/*.story", "");
    embedder.runStoriesAsPaths(storyPaths);
}
 
开发者ID:vactowb,项目名称:jbehave-core,代码行数:9,代码来源:TraderStoryRunner.java

示例12: runURLLoadedStoriesAsJUnit

import org.jbehave.core.io.StoryFinder; //导入依赖的package包/类
@Test
public void runURLLoadedStoriesAsJUnit() {
    // Embedder defines the configuration and candidate steps
    Embedder embedder = new URLTraderEmbedder();
    String codeLocation = codeLocationFromClass(this.getClass()).getFile();
    List<String> storyPaths = new StoryFinder().findPaths(codeLocation, asList(
            "**/trader_is_alerted_of_status.story", "**/traders_can_be_subset.story"), null, "file:"
            + codeLocation);
    embedder.runStoriesAsPaths(storyPaths);
}
 
开发者ID:vactowb,项目名称:jbehave-core,代码行数:11,代码来源:TraderStoryRunner.java

示例13: storyPaths

import org.jbehave.core.io.StoryFinder; //导入依赖的package包/类
@Override
protected List<String> storyPaths() {
    // Specify story paths as URLs
    String codeLocation = codeLocationFromPath("../trader/src/main/java").getFile();
    return new StoryFinder().findPaths(codeLocation, asList("**/trader_is_alerted_of_status.story",
            "**/traders_can_be_subset.story"), asList(""), "file:" + codeLocation);
}
 
开发者ID:vactowb,项目名称:jbehave-core,代码行数:8,代码来源:URLTraderStories.java

示例14: shouldAllowSpecificationOfStoryFinderClass

import org.jbehave.core.io.StoryFinder; //导入依赖的package包/类
@Test
public void shouldAllowSpecificationOfStoryFinderClass() {
    // Given
    AbstractEmbedderTask task = new AbstractEmbedderTask() {
    };
    // When
    task.setStoryFinderClass(MyStoryFinder.class.getName());
    StoryFinder storyFinder = task.newStoryFinder();
    // Then
    assertThat(storyFinder.getClass().getName(), equalTo(MyStoryFinder.class.getName()));
}
 
开发者ID:vactowb,项目名称:jbehave-core,代码行数:12,代码来源:EmbedderTaskBehaviour.java

示例15: shouldMapStoriesAsEmbeddables

import org.jbehave.core.io.StoryFinder; //导入依赖的package包/类
@Test
public void shouldMapStoriesAsEmbeddables() {
    // Given
    final EmbedderClassLoader classLoader = new EmbedderClassLoader(this.getClass().getClassLoader());
    MapStoriesAsEmbeddables task = new MapStoriesAsEmbeddables() {
        @Override
        protected Embedder newEmbedder() {
            return embedder;
        }

        @Override
        protected EmbedderClassLoader classLoader() {
            return classLoader;
        }

    };
    String searchInDirectory = "src/test/java/";
    task.setSourceDirectory(searchInDirectory);
    task.setOutputDirectory("target/test-classes");
    List<String> includes = asList("**/*StoryMaps.java");
    task.setIncludes(StringUtils.join(includes, "'"));
    List<String> excludes = asList();
    task.setExcludes(StringUtils.join(excludes, "'"));
    List<String> classNames = new StoryFinder().findClassNames(searchInDirectory, includes, excludes);

    // When
    task.execute();

    // Then
    verify(embedder).runAsEmbeddables(classNames);
}
 
开发者ID:vactowb,项目名称:jbehave-core,代码行数:32,代码来源:EmbedderTaskBehaviour.java


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