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

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

There is a newer version: 2.0.0.0
Show newest version
package org.hamcrest.junit.internal;

import org.hamcrest.*;

public class ThrowableMessageMatcher extends FeatureMatcher {
    public ThrowableMessageMatcher(Matcher subMatcher) {
        super(subMatcher, "exception with message", "message");
    }


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

    public static Matcher hasMessage(final Matcher matcher) {
        return new ThrowableMessageMatcher(matcher);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy