gherkin.ast.Feature.getKeyword()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(131)

本文整理了Java中gherkin.ast.Feature.getKeyword()方法的一些代码示例,展示了Feature.getKeyword()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Feature.getKeyword()方法的具体详情如下:
包路径:gherkin.ast.Feature
类名称:Feature
方法名:getKeyword

Feature.getKeyword介绍

暂无

代码示例

代码示例来源:origin: cucumber/cucumber-jvm

private Map<String, Object> createFeature(TestCase testCase) {
  Map<String, Object> featureMap = new HashMap<String, Object>();
  Feature feature = testSources.getFeature(testCase.getUri());
  if (feature != null) {
    featureMap.put("keyword", feature.getKeyword());
    featureMap.put("name", feature.getName());
    featureMap.put("description", feature.getDescription() != null ? feature.getDescription() : "");
    if (!feature.getTags().isEmpty()) {
      featureMap.put("tags", createTagList(feature.getTags()));
    }
  }
  return featureMap;
}

代码示例来源:origin: cucumber/cucumber-jvm

@Override
public String getName() {
  Feature feature = cucumberFeature.getGherkinFeature().getFeature();
  return feature.getKeyword() + ": " + feature.getName();
}

代码示例来源:origin: cucumber/cucumber-jvm

private Map<String, Object> createFeatureMap(TestCase testCase) {
  Map<String, Object> featureMap = new HashMap<String, Object>();
  featureMap.put("uri", testCase.getUri());
  featureMap.put("elements", new ArrayList<Map<String, Object>>());
  Feature feature = testSources.getFeature(testCase.getUri());
  if (feature != null) {
    featureMap.put("keyword", feature.getKeyword());
    featureMap.put("name", feature.getName());
    featureMap.put("description", feature.getDescription() != null ? feature.getDescription() : "");
    featureMap.put("line", feature.getLocation().getLine());
    featureMap.put("id", TestSourcesModel.convertToId(feature.getName()));
    featureMap.put("tags", feature.getTags());
  }
  return featureMap;
}

代码示例来源:origin: cucumber/cucumber-jvm

private void printFeature(String path) {
  Feature feature = testSources.getFeature(path);
  printTags(feature.getTags());
  out.println(feature.getKeyword() + ": " + feature.getName());
  printDescription(feature.getDescription());
}

代码示例来源:origin: net.serenity-bdd/serenity-cucumber

private Feature featureWithDefaultName(Feature feature, String defaultName) {
  return new Feature(feature.getTags(),
      feature.getLocation(),
      feature.getLanguage(),
      feature.getKeyword(),
      defaultName,
      feature.getDescription(),
      feature.getChildren());
}

代码示例来源:origin: serenity-bdd/serenity-cucumber

private Feature featureWithDefaultName(Feature feature, String defaultName) {
  return new Feature(feature.getTags(),
      feature.getLocation(),
      feature.getLanguage(),
      feature.getKeyword(),
      defaultName,
      feature.getDescription(),
      feature.getChildren());
}

代码示例来源:origin: trivago/cucable-plugin

String featureName = feature.getKeyword() + ": " + feature.getName();
String featureLanguage = feature.getLanguage();
String featureDescription = feature.getDescription();

相关文章