use of org.jbehave.core.annotations.When in project jbehave-core by jbehave.
the class OrganizationSteps method setCurrentOrganization.
@When("current organization is $orgName")
public void setCurrentOrganization(String orgName) {
Organization org = organizationDao.findByName(orgName);
organizationManager.setOrganization(org);
}
use of org.jbehave.core.annotations.When in project jbehave-core by jbehave.
the class RESTSteps method storyIsUploaded.
@When("story $name is uploaded appending '$text'")
public void storyIsUploaded(String name, String text) {
ResourceUploader uploader = resourceupLoader();
Resource resource = index.get(name);
resource.setContent(resource.getContent() + " " + text);
uploader.uploadResource(resource);
}
use of org.jbehave.core.annotations.When in project jbehave-core by jbehave.
the class RESTSteps method whenStoriesAreExported.
@When("stories in $sourcePath are exported to $rootURI")
public void whenStoriesAreExported(String sourcePath, String rootURI) {
ResourceExporter exporter = new ExportFromFilesystem(resourceIndexer(), resourceupLoader(), sourcePath, ".story", "", "**/*.story");
exporter.exportResources(rootURI);
}
use of org.jbehave.core.annotations.When in project jbehave-core by jbehave.
the class RESTSteps method indexIsRetrieved.
@When("index is retrieved from $uri")
public void indexIsRetrieved(String uri) {
ResourceIndexer indexer = resourceIndexer();
index = indexer.indexResources(uri);
}
use of org.jbehave.core.annotations.When in project jbehave-core by jbehave.
the class PerformanceSteps method aScenarioWithVeryLongTables.
@When("a scenario is generated to $path with a tabular argument of $tabularLines lines and an examples table of $examplesLines lines")
public void aScenarioWithVeryLongTables(String path, int tabularLines, int examplesLines) {
StringBuilder builder = new StringBuilder();
builder.append("Scenario: A scenario with long tables\n");
builder.append("Given a step with a long tabular argument:\n").append(aTableWith(tabularLines));
builder.append("Examples:\n").append(aTableWith(examplesLines));
try {
FileWriter writer = new FileWriter(new File(path));
writer.write(builder.toString());
writer.close();
} catch (IOException e) {
e.printStackTrace();
}
}
Aggregations