1515package org .htmlunit ;
1616
1717import static java .nio .charset .StandardCharsets .ISO_8859_1 ;
18- import static org .junit .Assert .assertEquals ;
19- import static org .junit .Assert .assertNotNull ;
20- import static org .junit .Assert .assertTrue ;
2118
2219import java .io .File ;
2320import java .net .UnknownHostException ;
3936import org .htmlunit .html .HtmlAnchor ;
4037import org .htmlunit .html .HtmlPage ;
4138import org .htmlunit .xml .XmlPage ;
42- import org .junit .Assert ;
43- import org .junit .Ignore ;
39+ import org .junit .jupiter . api . Assertions ;
40+ import org .junit .jupiter . api . Disabled ;
4441import org .junit .jupiter .api .Test ;
4542
4643/**
@@ -72,7 +69,7 @@ public class ExternalTest {
7269 */
7370 @ Test
7471 public void testEnvironment () throws Exception {
75- assertEquals ("en_US" , Locale .getDefault ().toString ());
72+ Assertions . assertEquals ("en_US" , Locale .getDefault ().toString ());
7673 }
7774
7875 /**
@@ -114,7 +111,7 @@ public void pom() throws Exception {
114111 }
115112
116113 if (wrongVersions .size () > 0 ) {
117- Assert .fail (String .join ("\n " , wrongVersions ));
114+ Assertions .fail (String .join ("\n " , wrongVersions ));
118115 }
119116
120117 assertVersion ("org.sonatype.oss" , "oss-parent" , "9" );
@@ -153,7 +150,7 @@ public void assertChromeDriver() throws Exception {
153150 break ;
154151 }
155152 }
156- assertEquals ("Chrome Driver" , version , CHROME_DRIVER_ );
153+ Assertions . assertEquals (version , CHROME_DRIVER_ );
157154 }
158155 }
159156
@@ -162,7 +159,7 @@ public void assertChromeDriver() throws Exception {
162159 * @throws Exception if an error occurs
163160 */
164161 @ Test
165- @ Ignore ("javascript errors" )
162+ @ Disabled ("javascript errors" )
166163 public void assertEdgeDriver () throws Exception {
167164 try (WebClient webClient = buildWebClient ()) {
168165 final HtmlPage page = webClient .getPage (EDGE_DRIVER_URL_ );
@@ -182,7 +179,7 @@ public void assertEdgeDriver() throws Exception {
182179 break ;
183180 }
184181 }
185- assertEquals ("Edge Driver" , version , EDGE_DRIVER_ );
182+ Assertions . assertEquals (version , EDGE_DRIVER_ );
186183 }
187184 }
188185
@@ -196,7 +193,7 @@ public void assertGeckoDriver() throws Exception {
196193 try {
197194 final HtmlPage page = webClient .getPage (GECKO_DRIVER_URL_ );
198195 final DomNodeList <DomNode > divs = page .querySelectorAll ("li.breadcrumb-item-selected" );
199- assertEquals ("Gecko Driver" , divs .get (0 ).asNormalizedText (), "v" + GECKO_DRIVER_ );
196+ Assertions . assertEquals (divs .get (0 ).asNormalizedText (), "v" + GECKO_DRIVER_ );
200197 }
201198 catch (final FailingHttpStatusCodeException e ) {
202199 // ignore
@@ -221,7 +218,7 @@ public void snapshot() throws Exception {
221218 break ;
222219 }
223220 }
224- assertNotNull (version );
221+ Assertions . assertNotNull (version );
225222 if (version .contains ("SNAPSHOT" )) {
226223 try (WebClient webClient = buildWebClient ()) {
227224 final XmlPage page = webClient .getPage (SONATYPE_SNAPSHOT_REPO_URL_
@@ -231,7 +228,7 @@ public void snapshot() throws Exception {
231228 final long snapshotMillis = format .parse (timestamp ).getTime ();
232229 final long nowMillis = System .currentTimeMillis ();
233230 final long days = TimeUnit .MILLISECONDS .toDays (nowMillis - snapshotMillis );
234- assertTrue ("Snapshot not deployed for " + days + " days" , days < 14 );
231+ Assertions . assertTrue (days < 14 , "Snapshot not deployed for " + days + " days" );
235232 }
236233 }
237234 }
@@ -271,7 +268,7 @@ private static void assertVersion(final String groupId, final String artifactId,
271268
272269 // it is ok if the pom uses a more recent version
273270 if (!isVersionAfter (pomVersion , latestMavenCentralVersion )) {
274- assertEquals (groupId + ":" + artifactId , latestMavenCentralVersion , pomVersion );
271+ Assertions . assertEquals (/* groupId + ":" + artifactId, */ latestMavenCentralVersion , pomVersion );
275272 }
276273 }
277274 }
0 commit comments