diff options
Diffstat (limited to 'tests/src/cgeo/geocaching/utils/TextUtilsTest.java')
-rw-r--r-- | tests/src/cgeo/geocaching/utils/TextUtilsTest.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/src/cgeo/geocaching/utils/TextUtilsTest.java b/tests/src/cgeo/geocaching/utils/TextUtilsTest.java index d1dba84..29c4864 100644 --- a/tests/src/cgeo/geocaching/utils/TextUtilsTest.java +++ b/tests/src/cgeo/geocaching/utils/TextUtilsTest.java @@ -13,7 +13,7 @@ import java.util.regex.Pattern; public class TextUtilsTest extends AndroidTestCase { public static void testRegEx() { final String page = MockedCache.readCachePage("GC2CJPF"); - assertEquals(GCConstantsTest.MOCK_LOGIN_NAME, TextUtils.getMatch(page, GCConstants.PATTERN_LOGIN_NAME, true, "???")); + assertThat(TextUtils.getMatch(page, GCConstants.PATTERN_LOGIN_NAME, true, "???")).isEqualTo(GCConstantsTest.MOCK_LOGIN_NAME); assertThat(page.contains("id=\"ctl00_hlRenew\"") || GCConstants.MEMBER_STATUS_PM.equals(TextUtils.getMatch(page, GCConstants.PATTERN_MEMBER_STATUS, true, "???"))).isTrue(); } @@ -23,7 +23,7 @@ public class TextUtilsTest extends AndroidTestCase { public static void testControlCharactersCleanup() { final Pattern patternAll = Pattern.compile("(.*)", Pattern.DOTALL); - assertEquals("some control characters removed", TextUtils.getMatch("some" + "\u001C" + "control" + (char) 0x1D + "characters removed", patternAll, "")); - assertEquals("newline also removed", TextUtils.getMatch("newline\nalso\nremoved", patternAll, "")); + assertThat(TextUtils.getMatch("some" + "\u001C" + "control" + (char) 0x1D + "characters removed", patternAll, "")).isEqualTo("some control characters removed"); + assertThat(TextUtils.getMatch("newline\nalso\nremoved", patternAll, "")).isEqualTo("newline also removed"); } } |