Skip to content

Commit

Permalink
Merge pull request #148 from arjantijms/htmlunit310
Browse files Browse the repository at this point in the history
Update to HTMLUnit 3.11
  • Loading branch information
arjantijms committed Mar 12, 2024
2 parents 7d4c193 + 1a1f975 commit c8a25c1
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 18 deletions.
Expand Up @@ -23,7 +23,7 @@
import static ee.jakarta.tck.authorization.util.Assert.assertDefaultNotAuthenticated;
import static ee.jakarta.tck.authorization.util.ShrinkWrap.mavenWar;

import com.gargoylesoftware.htmlunit.DefaultCredentialsProvider;
import org.htmlunit.DefaultCredentialsProvider;
import ee.jakarta.tck.authorization.util.ArquillianBase;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
Expand Down
Expand Up @@ -21,8 +21,8 @@
import static ee.jakarta.tck.authorization.util.Assert.assertDefaultNoAccess;
import static ee.jakarta.tck.authorization.util.ShrinkWrap.mavenWar;

import com.gargoylesoftware.htmlunit.DefaultCredentialsProvider;
import ee.jakarta.tck.authorization.util.ArquillianBase;
import org.htmlunit.DefaultCredentialsProvider;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.Archive;
Expand All @@ -48,7 +48,7 @@ public static Archive<?> createDeployment() {
@Test
public void testAuthenticatedWrongRole() {
DefaultCredentialsProvider credentialsProvider = new DefaultCredentialsProvider();
credentialsProvider.addCredentials("reza", "secret1");
credentialsProvider.addCredentials("reza", "secret1".toCharArray());

getWebClient().setCredentialsProvider(credentialsProvider);

Expand All @@ -74,7 +74,7 @@ public void testNotAuthenticated() {
@Test
public void testNotAuthenticatedWrongName() {
DefaultCredentialsProvider credentialsProvider = new DefaultCredentialsProvider();
credentialsProvider.addCredentials("romo", "secret1");
credentialsProvider.addCredentials("romo", "secret1".toCharArray());

getWebClient().setCredentialsProvider(credentialsProvider);

Expand Down Expand Up @@ -105,7 +105,7 @@ public void testNotAuthenticatedSpecial() {
@Test
public void testAuthenticatedSpecial() {
DefaultCredentialsProvider credentialsProvider = new DefaultCredentialsProvider();
credentialsProvider.addCredentials("reza", "secret1");
credentialsProvider.addCredentials("reza", "secret1".toCharArray());

getWebClient().setCredentialsProvider(credentialsProvider);

Expand Down
Expand Up @@ -20,7 +20,7 @@
import static ee.jakarta.tck.authorization.util.ShrinkWrap.mavenWar;
import static org.junit.Assert.assertTrue;

import com.gargoylesoftware.htmlunit.DefaultCredentialsProvider;
import org.htmlunit.DefaultCredentialsProvider;
import ee.jakarta.tck.authorization.util.ArquillianBase;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
Expand All @@ -44,7 +44,7 @@ public static Archive<?> createDeployment() {
@Test
public void testAuthenticated() {
DefaultCredentialsProvider credentialsProvider = new DefaultCredentialsProvider();
credentialsProvider.addCredentials("reza", "secret1");
credentialsProvider.addCredentials("reza", "secret1".toCharArray());

getWebClient().setCredentialsProvider(credentialsProvider);

Expand Down
4 changes: 2 additions & 2 deletions tck/common/pom.xml
Expand Up @@ -51,9 +51,9 @@
</dependency>

<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<groupId>org.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
<version>2.70.0</version>
<version>3.11.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down
Expand Up @@ -26,20 +26,18 @@
import java.io.IOException;
import java.net.URL;
import java.util.logging.Logger;

import org.htmlunit.DefaultCssErrorHandler;
import org.htmlunit.FailingHttpStatusCodeException;
import org.htmlunit.Page;
import org.htmlunit.WebClient;
import org.htmlunit.WebResponse;
import org.jboss.arquillian.test.api.ArquillianResource;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.rules.TestWatcher;
import org.junit.runner.Description;

import com.gargoylesoftware.htmlunit.DefaultCssErrorHandler;
import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
import com.gargoylesoftware.htmlunit.Page;
import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.WebResponse;

public class ArquillianBase {

private static final Logger logger = Logger.getLogger(ArquillianBase.class.getName());
Expand Down
4 changes: 2 additions & 2 deletions tck/pom.xml
Expand Up @@ -137,9 +137,9 @@
</dependency>

<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<groupId>org.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
<version>2.70.0</version>
<version>3.11.0</version>
<scope>test</scope>
</dependency>

Expand Down

0 comments on commit c8a25c1

Please sign in to comment.