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


Java Step.getRows方法代码示例

本文整理汇总了Java中gherkin.formatter.model.Step.getRows方法的典型用法代码示例。如果您正苦于以下问题:Java Step.getRows方法的具体用法?Java Step.getRows怎么用?Java Step.getRows使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gherkin.formatter.model.Step的用法示例。


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

示例1: getStepText

import gherkin.formatter.model.Step; //导入方法依赖的package包/类
private static String getStepText(Step step, ScenarioWrapper scenario) {
    StringBuilder sb = new StringBuilder();
    sb.append(step.getKeyword());
    sb.append(step.getName());
    DocString docString = step.getDocString();
    if (docString != null) {
        sb.append("\n\"\"\"\n");
        sb.append(docString.getValue());
        sb.append("\n\"\"\"");
    }
    if (step.getRows() != null) {
        String text = scenario.getFeature().joinLines(step.getLine(), step.getLineRange().getLast() + 1);
        sb.append('\n').append(text);
    }
    return sb.toString();
}
 
开发者ID:intuit,项目名称:karate,代码行数:17,代码来源:StepWrapper.java

示例2: stepHtml

import gherkin.formatter.model.Step; //导入方法依赖的package包/类
private void stepHtml(ReportStep reportStep, Node parent) {
    Step step = reportStep.getStep();
    Result result = reportStep.getResult();
    String extraClass = "";
    if ("failed".equals(result.getStatus())) {
        extraClass = " failed";
    } else if ("skipped".equals(result.getStatus())) {
        extraClass = " skipped";
    }
    Node stepRow = div("step-row",
            div("step-cell" + extraClass, step.getKeyword() + step.getName()),
            div("time-cell" + extraClass, getDuration(result)));
    parent.appendChild(stepRow);
    if (step.getRows() != null) {
        Node table = node("table", null);
        parent.appendChild(table);
        for (DataTableRow row : step.getRows()) {
            Node tr = node("tr", null);
            table.appendChild(tr);
            for (String cell : row.getCells()) {
                tr.appendChild(node("td", null, cell));
            }
        }
    }               
    if (reportStep.getCalled() != null) { // this is a 'call'
        for (ReportStep rs : reportStep.getCalled()) {
            Node calledStepsDiv = div("scenario-steps-nested");
            parent.appendChild(calledStepsDiv); 
            stepHtml(rs, calledStepsDiv);
        }            
    } else if (step.getDocString() != null) { // only for non-call, else un-synced stack traces may creep in
        DocString docString = step.getDocString();
        parent.appendChild(node("div", "preformatted", docString.getValue()));            
    }
    appendLog(parent, reportStep.getLog());
}
 
开发者ID:intuit,项目名称:karate,代码行数:37,代码来源:KarateHtmlReporter.java

示例3: StepDTO

import gherkin.formatter.model.Step; //导入方法依赖的package包/类
public StepDTO(Step step) {
    this.comments = CommentDTO.fromGherkinComments(step.getComments());
    this.keyword = step.getKeyword();
    this.name = step.getName();
    this.line = step.getLine();
    if (step.getRows() != null) {
        this.rows = new ArrayList<DataTableRowDTO>();
        for (DataTableRow gherkinRow : step.getRows()) {
            this.rows.add(new DataTableRowDTO(gherkinRow));
        }
    }
    if (step.getDocString() != null) {
        this.docString = new DocStringDTO(step.getDocString());
    }
}
 
开发者ID:viltgroup,项目名称:minium,代码行数:16,代码来源:StepDTO.java


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