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

org.hamcrest.junit.MatcherAssert Maven / Gradle / Ivy

There is a newer version: 2.0.0.0
Show newest version
/*  Copyright (c) 2000-2006 hamcrest.org
 */
package org.hamcrest.junit;


import org.hamcrest.Matcher;
import org.hamcrest.junit.internal.Matching;
import org.hamcrest.junit.internal.MismatchAction;

public class MatcherAssert {
    public static  void assertThat(T actual, Matcher matcher) {
        assertThat("", actual, matcher);
    }
    
    public static  void assertThat(String message, T actual, Matcher matcher) {
        Matching.checkMatch(message, actual, matcher, new MismatchAction() {
            @Override
            public void mismatch(String description) {
                throw new AssertionError(description);
            }
        });
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy