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

org.hamcrest.junit.internal.ThrowableCauseMatcher Maven / Gradle / Ivy

The newest version!
package org.hamcrest.junit.internal;

import org.hamcrest.*;

public class ThrowableCauseMatcher extends FeatureMatcher {
    public ThrowableCauseMatcher(Matcher causeMatcher) {
        super(causeMatcher, "exception with cause", "cause");
    }

    @Override
    protected Throwable featureValueOf(Throwable actual) {
        return actual.getCause();
    }


    public static Matcher hasCause(final Matcher matcher) {
        return new ThrowableCauseMatcher(matcher);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy