@@ -3,9 +3,9 @@ JUnit Theories Runner
3
3
4
4
This is a port of the JUnit theories runner into junit.contrib.
5
5
6
- In addition to being current with the theories implementation in the latest release of JUnit and
6
+ In addition to being current with the theories implementation in JUnit 4.12 and
7
7
depending on its core, this implementation contains a resolution for
8
- [ JUnit GitHub issue 64] ( http://github.com/KentBeck /junit/issues/64 ) , making it possible for
8
+ [ JUnit GitHub issue 64] ( http://github.com/junit-team /junit/issues/64 ) , making it possible for
9
9
[ junit-quickcheck] ( http://github.com/pholser/junit-quickcheck ) to generate values for theory
10
10
parameters involving generics in a safe manner.
11
11
@@ -14,8 +14,24 @@ so that the one in the core can be removed, meaning that this runner can evolve
14
14
releases of JUnit.
15
15
16
16
** PLEASE NOTE** : The classes that comprise this rendition of the JUnit theories runner are packaged
17
- as ` org.junit.contrib.theories.* ` , rather than ` org.junit.experimental.theories.* ` . Be careful not
18
- to intermix the two.
17
+ as ` org.junit.contrib.theories.* ` , rather than ` org.junit.experimental.theories.* ` . Be mindful of
18
+ which one you're using.
19
+
20
+ ## Downloading
21
+
22
+ Releases are synced to the central Maven repository. Declare a dependency element in your POM like so:
23
+
24
+ ...
25
+ <dependencies>
26
+ ...
27
+ <dependency>
28
+ <groupId>org.junit.contrib</groupId>
29
+ <artifactId>junit-theories</artifactId>
30
+ <version>4.12</version>
31
+ </dependency>
32
+ ...
33
+ </dependencies>
34
+ ...
19
35
20
36
### What is a theory?
21
37
@@ -84,9 +100,9 @@ We can eliminate duplicated test logic sometimes by using parameterized tests:
84
100
Neither of these tests expresses important characteristics we want the the answers given by
85
101
` PrimeFactors.of() ` to exhibit: No matter what positive integer you give the method...
86
102
87
- * The factors should be prime
88
- * The factors should multiply together to give the original integer
89
- * No two factorizations of two distinct integers are identical
103
+ * The factors must be prime
104
+ * The factors must multiply together to give the original integer
105
+ * Factorizations of two distinct integers must themselves be distinct (the Fundamental Theorem of Arithmetic)
90
106
91
107
Whenever we want to express characteristics of a test subject that hold for entire classes of
92
108
inputs, and we can express the characteristics in terms of inputs and outputs, we can codify these
0 commit comments