Example usage for com.amazonaws.services.devicefarm.model ExecutionResult fromValue

List of usage examples for com.amazonaws.services.devicefarm.model ExecutionResult fromValue

Introduction

In this page you can find the example usage for com.amazonaws.services.devicefarm.model ExecutionResult fromValue.

Prototype

public static ExecutionResult fromValue(String value) 

Source Link

Document

Use this in place of valueOf.

Usage

From source file:org.jenkinsci.plugins.awsdevicefarm.AWSDeviceFarmTestResult.java

License:Open Source License

public AWSDeviceFarmTestResult(AbstractBuild<?, ?> build, Run run) {
    this.build = build;

    if (run != null) {
        this.id = AWSDeviceFarmUtils.getRunIdFromArn(run.getArn());
        this.status = run.getStatus();
        this.result = ExecutionResult.fromValue(run.getResult());
        this.passCount = run.getCounters().getPassed();
        this.warnCount = run.getCounters().getWarned();
        this.failCount = run.getCounters().getFailed();
        this.totalCount = run.getCounters().getTotal();
        this.errorCount = run.getCounters().getErrored();
        this.skipCount = run.getCounters().getSkipped();

        //this.duration =

        try {//from www.java  2s.  c  om
            this.stopCount = run.getCounters().getStopped();
        } catch (NullPointerException e) {
            // Ignore this until the stopped bug is fixed.
        }

        this.url = AWSDeviceFarmUtils.getRunUrlFromArn(run.getArn());
    }
}