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


Java Match类代码示例

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


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

示例1: fireFixtureStep

import gherkin.formatter.model.Match; //导入依赖的package包/类
protected void fireFixtureStep(final Match match, final Result result, final boolean isBefore) {
    final String uuid = Utils.md5(match.getLocation());
    final StepResult stepResult = new StepResult()
            .withName(match.getLocation())
            .withStatus(Status.fromValue(result.getStatus()))
            .withStart(System.currentTimeMillis() - result.getDuration())
            .withStop(System.currentTimeMillis());
    if (FAILED.equals(result.getStatus())) {
        final StatusDetails statusDetails = ResultsUtils.getStatusDetails(result.getError()).get();
        stepResult.withStatusDetails(statusDetails);
        if (isBefore) {
            final TagParser tagParser = new TagParser(feature, scenario);
            statusDetails
                    .withMessage("Before is failed: " + result.getError().getLocalizedMessage())
                    .withFlaky(tagParser.isFlaky())
                    .withMuted(tagParser.isMuted())
                    .withKnown(tagParser.isKnown());
            lifecycle.updateTestCase(scenario.getId(), scenarioResult ->
                    scenarioResult.withStatus(Status.SKIPPED)
                            .withStatusDetails(statusDetails));
        }
    }
    lifecycle.startStep(scenario.getId(), uuid, stepResult);
    lifecycle.stopStep(uuid);
}
 
开发者ID:allure-framework,项目名称:allure-java,代码行数:26,代码来源:StepUtils.java

示例2: afterStep

import gherkin.formatter.model.Match; //导入依赖的package包/类
private static StepResult afterStep(Reporter reporter, Step step, Match match, Result result, String feature, KarateBackend backend) {
    boolean isKarateReporter = reporter instanceof KarateReporter;
    CallContext callContext = backend.getCallContext();
    if (isKarateReporter) { // report all the things !           
        KarateReporter karateReporter = (KarateReporter) reporter;
        karateReporter.karateStep(step, match, result, callContext);
    } else if (!backend.isCalled() && reporter != null) { // can be null for server
        reporter.match(match);
        reporter.result(result);
    }
    StepResult stepResult = new StepResult(step, result);
    backend.afterStep(feature, stepResult);
    return stepResult;
}
 
开发者ID:intuit,项目名称:karate,代码行数:15,代码来源:CucumberUtils.java

示例3: karateStepProceed

import gherkin.formatter.model.Match; //导入依赖的package包/类
@Override
public void karateStepProceed(Step step, Match match, Result result, CallContext callContext) {
    String log = logAppender.collect();
    // step should be first        
    int prevDepth = prevStep == null ? 0 : prevStep.getCallContext().callDepth;
    int currDepth = callContext.callDepth;
    prevStep = new ReportStep(step, match, result, log, callContext);
    if (currDepth > prevDepth) { // called            
        List<ReportStep> temp = new ArrayList();
        temp.add(prevStep);
        callStack.push(temp);
    } else {
        if (currDepth < prevDepth) { // callBegin return                
            for (ReportStep s : callStack.pop()) {
                prevStep.addCalled(s);
            }
        }
        if (callStack.isEmpty()) {
            steps.add(prevStep);
        } else {
            callStack.peek().add(prevStep);
        }
    }
    // just pass on to downstream
    formatter.step(step);
    reporter.match(match);
    reporter.result(result);
}
 
开发者ID:intuit,项目名称:karate,代码行数:29,代码来源:KarateHtmlReporter.java

示例4: karateStepProceed

import gherkin.formatter.model.Match; //导入依赖的package包/类
@Override
public void karateStepProceed(Step step, Match match, Result result, CallContext callContext) {
    junit.step(step);
    json.step(step);
    // step has to happen first !
    match(match);
    result(result);        
}
 
开发者ID:intuit,项目名称:karate,代码行数:9,代码来源:KarateJunitAndJsonReporter.java

示例5: ReportStep

import gherkin.formatter.model.Match; //导入依赖的package包/类
public ReportStep(Step step, Match match, Result result, String log, CallContext callContext) {
    this.step = step;
    this.match = match;
    this.result = result;
    this.log = log;
    this.callContext = callContext;
}
 
