本文整理汇总了Java中gherkin.formatter.model.ScenarioOutline类的典型用法代码示例。如果您正苦于以下问题:Java ScenarioOutline类的具体用法?Java ScenarioOutline怎么用?Java ScenarioOutline使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ScenarioOutline类属于gherkin.formatter.model包,在下文中一共展示了ScenarioOutline类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: scenarioOutline
import gherkin.formatter.model.ScenarioOutline; //导入依赖的package包/类
@Override
public void scenarioOutline( ScenarioOutline xTest )
{
currentSection = Section.OUTLINE;
String tagNames = null;
if ( xTest.getTags() != null && !xTest.getTags().isEmpty() )
{
tagNames = "";
for ( Tag tagName : xTest.getTags() )
tagNames = tagNames + tagName.getName() + ",";
tagNames = tagNames.substring( 0, tagNames.length() - 1 );
}
this.currentScenario = new KeyWordTest( xTest.getName(), true, null, xTest.getName(), false, null, null, 0, xTest.getDescription(), tagNames, null, null, configProperties, 0, null, null, null, null, 0, 0 );
for ( KeyWordStep xStep : backgroundSteps )
this.currentScenario.addStep( xStep );
scenarioList.add( currentScenario );
}
示例2: findFeatureByScenarioName
import gherkin.formatter.model.ScenarioOutline; //导入依赖的package包/类
/**
* Find feature and story for given scenario
*
* @param scenarioName
* @return {@link String[]} of ["<FEATURE_NAME>", "<STORY_NAME>"]s
* @throws IllegalAccessException
*/
private String[] findFeatureByScenarioName(String scenarioName) throws IllegalAccessException {
List<Description> testClasses = findTestClassesLevel(parentDescription.getChildren());
for (Description testClass : testClasses) {
List<Description> features = findFeaturesLevel(testClass.getChildren());
//Feature cycle
for (Description feature : features) {
//Story cycle
for (Description story : feature.getChildren()) {
Object scenarioType = getTestEntityType(story);
//Scenario
if (scenarioType instanceof Scenario
&& story.getDisplayName().equals(scenarioName)) {
return new String[]{feature.getDisplayName(), scenarioName};
//Scenario Outline
} else if (scenarioType instanceof ScenarioOutline) {
List<Description> examples = story.getChildren().get(0).getChildren();
// we need to go deeper :)
for (Description example : examples) {
if (example.getDisplayName().equals(scenarioName)) {
return new String[]{feature.getDisplayName(), story.getDisplayName()};
}
}
}
}
}
}
return new String[]{"Feature: Undefined Feature", scenarioName};
}
示例3: scenarioOutline
import gherkin.formatter.model.ScenarioOutline; //导入依赖的package包/类
@Override
public void scenarioOutline(final ScenarioOutline so) {
//Nothing to do with Allure
}
示例4: scenarioOutline
import gherkin.formatter.model.ScenarioOutline; //导入依赖的package包/类
@Override
public void scenarioOutline(ScenarioOutline arg0) {
currentScenario = arg0.toMap();
addNew(currentFeature, "scenarios", currentScenario);
}
示例5: setScenarioOutline
import gherkin.formatter.model.ScenarioOutline; //导入依赖的package包/类
public void setScenarioOutline(ScenarioOutline scenarioOutline) {
this.scenarioOutline = scenarioOutline;
}
示例6: scenarioOutline
import gherkin.formatter.model.ScenarioOutline; //导入依赖的package包/类
@Override
public void scenarioOutline(ScenarioOutline arg0) {
wrapped.scenarioOutline(arg0);
}
示例7: scenarioOutline
import gherkin.formatter.model.ScenarioOutline; //导入依赖的package包/类
@Override
public void scenarioOutline(ScenarioOutline arg0) {
getWrapped().scenarioOutline(arg0);
}