From 821f5a2c711d748a95d8f5d54266069c5378b556 Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Thu, 4 Jun 2015 23:35:47 +1000 Subject: Static imports for a test, just to make it read a little bit more nicely --- .../au/id/zancanaro/javacheck/SimpleListOperationsTest.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/test/java') 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 list) { List left = new ArrayList<>(list); - Collections.sort(left); + sort(left); List 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 list) { List reversed = new ArrayList<>(list); - Collections.reverse(reversed); - Collections.reverse(reversed); + reverse(reversed); + reverse(reversed); assertEquals(list, reversed); } -- cgit v1.2.3