summaryrefslogtreecommitdiff
path: root/src/test/java/au/id/zancanaro/javacheck
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/au/id/zancanaro/javacheck')
-rw-r--r--src/test/java/au/id/zancanaro/javacheck/ListFunctorRulesTest.java9
-rw-r--r--src/test/java/au/id/zancanaro/javacheck/OptionalFunctorRulesTest.java9
-rw-r--r--src/test/java/au/id/zancanaro/javacheck/SimpleListOperationsTest.java7
3 files changed, 8 insertions, 17 deletions
diff --git a/src/test/java/au/id/zancanaro/javacheck/ListFunctorRulesTest.java b/src/test/java/au/id/zancanaro/javacheck/ListFunctorRulesTest.java
index 4100378..8d6cd88 100644
--- a/src/test/java/au/id/zancanaro/javacheck/ListFunctorRulesTest.java
+++ b/src/test/java/au/id/zancanaro/javacheck/ListFunctorRulesTest.java
@@ -16,9 +16,6 @@ import static org.junit.Assert.assertEquals;
@RunWith(Properties.class)
public class ListFunctorRulesTest {
- private final static int runs = 1000;
- private final static int maxSize = 1000;
-
@DataSource
public static Generator<Function<Long, Long>> integerFunction =
oneOf(
@@ -26,7 +23,7 @@ public class ListFunctorRulesTest {
longInteger().map(ListFunctorRulesTest::timesI),
longInteger().map(ListFunctorRulesTest::constantlyI));
- @Property(maxSize = maxSize, runs = runs)
+ @Property
public void mappingCompositionsWithStreams(
List<Long> list,
Function<Long, Long> f,
@@ -43,7 +40,7 @@ public class ListFunctorRulesTest {
assertEquals(left, right);
}
- @Property(maxSize = maxSize, runs = runs)
+ @Property
public void mappingCompositionsWithIntermediateList(
List<Long> list,
Function<Long, Long> f,
@@ -58,7 +55,7 @@ public class ListFunctorRulesTest {
assertEquals(left, right);
}
- @Property(maxSize = maxSize, runs = runs)
+ @Property
public void mapIdentityIsIdentity(List<Long> list) {
List<Long> mapped = list.stream().map(x -> x).collect(Collectors.toList());
diff --git a/src/test/java/au/id/zancanaro/javacheck/OptionalFunctorRulesTest.java b/src/test/java/au/id/zancanaro/javacheck/OptionalFunctorRulesTest.java
index b13fb8b..5ef552e 100644
--- a/src/test/java/au/id/zancanaro/javacheck/OptionalFunctorRulesTest.java
+++ b/src/test/java/au/id/zancanaro/javacheck/OptionalFunctorRulesTest.java
@@ -16,9 +16,6 @@ import static org.junit.Assert.assertEquals;
@RunWith(Properties.class)
public class OptionalFunctorRulesTest {
- private final static int runs = 1000;
- private final static int maxSize = 1000;
-
@DataSource
public static Generator<Optional<Integer>> listOfIntegers = oneOf(
pure(Optional.empty()),
@@ -31,7 +28,7 @@ public class OptionalFunctorRulesTest {
integer().map(OptionalFunctorRulesTest::timesI),
integer().map(OptionalFunctorRulesTest::constantlyI));
- @Property(maxSize = maxSize, runs = runs)
+ @Property
public void mappingCompositionsWithStreams(
Optional<Integer> optional,
Function<Integer, Integer> f,
@@ -46,7 +43,7 @@ public class OptionalFunctorRulesTest {
assertEquals(left, right);
}
- @Property(maxSize = maxSize, runs = runs)
+ @Property
public void mappingCompositionsWithIntermediateList(
Optional<Integer> optional,
Function<Integer, Integer> f,
@@ -60,7 +57,7 @@ public class OptionalFunctorRulesTest {
assertEquals(left, right);
}
- @Property(maxSize = maxSize, runs = runs)
+ @Property
public void mapIdentityIsIdentity(Optional<Integer> optional) {
Optional<Integer> mapped = optional.map(x -> x);
diff --git a/src/test/java/au/id/zancanaro/javacheck/SimpleListOperationsTest.java b/src/test/java/au/id/zancanaro/javacheck/SimpleListOperationsTest.java
index 3f4d58b..3cfef37 100644
--- a/src/test/java/au/id/zancanaro/javacheck/SimpleListOperationsTest.java
+++ b/src/test/java/au/id/zancanaro/javacheck/SimpleListOperationsTest.java
@@ -14,10 +14,7 @@ import static org.junit.Assert.assertEquals;
@RunWith(Properties.class)
public class SimpleListOperationsTest {
- private final static int runs = 1000;
- private final static int maxSize = 1000;
-
- @Property(maxSize = maxSize, runs = runs)
+ @Property
public void sortingIsIdempotent(List<Integer> list) {
List<Integer> left = new ArrayList<>(list);
sort(left);
@@ -29,7 +26,7 @@ public class SimpleListOperationsTest {
assertEquals(left, right);
}
- @Property(maxSize = 100, runs = runs)
+ @Property
public void reverseIsItsOwnInverse(List<String> list) {
List<String> reversed = new ArrayList<>(list);
reverse(reversed);