From 199037f9c80afd885f1f536d91b40a8397cd6bf2 Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Sun, 31 May 2015 16:48:45 +1000 Subject: Improve lots of things In particular: + make output more sane and less all over the place + just ignore original exception, the shrunk one is the only one which really matters + fit into the jUnit framework more (so now @Before, @After and stuff work) --- src/test/java/au/id/zancanaro/PropertyTests.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'src/test/java/au/id/zancanaro/PropertyTests.java') diff --git a/src/test/java/au/id/zancanaro/PropertyTests.java b/src/test/java/au/id/zancanaro/PropertyTests.java index 3620e67..374a974 100644 --- a/src/test/java/au/id/zancanaro/PropertyTests.java +++ b/src/test/java/au/id/zancanaro/PropertyTests.java @@ -1,13 +1,20 @@ package au.id.zancanaro; import au.id.zancanaro.annotations.Property; -import org.junit.Assert; -import org.junit.Assume; +import org.junit.*; import org.junit.experimental.theories.DataPoint; import org.junit.runner.RunWith; @RunWith(PropertyTestRunner.class) public class PropertyTests { + public static Generator gen = Generators.integer(); + + @Test + public void testblah() throws Exception { + Assert.assertEquals(10, 11); + + } + @Property public void aIsNotOdd(int a, int b) { Assume.assumeFalse(a % 2 == 1); @@ -21,8 +28,8 @@ public class PropertyTests { } @Property - public void aIsNotGreaterThanB(int a, int b) { -// Assume.assumeFalse(a > b); - Assert.assertFalse(a > b); + public void aPlusBLessThanOneHundred(int a, int b) { + Assert.assertTrue("a plus b is five", a + b == 5); + Assert.assertEquals(a + b, 5); } } -- cgit v1.2.3