diff options
| author | Michael Keppler <michael.keppler@gmx.de> | 2014-04-22 17:30:51 +0200 |
|---|---|---|
| committer | Michael Keppler <michael.keppler@gmx.de> | 2014-04-22 21:44:00 +0200 |
| commit | cc9aa8b1d2b9ec24f2c41e4a523c69edcf8c8ac0 (patch) | |
| tree | fca2712f72bb2759ef4e39c0235a8a5054f27013 /tests/src/cgeo/geocaching/utils/MiscUtilsTest.java | |
| parent | 825b779844b280ba7c1effdd4185cc856eccdf5b (diff) | |
| download | cgeo-cc9aa8b1d2b9ec24f2c41e4a523c69edcf8c8ac0.zip cgeo-cc9aa8b1d2b9ec24f2c41e4a523c69edcf8c8ac0.tar.gz cgeo-cc9aa8b1d2b9ec24f2c41e4a523c69edcf8c8ac0.tar.bz2 | |
#2414 convert junit statements to assertj
This conversion is not complete, but the remaining statements are hard
to catch with regular expressions automatically.
Diffstat (limited to 'tests/src/cgeo/geocaching/utils/MiscUtilsTest.java')
| -rw-r--r-- | tests/src/cgeo/geocaching/utils/MiscUtilsTest.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/src/cgeo/geocaching/utils/MiscUtilsTest.java b/tests/src/cgeo/geocaching/utils/MiscUtilsTest.java index 1a3804b..8678d75 100644 --- a/tests/src/cgeo/geocaching/utils/MiscUtilsTest.java +++ b/tests/src/cgeo/geocaching/utils/MiscUtilsTest.java @@ -1,5 +1,7 @@ package cgeo.geocaching.utils; +import static org.assertj.core.api.Assertions.assertThat; + import java.util.LinkedList; import java.util.List; @@ -21,7 +23,7 @@ public class MiscUtilsTest extends TestCase { } int count = 0; for (final List<Integer> subList: MiscUtils.buffer(list, 10)) { - assertEquals("each sublist has the right size", 10, subList.size()); + assertThat(subList).hasSize(10); assertEquals("sublist has the right content", count * 10, (int) subList.get(0)); count++; } @@ -35,7 +37,7 @@ public class MiscUtilsTest extends TestCase { } int count = 0; for (final List<Integer> subList: MiscUtils.buffer(list, 10)) { - assertTrue("each sublist has no more than the allowed number of arguments", subList.size() <= 10); + assertThat(subList.size()).overridingErrorMessage("each sublist has no more than the allowed number of arguments").isLessThanOrEqualTo(10); count += subList.size(); } assertEquals("all the elements were seen", 48, count); |
