summaryrefslogtreecommitdiff
path: root/src/test/java/au/id
diff options
context:
space:
mode:
authorCarlo Zancanaro <carlo@zancanaro.id.au>2015-05-31 13:53:08 +1000
committerCarlo Zancanaro <carlo@zancanaro.id.au>2015-05-31 13:53:08 +1000
commitc25450f6288748782ad60cc7c4b8e0e0bdc52c1c (patch)
treed25bd7a6bac5535cdff87fac5cbe0146a59f7b75 /src/test/java/au/id
parentd29e1d49116c66adab72b1c1bb49c1fa3d4f8140 (diff)
Better code, based off ParentRunner among other things
Diffstat (limited to 'src/test/java/au/id')
-rw-r--r--src/test/java/au/id/zancanaro/PropertyTests.java17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/test/java/au/id/zancanaro/PropertyTests.java b/src/test/java/au/id/zancanaro/PropertyTests.java
index 0c9bb7e..3620e67 100644
--- a/src/test/java/au/id/zancanaro/PropertyTests.java
+++ b/src/test/java/au/id/zancanaro/PropertyTests.java
@@ -1,15 +1,28 @@
package au.id.zancanaro;
import au.id.zancanaro.annotations.Property;
-import au.id.zancanaro.annotations.Seed;
import org.junit.Assert;
import org.junit.Assume;
+import org.junit.experimental.theories.DataPoint;
import org.junit.runner.RunWith;
@RunWith(PropertyTestRunner.class)
public class PropertyTests {
@Property
- public void method(int a, int b) {
+ public void aIsNotOdd(int a, int b) {
+ Assume.assumeFalse(a % 2 == 1);
+ Assert.assertFalse(a % 2 == 1);
+ }
+
+ @Property
+ public void aIsNotLessThanB(int a, int b) {
+ Assume.assumeFalse(a < b);
Assert.assertFalse(a < b);
}
+
+ @Property
+ public void aIsNotGreaterThanB(int a, int b) {
+// Assume.assumeFalse(a > b);
+ Assert.assertFalse(a > b);
+ }
}