Skip to content

Commit 5ad35b8

Browse files
committed
jdoc checkstyle
1 parent 2a74b78 commit 5ad35b8

20 files changed

Lines changed: 890 additions & 7 deletions

src/test/java/org/htmlunit/CacheTest.java

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,17 @@ public void isCacheableContent() {
104104
assertFalse(cache.isCacheableContent(response));
105105
}
106106

107+
/**
108+
* @throws Exception if the test fails
109+
*/
107110
@Test
108111
public void contentWithNoHeadersIsNotCached() {
109112
assertFalse(Cache.isWithinCacheWindow(new WebResponseMock(null, null), now_, now_));
110113
}
111114

115+
/**
116+
* @throws Exception if the test fails
117+
*/
112118
@Test
113119
public void contentWithExpiryDateIsCached() {
114120
final Map<String, String> headers = new HashMap<>();
@@ -117,6 +123,9 @@ public void contentWithExpiryDateIsCached() {
117123
assertTrue(Cache.isWithinCacheWindow(new WebResponseMock(null, headers), now_, now_));
118124
}
119125

126+
/**
127+
* @throws Exception if the test fails
128+
*/
120129
@Test
121130
public void contentWithExpiryDateInFutureButShortMaxAgeIsNotInCacheWindow() {
122131
final Map<String, String> headers = new HashMap<>();
@@ -127,6 +136,9 @@ public void contentWithExpiryDateInFutureButShortMaxAgeIsNotInCacheWindow() {
127136
assertFalse(Cache.isWithinCacheWindow(new WebResponseMock(null, headers), now_ + ONE_MINUTE, now_));
128137
}
129138

139+
/**
140+
* @throws Exception if the test fails
141+
*/
130142
@Test
131143
public void contentWithExpiryDateInFutureButShortSMaxAgeIsNotInCacheWindow() {
132144
final Map<String, String> headers = new HashMap<>();
@@ -137,6 +149,9 @@ public void contentWithExpiryDateInFutureButShortSMaxAgeIsNotInCacheWindow() {
137149
assertFalse(Cache.isWithinCacheWindow(new WebResponseMock(null, headers), now_ + ONE_MINUTE, now_));
138150
}
139151

152+
/**
153+
* @throws Exception if the test fails
154+
*/
140155
@Test
141156
public void contentWithBothMaxAgeAndSMaxUsesSMaxAsPriority() {
142157
final Map<String, String> headers = new HashMap<>();
@@ -145,6 +160,9 @@ public void contentWithBothMaxAgeAndSMaxUsesSMaxAsPriority() {
145160
assertFalse(Cache.isWithinCacheWindow(new WebResponseMock(null, headers), now_ + ONE_MINUTE, now_));
146161
}
147162

163+
/**
164+
* @throws Exception if the test fails
165+
*/
148166
@Test
149167
public void contentWithMaxAgeInFutureWillBeCached() {
150168
final Map<String, String> headers = new HashMap<>();
@@ -158,6 +176,9 @@ public void contentWithMaxAgeInFutureWillBeCached() {
158176
assertTrue(Cache.isWithinCacheWindow(new WebResponseMock(null, headers), now_ + ONE_MINUTE, now_));
159177
}
160178

179+
/**
180+
* @throws Exception if the test fails
181+
*/
161182
@Test
162183
public void contentWithLongLastModifiedTimeComparedToNowIsCachedOnDownload() {
163184
final Map<String, String> headers = new HashMap<>();
@@ -166,6 +187,9 @@ public void contentWithLongLastModifiedTimeComparedToNowIsCachedOnDownload() {
166187
assertTrue(Cache.isWithinCacheWindow(new WebResponseMock(null, headers), now_, now_));
167188
}
168189

190+
/**
191+
* @throws Exception if the test fails
192+
*/
169193
@Test
170194
public void contentWithLastModifiedTimeIsCachedAfterAFewPercentOfCreationAge() {
171195
final Map<String, String> headers = new HashMap<>();
@@ -174,6 +198,9 @@ public void contentWithLastModifiedTimeIsCachedAfterAFewPercentOfCreationAge() {
174198
assertTrue(Cache.isWithinCacheWindow(new WebResponseMock(null, headers), now_ + ONE_HOUR, now_));
175199
}
176200

201+
/**
202+
* @throws Exception if the test fails
203+
*/
177204
@Test
178205
public void contentWithLastModifiedTimeIsNotCachedAfterALongerPeriod() {
179206
final Map<String, String> headers = new HashMap<>();

src/test/java/org/htmlunit/StringWebResponseTest.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ public void charset() {
4343
assertSame(UTF_8, webResponse.getContentCharset());
4444
}
4545

46+
/**
47+
* @throws Exception if the test fails
48+
*/
4649
@Test
4750
public void charsetImplicit() {
4851
final StringWebResponse webResponse = new StringWebResponse("hello", URL_FIRST);
@@ -63,6 +66,9 @@ public void charsetInContent() {
6366
assertEquals(content, webResponse.getContentAsString());
6467
}
6568

69+
/**
70+
* @throws Exception if the test fails
71+
*/
6672
@Test
6773
public void charsetInContentImplicit() {
6874
final String content = "<html><head>\n"
@@ -75,7 +81,7 @@ public void charsetInContentImplicit() {
7581
}
7682

7783
/**
78-
* @throws IOException
84+
* @throws IOException in case of error
7985
*/
8086
@Test
8187
public void inputStream() throws IOException {

src/test/java/org/htmlunit/WebClient9Test.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ public void flow1_2() {
141141
}
142142
}
143143

144+
/**
145+
* @throws Exception if the test fails
146+
*/
144147
@Test
145148
public void multithreading() throws InterruptedException {
146149
final String css = "body { background-color: green; }";

src/test/java/org/htmlunit/WebDriverTestCase.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,9 @@ protected boolean needThreeConnections() {
282282
return false;
283283
}
284284

285+
/**
286+
* @return the browser properties (and initializes them lazy)
287+
*/
285288
public static Set<String> getBrowsersProperties() {
286289
if (BROWSERS_PROPERTIES_ == null) {
287290
try {

src/test/java/org/htmlunit/html/HtmlSelectTest.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,9 @@ private static void checkOptions(final HtmlSelect select) {
440440
}
441441
}
442442

443-
/** @throws Exception if the test fails */
443+
/**
444+
* @throws Exception if the test fails
445+
*/
444446
@Test
445447
public void removeOptionsFromSelect() throws Exception {
446448
final String htmlContent = "<html><body><form name='form' method='GET' action='action.html'>\n"
@@ -489,7 +491,9 @@ public void removeOptionsFromSelect() throws Exception {
489491
assertEquals(0, theSelect.getOptions().size());
490492
}
491493

492-
/** @throws Exception if the test fails */
494+
/**
495+
* @throws Exception if the test fails
496+
*/
493497
@Test
494498
public void editOptions() throws Exception {
495499
final String htmlContent = "<html><body><form name='form' method='GET' action='action.html'>\n"

src/test/java/org/htmlunit/html/parser/HTMLParser2Test.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,9 @@ public void htmlTableMisplacedElementInside4() throws Exception {
258258
loadPageVerifyTitle2(html);
259259
}
260260

261+
/**
262+
* @throws Exception if the test fails
263+
*/
261264
@Test
262265
@Alerts({"H2", "TABLE", "H2", "TABLE", "SCRIPT"})
263266
public void htmlTableMisplacedElementInside5() throws Exception {
@@ -287,6 +290,9 @@ public void htmlTableMisplacedElementInside5() throws Exception {
287290
loadPageVerifyTitle2(html);
288291
}
289292

293+
/**
294+
* @throws Exception if the test fails
295+
*/
290296
@Test
291297
@Alerts({"H2#x", "TABLE", "H2#y", "TABLE", "H2#z", "TABLE", "H2#a", "TABLE", "SCRIPT"})
292298
public void htmlTableMisplacedElementInside6() throws Exception {
@@ -328,6 +334,9 @@ public void htmlTableMisplacedElementInside6() throws Exception {
328334
loadPageVerifyTitle2(html);
329335
}
330336

337+
/**
338+
* @throws Exception if the test fails
339+
*/
331340
@Test
332341
@Alerts({"4", "TABLE", "TABLE", "SPAN", "SCRIPT"})
333342
public void tableInsideTable() throws Exception {
@@ -363,6 +372,9 @@ public void tableInsideTable() throws Exception {
363372
loadPageVerifyTitle2(html);
364373
}
365374

375+
/**
376+
* @throws Exception if the test fails
377+
*/
366378
@Test
367379
@Alerts({"4", "TABLE", "TABLE", "SPAN", "SCRIPT"})
368380
public void tableInsideTableTr() throws Exception {
@@ -400,6 +412,9 @@ public void tableInsideTableTr() throws Exception {
400412
loadPageVerifyTitle2(html);
401413
}
402414

415+
/**
416+
* @throws Exception if the test fails
417+
*/
403418
@Test
404419
@Alerts({"2", "TABLE", "SCRIPT"})
405420
public void tableInsideTableTd() throws Exception {
@@ -435,6 +450,9 @@ public void tableInsideTableTd() throws Exception {
435450
loadPageVerifyTitle2(html);
436451
}
437452

453+
/**
454+
* @throws Exception if the test fails
455+
*/
438456
@Test
439457
@Alerts({"1", "TABLE"})
440458
public void scriptInsideTable() throws Exception {
@@ -456,6 +474,9 @@ public void scriptInsideTable() throws Exception {
456474
loadPageVerifyTitle2(html);
457475
}
458476

477+
/**
478+
* @throws Exception if the test fails
479+
*/
459480
@Test
460481
@Alerts({"1", "TABLE"})
461482
public void scriptInsideTableRows() throws Exception {
@@ -480,6 +501,9 @@ public void scriptInsideTableRows() throws Exception {
480501
loadPageVerifyTitle2(html);
481502
}
482503

504+
/**
505+
* @throws Exception if the test fails
506+
*/
483507
@Test
484508
@Alerts({"1", "TABLE"})
485509
public void scriptInsideTableData() throws Exception {

src/test/java/org/htmlunit/html/parser/HTMLParser5Test.java

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ public class HTMLParser5Test extends WebDriverTestCase {
3838
+ " log(inp.id + '-' + (f?f.name:null))"
3939
+ "}";
4040

41+
/**
42+
* @throws Exception if the test fails
43+
*/
4144
@Test
4245
@Alerts({"i1-f1", "i2-f2"})
4346
public void formEnclosure_table() throws Exception {
@@ -62,6 +65,9 @@ public void formEnclosure_table() throws Exception {
6265
loadPageVerifyTitle2(html);
6366
}
6467

68+
/**
69+
* @throws Exception if the test fails
70+
*/
6571
@Test
6672
@Alerts({"i1-f1", "i2-f2"})
6773
public void formEnclosure_div() throws Exception {
@@ -86,6 +92,9 @@ public void formEnclosure_div() throws Exception {
8692
loadPageVerifyTitle2(html);
8793
}
8894

95+
/**
96+
* @throws Exception if the test fails
97+
*/
8998
@Test
9099
@Alerts({"i1-f1", "i2-f1"})
91100
public void formEnclosure_table_nestedForms() throws Exception {
@@ -110,6 +119,9 @@ public void formEnclosure_table_nestedForms() throws Exception {
110119
loadPageVerifyTitle2(html);
111120
}
112121

122+
/**
123+
* @throws Exception if the test fails
124+
*/
113125
@Test
114126
@Alerts({"i1-f1", "i2-f1"})
115127
public void formEnclosure_div_nestedForms() throws Exception {
@@ -134,6 +146,9 @@ public void formEnclosure_div_nestedForms() throws Exception {
134146
loadPageVerifyTitle2(html);
135147
}
136148

149+
/**
150+
* @throws Exception if the test fails
151+
*/
137152
@Test
138153
@Alerts({"i1-f1", "i2-f1", "i3-null", "i4-null"})
139154
public void formEnclosure_nestedForms() throws Exception {
@@ -156,6 +171,9 @@ public void formEnclosure_nestedForms() throws Exception {
156171
loadPageVerifyTitle2(html);
157172
}
158173

174+
/**
175+
* @throws Exception if the test fails
176+
*/
159177
@Test
160178
@Alerts({"i1-f1", "i2-f1", "i3-f1", "i4-f1", "i5-f1", "i6-f1", "i7-null"})
161179
public void formEnclosure_tree1() throws Exception {
@@ -189,6 +207,9 @@ public void formEnclosure_tree1() throws Exception {
189207
loadPageVerifyTitle2(html);
190208
}
191209

210+
/**
211+
* @throws Exception if the test fails
212+
*/
192213
@Test
193214
@Alerts({"i1-f1", "i2-f1", "i3-f1", "i4-f2", "i5-f2", "i6-f2", "i7-f1", "i8-null"})
194215
public void formEnclosure_tree2() throws Exception {
@@ -223,6 +244,9 @@ public void formEnclosure_tree2() throws Exception {
223244
loadPageVerifyTitle2(html);
224245
}
225246

247+
/**
248+
* @throws Exception if the test fails
249+
*/
226250
@Test
227251
@Alerts({"i1-f1", "i2-null"})
228252
public void formEnclosure_tree3() throws Exception {
@@ -243,6 +267,9 @@ public void formEnclosure_tree3() throws Exception {
243267
loadPageVerifyTitle2(html);
244268
}
245269

270+
/**
271+
* @throws Exception if the test fails
272+
*/
246273
@Test
247274
@Alerts("x<form name=\"f1\">y</form>")
248275
public void unclosedForm() throws Exception {

0 commit comments

Comments
 (0)