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

ru.yandex.qatools.allure.events.TestCaseFailureEvent Maven / Gradle / Ivy

There is a newer version: 1.4.0.RC9
Show newest version
package ru.yandex.qatools.allure.events;

import ru.yandex.qatools.allure.model.Status;

/**
 * @author Dmitry Baev [email protected]
 *         Date: 11.11.13
 */
public class TestCaseFailureEvent extends TestCaseStatusChangeEvent {

    @Override
    protected Status getStatus() {
        return throwable instanceof AssertionError ? Status.FAILED : Status.BROKEN;
    }

    @Override
    protected String getMessage() {
        return getStatus() == Status.FAILED ? "Test failed with unknown reason" : "Test broken with unknown reason";
    }

    @Override
    public TestCaseStatusChangeEvent withThrowable(Throwable value) {
        setThrowable(value);
        return this;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy