Skip to content

Commit 052ce94

Browse files
committed
Update README.md
1 parent 4a3565a commit 052ce94

1 file changed

Lines changed: 2 additions & 31 deletions

File tree

README.md

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -24,40 +24,11 @@ Run individual tests or <b>JunitTestSuite</b> using <b>EclEmma Coverage</b>, or
2424
* JSON-java.jar<br>
2525

2626
**To build from the command line using gradle:**
27+
Until the unit tests are merged into the JSON-Java project, the code has to be wired by hand. After cloning JSON-Java-unit-test, create a directory structure under src and copy the JSON-Java files into: src/org/json. Then execute the unit tests and code coverage with:
2728
````
28-
build.gradle
29-
# In this example, both the JSON-java jar and the test code is created
30-
# from the same build file, in the test code directory. 3rd party jars are
31-
# obtained from the maven repository.
32-
apply plugin: 'java'
33-
jar.baseName = 'JSON-java'
34-
35-
sourceSets {
36-
main {
37-
java {
38-
srcDir '../JSON-java/src/org/json'
39-
}
40-
}
41-
test {
42-
java {
43-
srcDir 'src/org/json/junit'
44-
}
45-
}
46-
}
47-
48-
repositories {
49-
mavenCentral()
50-
}
51-
52-
dependencies {
53-
testCompile group: 'junit', name: 'junit', version: '4.+'
54-
testCompile group: 'com.jayway.jsonpath', name: 'json-path', version: '2.1.0'
55-
testCompile group: 'org.mockito', name: 'mockito-all', version: '1.9.5'
56-
}
29+
gradle clean build test jacocoTestReport
5730
````
5831

59-
To measure coverage: http://www.eclemma.org/ (just install the latest in Eclipse)<br>
60-
6132
<b>Conventions</b><br>
6233
Test filenames should consist of the name of the module being tested, with the suffix "Test".
6334
For example, <b>Cookie.java</b> is tested by <b>CookieTest.java</b>.

0 commit comments

Comments
 (0)