开发者ID:intuit,项目名称:karate,代码行数:8,代码来源:ReportStep.java

示例6: hookFinished

import gherkin.formatter.model.Match; //导入依赖的package包/类
@Override
protected void hookFinished(Match match, Result result, Boolean isBefore) {
	reportResult(result, (isBefore ? "Before" : "After") + " hook: " + match.getLocation());
	if (result.getStatus().equals("failed")) {
		hookStatus = Statuses.FAILED;
	}
}
 
开发者ID:reportportal,项目名称:agent-java-cucumber,代码行数:8,代码来源:StepReporter.java

示例7: after

import gherkin.formatter.model.Match; //导入依赖的package包/类
@Override
public void after(Match arg0, Result arg1) {
	Reporter wrappedReporter = getWrappedReporter();
	if(wrappedReporter != null) {
		wrappedReporter.after(arg0, arg1);
	}
}
 
开发者ID:gfk-ba,项目名称:senbot,代码行数:8,代码来源:ParameterizedCucumber.java

示例8: before

import gherkin.formatter.model.Match; //导入依赖的package包/类
@Override
public void before(Match arg0, Result arg1) {
	Reporter wrappedReporter = getWrappedReporter();
	if(wrappedReporter != null) {
		wrappedReporter.before(arg0, arg1);
	}
	
}
 
开发者ID:gfk-ba,项目名称:senbot,代码行数:9,代码来源:ParameterizedCucumber.java

示例9: match

import gherkin.formatter.model.Match; //导入依赖的package包/类
@Override
public void match(Match arg0) {
	Reporter wrappedReporter = getWrappedReporter();
	if(wrappedReporter != null) {
		wrappedReporter.match(arg0);
	}
	
}
 
开发者ID:gfk-ba,项目名称:senbot,代码行数:9,代码来源:ParameterizedCucumber.java

示例10: after

import gherkin.formatter.model.Match; //导入依赖的package包/类
@Override
public void after(final Match match, final Result result) {
	Map<String, Object> model = new HashMap<String, Object>();
	model.put("match", match);
	model.put("matchAsMap", match.toMap());
	model.put("result", result);
	model.put("resultAsMap", result.toMap());
	logIfHasOutcome(makeString("after", model));
}
 
开发者ID:jhberges,项目名称:cucumber-format-slf4j,代码行数:10,代码来源:Slf4jFormatter.java

示例11: before

import gherkin.formatter.model.Match; //导入依赖的package包/类
@Override
public void before(final Match match, final Result result) {
	Map<String, Object> model = new HashMap<String, Object>();
	model.put("match", match);
	model.put("matchAsMatch", match.toMap());
	model.put("result", result);
	model.put("resultAsMatch", result.toMap());
	logIfHasOutcome(makeString("before", model));
}
 
开发者ID:jhberges,项目名称:cucumber-format-slf4j,代码行数:10,代码来源:Slf4jFormatter.java

示例12: before

import gherkin.formatter.model.Match; //导入依赖的package包/类
@Override
public void before(final Match match, final Result result) {
    new StepUtils(currentFeature, currentScenario).fireFixtureStep(match, result, true);
}
 
开发者ID:allure-framework,项目名称:allure-java,代码行数:5,代码来源:AllureCucumberJvm.java

示例13: after

import gherkin.formatter.model.Match; //导入依赖的package包/类
@Override
public void after(final Match match, final Result result) {
    new StepUtils(currentFeature, currentScenario).fireFixtureStep(match, result, false);
}
 
开发者ID:allure-framework,项目名称:allure-java,代码行数:5,代码来源:AllureCucumberJvm.java

示例14: before

import gherkin.formatter.model.Match; //导入依赖的package包/类
@Override
public void before(Match match, Result result) {
    junit.before(match, result);
    json.before(match, result);
}
 
开发者ID:intuit,项目名称:karate,代码行数:6,代码来源:KarateJunitAndJsonReporter.java

示例15: after

import gherkin.formatter.model.Match; //导入依赖的package包/类
@Override
public void after(Match match, Result result) {
    junit.after(match, result);
    json.after(match, result);
}
 
开发者ID:intuit,项目名称:karate,代码行数:6,代码来源:KarateJunitAndJsonReporter.java


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