|
7 | 7 |
|
8 | 8 | /** |
9 | 9 | * <p>A set of assertion methods useful for writing tests methods that return JSON.</p> |
10 | | - * |
| 10 | + * |
11 | 11 | * <p>There are two modes, strict and non-strict. In most cases, you will probably want |
12 | 12 | * to set strict to <i>false</i>, since that will make the tests less brittle.</p> |
13 | | - * |
| 13 | + * |
14 | 14 | * <p>Strict tests require all of the elements requested to be returned, and only those elements |
15 | 15 | * (ie, the tests are non-extensible). Arrays of elements must be returned in the same |
16 | 16 | * order as expected. For example, say I'm expecting:</p> |
17 | | - * |
| 17 | + * |
18 | 18 | * <code>{id:123,things['a','b','c']}</code> |
19 | 19 | * |
20 | 20 | * <p>The following would match when doing non-strict checking, but would fail on strict checking:</p> |
@@ -71,7 +71,7 @@ public static void assertNotEquals(String expectedStr, JSONObject actual, boolea |
71 | 71 | /** |
72 | 72 | * Asserts that the JSONObject provided matches the expected string. If it isn't it throws an |
73 | 73 | * {@link AssertionError}. |
74 | | - * |
| 74 | + * |
75 | 75 | * @param expectedStr Expected JSON string |
76 | 76 | * @param actual JSONObject to compare |
77 | 77 | * @param compareMode Specifies which comparison mode to use |
@@ -113,7 +113,7 @@ public static void assertNotEquals(String expectedStr, JSONObject actual, JSONCo |
113 | 113 | /** |
114 | 114 | * Asserts that the JSONArray provided matches the expected string. If it isn't it throws an |
115 | 115 | * {@link AssertionError}. |
116 | | - * |
| 116 | + * |
117 | 117 | * @param expectedStr Expected JSON string |
118 | 118 | * @param actual JSONArray to compare |
119 | 119 | * @param strict Enables strict checking |
@@ -141,7 +141,7 @@ public static void assertNotEquals(String expectedStr, JSONArray actual, boolean |
141 | 141 | /** |
142 | 142 | * Asserts that the JSONArray provided matches the expected string. If it isn't it throws an |
143 | 143 | * {@link AssertionError}. |
144 | | - * |
| 144 | + * |
145 | 145 | * @param expectedStr Expected JSON string |
146 | 146 | * @param actual JSONArray to compare |
147 | 147 | * @param compareMode Specifies which comparison mode to use |
@@ -181,7 +181,7 @@ public static void assertNotEquals(String expectedStr, JSONArray actual, JSONCom |
181 | 181 | /** |
182 | 182 | * Asserts that the JSONArray provided matches the expected string. If it isn't it throws an |
183 | 183 | * {@link AssertionError}. |
184 | | - * |
| 184 | + * |
185 | 185 | * @param expectedStr Expected JSON string |
186 | 186 | * @param actualStr String to compare |
187 | 187 | * @param strict Enables strict checking |
@@ -209,7 +209,7 @@ public static void assertNotEquals(String expectedStr, String actualStr, boolean |
209 | 209 | /** |
210 | 210 | * Asserts that the JSONArray provided matches the expected string. If it isn't it throws an |
211 | 211 | * {@link AssertionError}. |
212 | | - * |
| 212 | + * |
213 | 213 | * @param expectedStr Expected JSON string |
214 | 214 | * @param actualStr String to compare |
215 | 215 | * @param compareMode Specifies which comparison mode to use |
@@ -243,7 +243,7 @@ public static void assertNotEquals(String expectedStr, String actualStr, JSONCom |
243 | 243 | /** |
244 | 244 | * Asserts that the json string provided matches the expected string. If it isn't it throws an |
245 | 245 | * {@link AssertionError}. |
246 | | - * |
| 246 | + * |
247 | 247 | * @param expectedStr Expected JSON string |
248 | 248 | * @param actualStr String to compare |
249 | 249 | * @param comparator Comparator |
@@ -277,7 +277,7 @@ public static void assertNotEquals(String expectedStr, String actualStr, JSONCom |
277 | 277 | /** |
278 | 278 | * Asserts that the JSONObject provided matches the expected JSONObject. If it isn't it throws an |
279 | 279 | * {@link AssertionError}. |
280 | | - * |
| 280 | + * |
281 | 281 | * @param expected Expected JSONObject |
282 | 282 | * @param actual JSONObject to compare |
283 | 283 | * @param strict Enables strict checking |
@@ -305,7 +305,7 @@ public static void assertNotEquals(JSONObject expected, JSONObject actual, boole |
305 | 305 | /** |
306 | 306 | * Asserts that the JSONObject provided matches the expected JSONObject. If it isn't it throws an |
307 | 307 | * {@link AssertionError}. |
308 | | - * |
| 308 | + * |
309 | 309 | * @param expected Expected JSONObject |
310 | 310 | * @param actual JSONObject to compare |
311 | 311 | * @param compareMode Specifies which comparison mode to use |
@@ -341,7 +341,7 @@ public static void assertNotEquals(JSONObject expected, JSONObject actual, JSONC |
341 | 341 | /** |
342 | 342 | * Asserts that the JSONArray provided matches the expected JSONArray. If it isn't it throws an |
343 | 343 | * {@link AssertionError}. |
344 | | - * |
| 344 | + * |
345 | 345 | * @param expected Expected JSONArray |
346 | 346 | * @param actual JSONArray to compare |
347 | 347 | * @param strict Enables strict checking |
@@ -369,7 +369,7 @@ public static void assertNotEquals(JSONArray expected, JSONArray actual, boolean |
369 | 369 | /** |
370 | 370 | * Asserts that the JSONArray provided matches the expected JSONArray. If it isn't it throws an |
371 | 371 | * {@link AssertionError}. |
372 | | - * |
| 372 | + * |
373 | 373 | * @param expected Expected JSONArray |
374 | 374 | * @param actual JSONArray to compare |
375 | 375 | * @param compareMode Specifies which comparison mode to use |
|
0 commit comments