All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.intuit.karate.AssertionResult Maven / Gradle / Ivy

There is a newer version: 1.4.1
Show newest version
package com.intuit.karate;

/**
 *
 * @author pthomas3
 */
public class AssertionResult {
    
    protected final String message;
    protected final boolean pass;
    
    public static final AssertionResult PASS = new AssertionResult(true, null);
    
    private AssertionResult(boolean pass, String message) {
        this.pass = pass;
        this.message = message;
    }
    
    public static AssertionResult fail(String message) {
        return new AssertionResult(false, message);
    }

    @Override
    public String toString() {
        return pass ? "passed" : "assertion failed: " + message;            
    }        
    
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy