From 7e1182355d54f0dc8461ce7df7c4aca8c40d2a92 Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Mon, 1 Jun 2015 00:25:19 +1000 Subject: Just some rearranging, renaming and clean-up --- src/test/java/au/id/zancanaro/PropertyTests.java | 58 ------------------------ 1 file changed, 58 deletions(-) delete mode 100644 src/test/java/au/id/zancanaro/PropertyTests.java (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 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 gen = Generators.integer(); - public static Generator> 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 list) { - List left = new ArrayList<>(list); - Collections.sort(left); - - List right = new ArrayList<>(list); - Collections.sort(right); - Collections.sort(right); - - Assert.assertEquals(left, right); - } - - @Property - public void reverseIsItsOwnInverse(List list) { - List reversed = new ArrayList<>(list); - Collections.reverse(reversed); - Collections.reverse(reversed); - - Assert.assertEquals(list, reversed); - } -} -- cgit v1.2.3