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, 4 insertions, 2 deletions
diff --git a/tests/src/cgeo/geocaching/utils/TextUtilsTest.java b/tests/src/cgeo/geocaching/utils/TextUtilsTest.java index 2093383..d1dba84 100644 --- a/tests/src/cgeo/geocaching/utils/TextUtilsTest.java +++ b/tests/src/cgeo/geocaching/utils/TextUtilsTest.java @@ -1,5 +1,7 @@ package cgeo.geocaching.utils; +import static org.assertj.core.api.Assertions.assertThat; + import cgeo.geocaching.connector.gc.GCConstants; import cgeo.geocaching.connector.gc.GCConstantsTest; import cgeo.geocaching.test.mock.MockedCache; @@ -12,11 +14,11 @@ 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, "???")); - assertTrue(page.contains("id=\"ctl00_hlRenew\"") || GCConstants.MEMBER_STATUS_PM.equals(TextUtils.getMatch(page, GCConstants.PATTERN_MEMBER_STATUS, true, "???"))); + assertThat(page.contains("id=\"ctl00_hlRenew\"") || GCConstants.MEMBER_STATUS_PM.equals(TextUtils.getMatch(page, GCConstants.PATTERN_MEMBER_STATUS, true, "???"))).isTrue(); } public static void testReplaceWhitespaces() { - assertEquals("foo bar baz ", TextUtils.replaceWhitespace(" foo\n\tbar \r baz ")); + assertThat(TextUtils.replaceWhitespace(" foo\n\tbar \r baz ")).isEqualTo("foo bar baz "); } public static void testControlCharactersCleanup() { |
