You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*These tests are a work in progress. Help from interested developers is welcome.*<br>
9
9
More coverage is needed, but more importantly, improvements to test quality is needed.<br>
10
10
11
+
Eclipse is the recommended development environment.
12
+
Run individual tests or <b>JunitTestSuite</b> using *EclEmma Coverage*, or execute the <b>TestRunner<b> application directly.<br>
13
+
11
14
You will need the following libraries for testing:
12
-
Test harness: http://junit.org<br>
13
-
Coverage: http://www.eclemma.org/<br>
15
+
Test harness: http://junit.org<br>
16
+
* hamcrest-core-1.3.jar (for Junit)
17
+
* junit-4.12.jar
14
18
Mockery: https://github.com/mockito/mockito
15
-
16
-
Include these libraries in your project:
19
+
* mockito-all-1.9.5.jar
20
+
Coverage: http://www.eclemma.org/ (just install the latest in Eclipse)<br>
17
21
JSON-Java.jar (make this jar of the files to be tested yourself)
18
-
hamcrest-core-1.3.jar (for Junit)
19
-
junit-4.12.jar
20
-
mockito-all-1.9.5.jar
21
-
22
-
23
-
Eclipse is the recommended development environment.
24
-
Run individual tests or <b>JunitTestSuite</b> using *EclEmma Coverage*, or execute the <b>TestRunner<b> application directly.<br>
25
22
23
+
*Conventions*
26
24
Test filenames should consist of the name of the module being tested, with the suffix "Test".
27
25
For example, <b>Cookie.java</b> is tested by <b>CookieTest.java</b>.
28
26
When adding a new unit test, don't forget to update <b>JunitTestSuite.java</b>.
29
27
30
-
The fundamental issues with JSON-Java testing are:
28
+
*The fundamental issues with JSON-Java testing are:*
31
29
* <b>JSONObjects</b> are unordered, making simple string comparison ineffective.
32
30
* Comparisons via **equals()** is not currently supported. Neither <b>JSONArray</b> nor <b>JSONObject</b> overrride <b>hashCode()</b> or <b>equals()</b>, so comparison defaults to the <b>Object</b> equals(), which is not useful.
33
31
* Access to the <b>JSONArray</b> and <b>JSONObject</b> internal containers for comparison is not currently available.
0 commit comments