summaryrefslogtreecommitdiff
path: root/src/test/java/au/id/zancanaro/javacheck
diff options
context:
space:
mode:
authorCarlo Zancanaro <carlo@zancanaro.id.au>2015-06-04 23:35:47 +1000
committerCarlo Zancanaro <carlo@zancanaro.id.au>2015-06-04 23:35:47 +1000
commit821f5a2c711d748a95d8f5d54266069c5378b556 (patch)
tree150416f707c05fc656fda77266e29156686abf0e /src/test/java/au/id/zancanaro/javacheck
parent405af698aa80e22b7f1d1596dfbb796a3c882011 (diff)
Static imports for a test, just to make it read a little bit more nicely
Diffstat (limited to 'src/test/java/au/id/zancanaro/javacheck')
-rw-r--r--src/test/java/au/id/zancanaro/javacheck/SimpleListOperationsTest.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/test/java/au/id/zancanaro/javacheck/SimpleListOperationsTest.java b/src/test/java/au/id/zancanaro/javacheck/SimpleListOperationsTest.java
index 8f7b075..70b2425 100644
--- a/src/test/java/au/id/zancanaro/javacheck/SimpleListOperationsTest.java
+++ b/src/test/java/au/id/zancanaro/javacheck/SimpleListOperationsTest.java
@@ -10,6 +10,8 @@ import java.util.Collections;
import java.util.List;
import static au.id.zancanaro.javacheck.Generators.*;
+import static java.util.Collections.reverse;
+import static java.util.Collections.sort;
import static org.junit.Assert.assertEquals;
@RunWith(Properties.class)
@@ -27,11 +29,11 @@ public class SimpleListOperationsTest {
@Property(maxSize = maxSize, runs = runs)
public void sortingIsIdempotent(List<Integer> list) {
List<Integer> left = new ArrayList<>(list);
- Collections.sort(left);
+ sort(left);
List<Integer> right = new ArrayList<>(list);
- Collections.sort(right);
- Collections.sort(right);
+ sort(right);
+ sort(right);
assertEquals(left, right);
}
@@ -39,8 +41,8 @@ public class SimpleListOperationsTest {
@Property(maxSize = 100, runs = runs)
public void reverseIsItsOwnInverse(List<String> list) {
List<String> reversed = new ArrayList<>(list);
- Collections.reverse(reversed);
- Collections.reverse(reversed);
+ reverse(reversed);
+ reverse(reversed);
assertEquals(list, reversed);
}