Skip to content

Commit 7cb2271

Browse files
committed
Replace always pasing assert with actual assert
1 parent cbcc437 commit 7cb2271

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/test/java/org/apache/maven/plugins/javadoc/JavadocUtilTest.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -223,14 +223,14 @@ public void testParseJavadocMemory() {
223223
JavadocUtil.parseJavadocMemory(memory);
224224
fail("Not catch wrong pattern");
225225
} catch (IllegalArgumentException e) {
226-
assertTrue(true);
226+
assertNotNull(e.getMessage());
227227
}
228228
memory = "ABC128m";
229229
try {
230230
JavadocUtil.parseJavadocMemory(memory);
231231
fail("Not catch wrong pattern");
232232
} catch (IllegalArgumentException e) {
233-
assertTrue(true);
233+
assertNotNull(e.getMessage());
234234
}
235235
}
236236

@@ -261,7 +261,7 @@ public void testIsValidPackageList() throws Exception {
261261
JavadocUtil.isValidPackageList(url, settings, false);
262262
fail();
263263
} catch (IllegalArgumentException e) {
264-
assertTrue(true);
264+
assertNotNull(e.getMessage());
265265
}
266266

267267
url = new File(getBasedir(), "/pom.xml").toURI().toURL();
@@ -270,7 +270,7 @@ public void testIsValidPackageList() throws Exception {
270270
try {
271271
assertFalse(JavadocUtil.isValidPackageList(url, settings, true));
272272
} catch (IOException e) {
273-
assertTrue(true);
273+
assertNotNull(e.getMessage());
274274
}
275275

276276
url = this.getClass()
@@ -287,7 +287,7 @@ public void testIsValidPackageList() throws Exception {
287287
JavadocUtil.isValidPackageList(wrongUrl, settings, false);
288288
fail();
289289
} catch (IOException e) {
290-
assertTrue(true);
290+
assertNotNull(e.getMessage());
291291
}
292292

293293
// real proxy
@@ -300,7 +300,7 @@ public void testIsValidPackageList() throws Exception {
300300
JavadocUtil.isValidPackageList(wrongUrl, settings, false);
301301
fail();
302302
} catch (IOException e) {
303-
assertTrue(true);
303+
assertNotNull(e.getMessage());
304304
}
305305
}
306306

@@ -322,7 +322,7 @@ public void testIsValidPackageList() throws Exception {
322322
JavadocUtil.isValidPackageList(url, settings, false);
323323
fail();
324324
} catch (FileNotFoundException e) {
325-
assertTrue(true);
325+
assertNotNull(e.getMessage());
326326
}
327327

328328
// auth proxy
@@ -346,7 +346,7 @@ public void testIsValidPackageList() throws Exception {
346346
JavadocUtil.isValidPackageList(wrongUrl, settings, false);
347347
fail();
348348
} catch (IOException e) {
349-
assertTrue(true);
349+
assertNotNull(e.getMessage());
350350
}
351351
}
352352

@@ -368,7 +368,7 @@ public void testIsValidPackageList() throws Exception {
368368
JavadocUtil.isValidPackageList(url, settings, true);
369369
fail();
370370
} catch (SocketTimeoutException e) {
371-
assertTrue(true);
371+
assertNotNull(e.getMessage());
372372
}
373373

374374
// nonProxyHosts

0 commit comments

Comments
 (0)