src/main/java/org/varjoinen/testing/varjoend/ProcessVisualisation.java
public static String visualise(Process process) {

        boolean stopOnFailure = process.getConfiguration().isPropagateExceptions();

        StringBuilder sb = new StringBuilder();

        for (Step step : process.getSteps()) {
            if (process.getSuccessfulSteps().contains(step)) {
                sb.append(ok);
            } else if (process.getFailedSteps().contains(step)) {
                sb.append(failed);
            } else {
                sb.append(notExecuted);
            }

            sb.append(step != null ? step.getName() : "null");
            sb.append(continuation);
        }

        if (process.getSuccessfulSteps().isEmpty() && process.getFailedSteps().isEmpty()) {
            sb.append(processNotExecuted);
        } else if (process.getFailedSteps().isEmpty()) {
            sb.append(processSuccess);
        } else if (stopOnFailure) {
            sb.append(processFailed);
        } else {
            sb.append(processWithErrors);
        }

        return sb.toString();
    }
/**
     * Visualise process steps and state(s).
     * <p>
     * [ok] step 1 --> [failed] step 2  --> [ ] step 3 --> [process failed]
     *
     * @return String visualisation
     */
Visualise process steps and state(s).

@return String visualisation
Visualise process steps and state ( s ) . @return String visualisation
public static String visualise(Process process) {
        boolean stopOnFailure = process.getConfiguration().isPropagateExceptions();
        StringBuilder sb = new StringBuilder();
        for (Step step : process.getSteps()) {
            if (process.getSuccessfulSteps().contains(step)) {
                sb.append(ok);
            } else if (process.getFailedSteps().contains(step)) {
                sb.append(failed);
            } else {
                sb.append(notExecuted);
            }
            sb.append(step != null ? step.getName() : "null");
            sb.append(continuation);
        }
        if (process.getSuccessfulSteps().isEmpty() && process.getFailedSteps().isEmpty()) {
            sb.append(processNotExecuted);
        } else if (process.getFailedSteps().isEmpty()) {
            sb.append(processSuccess);
        } else if (stopOnFailure) {
            sb.append(processFailed);
        } else {
            sb.append(processWithErrors);
        }
        return sb.toString();
    }
public static String visualise ( Process process ) { boolean stopOnFailure = process . getConfiguration ( ) . isPropagateExceptions ( ) ; StringBuilder sb = new StringBuilder ( ) ; for ( Step step : process . getSteps ( ) ) { if ( process . getSuccessfulSteps ( ) . contains ( step ) ) { sb . append ( ok ) ; } else if ( process . getFailedSteps ( ) . contains ( step ) ) { sb . append ( failed ) ; } else { sb . append ( notExecuted ) ; } sb . append ( step != null ? step . getName ( ) : "null" ) ; sb . append ( continuation ) ; } if ( process . getSuccessfulSteps ( ) . isEmpty ( ) && process . getFailedSteps ( ) . isEmpty ( ) ) { sb . append ( processNotExecuted ) ; } else if ( process . getFailedSteps ( ) . isEmpty ( ) ) { sb . append ( processSuccess ) ; } else if ( stopOnFailure ) { sb . append ( processFailed ) ; } else { sb . append ( processWithErrors ) ; } return sb . toString ( ) ; }
Visualise process steps and state(s).
Visualise process steps and state ( s ) .