Package org.springframework.test.util
Class MatcherAssertionErrors
- java.lang.Object
- org.springframework.test.util.MatcherAssertionErrors
@Deprecated public abstract class MatcherAssertionErrors extends Object
Deprecated.as of Spring 4.2, in favor of the originalMatcherAssertclass with JUnit 4.9 / Hamcrest 1.3A replacement ofMatcherAssertthat removes the need to depend on "hamcrest-all" when using Hamcrest 1.1 and also maintains backward compatibility with Hamcrest 1.1 (also embedded in JUnit 4.4 through 4.8).- Since:
- 3.2
- Author:
- Rossen Stoyanchev, Sam Brannen
Constructor Summary
Constructors Constructor Description MatcherAssertionErrors()Deprecated.
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <T> voidassertThat(String reason, T actual, Matcher<T> matcher)Deprecated.Assert that the given matcher matches the actual value.static <T> voidassertThat(T actual, Matcher<T> matcher)Deprecated.Assert that the given matcher matches the actual value.
Constructor Detail
MatcherAssertionErrors
public MatcherAssertionErrors()
Deprecated.
Method Detail
assertThat
public static <T> void assertThat(T actual, Matcher<T> matcher)
Deprecated.Assert that the given matcher matches the actual value.- Type Parameters:
T- the static type accepted by the matcher- Parameters:
actual- the value to match againstmatcher- the matcher
assertThat
public static <T> void assertThat(String reason, T actual, Matcher<T> matcher)
Deprecated.Assert that the given matcher matches the actual value.- Type Parameters:
T- the static type accepted by the matcher- Parameters:
reason- additional information about the erroractual- the value to match againstmatcher- the matcher