本文整理汇总了Java中org.jbehave.core.io.CodeLocations.codeLocationFromPath方法的典型用法代码示例。如果您正苦于以下问题:Java CodeLocations.codeLocationFromPath方法的具体用法?Java CodeLocations.codeLocationFromPath怎么用?Java CodeLocations.codeLocationFromPath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jbehave.core.io.CodeLocations
的用法示例。
在下文中一共展示了CodeLocations.codeLocationFromPath方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: shouldBuildWithCustomCodeLocation
import org.jbehave.core.io.CodeLocations; //导入方法依赖的package包/类
@Test
public void shouldBuildWithCustomCodeLocation() throws IOException {
// Given
StoryReporterBuilder builder = new StoryReporterBuilder();
String storyPath = storyPath(MyStory.class);
URL codeLocation = CodeLocations.codeLocationFromPath("target/custom/location");
// When
builder.withFormats(TXT).withCodeLocation(codeLocation).build(storyPath);
// Then
assertThat(builder.codeLocation(), equalTo(codeLocation));
FilePrintStreamFactory factory = builder.filePrintStreamFactory(storyPath);
assertThat(factory.outputDirectory().getPath().replace('\\', '/'), endsWith("custom/"
+ factory.configuration().getRelativeDirectory()));
}
示例2: GroovyResourceFinder
import org.jbehave.core.io.CodeLocations; //导入方法依赖的package包/类
public GroovyResourceFinder(){
this(CodeLocations.codeLocationFromPath("src/main/groovy"), "**/*.groovy", "");
}
示例3: TestGroovyResourceFinder
import org.jbehave.core.io.CodeLocations; //导入方法依赖的package包/类
public TestGroovyResourceFinder(){
super(CodeLocations.codeLocationFromPath("src/test/java"), "**/configuration/groovy/*.groovy", "");
}
示例4: createForTestCase
import org.jbehave.core.io.CodeLocations; //导入方法依赖的package包/类
/**
* Creates a new {@link StoryReporterBuilder} using {@link com.epam.gepard.gherkin.jbehave.JBehaveStoryReporter}.
* @param testCase the test case to use for reporting
* @return the new instance
*/
public StoryReporterBuilder createForTestCase(final JBehaveTestCase testCase) {
URL codeLocation = CodeLocations.codeLocationFromPath("");
return new StoryReporterBuilder().withCodeLocation(codeLocation).withRelativeDirectory("").withReporters(new JBehaveStoryReporter(testCase));
}