X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Ftest%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffreenet%2Fwot%2FTrustTest.java;h=102afb43d000d1efe2100659a21e338c60c5fbea;hp=93eebb8a35e9f80286f6898717c0cde667608ad7;hb=1df489f8cc3a4e905dcaa03444f8f72e421a53ef;hpb=f8fab0f886a2809db0e5888e110db154c69df7c9 diff --git a/src/test/java/net/pterodactylus/sone/freenet/wot/TrustTest.java b/src/test/java/net/pterodactylus/sone/freenet/wot/TrustTest.java index 93eebb8..102afb4 100644 --- a/src/test/java/net/pterodactylus/sone/freenet/wot/TrustTest.java +++ b/src/test/java/net/pterodactylus/sone/freenet/wot/TrustTest.java @@ -17,15 +17,12 @@ package net.pterodactylus.sone.freenet.wot; -import static java.util.regex.Pattern.compile; +import static net.pterodactylus.sone.Matchers.matches; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.nullValue; -import org.hamcrest.Description; -import org.hamcrest.Matcher; -import org.hamcrest.TypeSafeMatcher; import org.junit.Test; /** @@ -73,18 +70,4 @@ public class TrustTest { assertThat(trustString, matches("\\b2\\b")); } - private static Matcher matches(final String regex) { - return new TypeSafeMatcher() { - @Override - protected boolean matchesSafely(String item) { - return compile(regex).matcher(item).find(); - } - - @Override - public void describeTo(Description description) { - description.appendText("matches: ").appendValue(regex); - } - }; - } - }