add MatcherFunctionTest test case (#743)

pull/745/head
tudo 2 years ago committed by GitHub
parent 3b419c89be
commit 43f3a07815
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -17,5 +17,19 @@
package cn.hippo4j.common.function;
import cn.hippo4j.common.toolkit.Assert;
import java.math.BigDecimal;
import org.junit.Test;
public final class MatcherFunctionTest {
public static <T> boolean matchTest(Matcher<T> matcher, T value) {
return matcher.match(value);
}
@Test
public void assertMatch() {
Assert.isTrue(matchTest(Boolean.TRUE::equals, true));
Assert.isTrue(matchTest(BigDecimal.ZERO::equals, BigDecimal.ZERO));
}
}

Loading…
Cancel
Save