diff options
author | Carlo Zancanaro <carlo@zancanaro.id.au> | 2015-06-01 00:25:19 +1000 |
---|---|---|
committer | Carlo Zancanaro <carlo@zancanaro.id.au> | 2015-06-01 00:25:19 +1000 |
commit | 7e1182355d54f0dc8461ce7df7c4aca8c40d2a92 (patch) | |
tree | 49f864ec8f584dd5a4cfb3d03e6201fad20e653c /src/test/java/au/id/zancanaro/PropertyTests.java | |
parent | a4b5a5f904fe9f21697cd8fc8998c7e6e86306af (diff) |
Just some rearranging, renaming and clean-up
Diffstat (limited to 'src/test/java/au/id/zancanaro/PropertyTests.java')
-rw-r--r-- | src/test/java/au/id/zancanaro/PropertyTests.java | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/src/test/java/au/id/zancanaro/PropertyTests.java b/src/test/java/au/id/zancanaro/PropertyTests.java deleted file mode 100644 index dd595e1..0000000 --- a/src/test/java/au/id/zancanaro/PropertyTests.java +++ /dev/null @@ -1,58 +0,0 @@ -package au.id.zancanaro; - -import au.id.zancanaro.annotations.Property; -import au.id.zancanaro.annotations.Seed; -import org.hamcrest.CoreMatchers; -import org.junit.*; -import org.junit.experimental.theories.DataPoint; -import org.junit.matchers.JUnitMatchers; -import org.junit.runner.RunWith; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -@RunWith(PropertyTestRunner.class) -public class PropertyTests { - public static Generator<Integer> gen = Generators.integer(); - public static Generator<List<Integer>> list = Generators.listOf(Generators.integer()); - - @Ignore - @Property - public void aIsNotOdd(int a, int b) { - Assert.assertFalse(a % 2 == 1); - } - - @Ignore - @Property - public void aIsNotLessThanB(int a, int b) { - Assert.assertFalse(a < b); - } - - @Ignore - @Property - public void aPlusBLessThanOneHundred(int a, int b) { - Assert.assertTrue(a + b < 100); - } - - @Property - public void sortingIsIdempotent(List<Integer> list) { - List<Integer> left = new ArrayList<>(list); - Collections.sort(left); - - List<Integer> right = new ArrayList<>(list); - Collections.sort(right); - Collections.sort(right); - - Assert.assertEquals(left, right); - } - - @Property - public void reverseIsItsOwnInverse(List<Integer> list) { - List<Integer> reversed = new ArrayList<>(list); - Collections.reverse(reversed); - Collections.reverse(reversed); - - Assert.assertEquals(list, reversed); - } -} |