From c25450f6288748782ad60cc7c4b8e0e0bdc52c1c Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Sun, 31 May 2015 13:53:08 +1000 Subject: Better code, based off ParentRunner among other things --- src/test/java/au/id/zancanaro/PropertyTests.java | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src/test/java/au/id/zancanaro') 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); + } } -- cgit v1.2.3