blob: 374a974b414528db7697617d30218ac164c5a17f (
about) (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
package au.id.zancanaro;
import au.id.zancanaro.annotations.Property;
import org.junit.*;
import org.junit.experimental.theories.DataPoint;
import org.junit.runner.RunWith;
@RunWith(PropertyTestRunner.class)
public class PropertyTests {
public static Generator<Integer> 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);
Assert.assertFalse(a % 2 == 1);
}
@Property
public void aIsNotLessThanB(int a, int b) {
Assume.assumeFalse(a < b);
Assert.assertFalse(a < b);
}
@Property
public void aPlusBLessThanOneHundred(int a, int b) {
Assert.assertTrue("a plus b is five", a + b == 5);
Assert.assertEquals(a + b, 5);
}
}
|