diff options
Diffstat (limited to 'tests/src/cgeo/geocaching/list')
| -rw-r--r-- | tests/src/cgeo/geocaching/list/PseudoListTest.java | 5 | ||||
| -rw-r--r-- | tests/src/cgeo/geocaching/list/StoredListTest.java | 10 |
2 files changed, 9 insertions, 6 deletions
diff --git a/tests/src/cgeo/geocaching/list/PseudoListTest.java b/tests/src/cgeo/geocaching/list/PseudoListTest.java index 8a138ef..3dec694 100644 --- a/tests/src/cgeo/geocaching/list/PseudoListTest.java +++ b/tests/src/cgeo/geocaching/list/PseudoListTest.java @@ -1,5 +1,6 @@ package cgeo.geocaching.list; +import static org.assertj.core.api.Assertions.assertThat; import junit.framework.TestCase; public class PseudoListTest extends TestCase { @@ -7,12 +8,12 @@ public class PseudoListTest extends TestCase { public static void testGetTitleAndCount() throws Exception { final String title = PseudoList.ALL_LIST.getTitleAndCount(); for (int i = 0; i < title.length(); i++) { - assertFalse("pseudo lists shall not have a number shown in their title", Character.isDigit(title.charAt(i))); + assertThat(Character.isDigit(title.charAt(i))).overridingErrorMessage("pseudo lists shall not have a number shown in their title").isFalse(); } } public static void testIsConcrete() throws Exception { - assertFalse("pseudo lists are not concrete lists", PseudoList.ALL_LIST.isConcrete()); + assertThat(PseudoList.ALL_LIST.isConcrete()).overridingErrorMessage("pseudo lists are not concrete lists").isFalse(); } } diff --git a/tests/src/cgeo/geocaching/list/StoredListTest.java b/tests/src/cgeo/geocaching/list/StoredListTest.java index bc4ebe4..50e4b5d 100644 --- a/tests/src/cgeo/geocaching/list/StoredListTest.java +++ b/tests/src/cgeo/geocaching/list/StoredListTest.java @@ -1,5 +1,7 @@ package cgeo.geocaching.list; +import static org.assertj.core.api.Assertions.assertThat; + import cgeo.geocaching.DataStore; import junit.framework.TestCase; @@ -8,7 +10,7 @@ public class StoredListTest extends TestCase { public static void testStandardListExists() { final StoredList list = getStandardList(); - assertNotNull(list); + assertThat(list).isNotNull(); } private static StoredList getStandardList() { @@ -18,14 +20,14 @@ public class StoredListTest extends TestCase { public static void testEquals() { final StoredList list1 = getStandardList(); final StoredList list2 = getStandardList(); - assertEquals(list1, list2); + assertThat(list2).isEqualTo(list1); } public static void testConcrete() { - assertTrue(getStandardList().isConcrete()); + assertThat(getStandardList().isConcrete()).isTrue(); } public static void testTitleAndCountContainsTitle() { - assertTrue(getStandardList().getTitleAndCount().startsWith(getStandardList().getTitle())); + assertThat(getStandardList().getTitleAndCount().startsWith(getStandardList().getTitle())).isTrue(); } } |
