Applicable commons-logging excludes for libraries (HtmlUnit, Castor XML, Apache HttpClient)

Includes upgrade to HtmlUnit 2.26 and Selenium 3.3.1.

Issue: SPR-14512
This commit is contained in:
Juergen Hoeller
2017-04-06 09:52:56 +02:00
parent 45e7b350bd
commit 699064870f
2 changed files with 34 additions and 17 deletions

View File

@@ -16,6 +16,8 @@
package org.springframework.test.web.servlet.htmlunit.webdriver;
import java.io.IOException;
import com.gargoylesoftware.htmlunit.WebConnection;
import com.gargoylesoftware.htmlunit.WebRequest;
import org.junit.Before;
@@ -25,6 +27,7 @@ import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
import org.openqa.selenium.WebDriverException;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.MatcherAssert.*;
@@ -52,9 +55,10 @@ public class WebConnectionHtmlUnitDriverTests {
@Before
public void setup() throws Exception {
when(this.connection.getResponse(any(WebRequest.class))).thenThrow(new InternalError(""));
when(this.connection.getResponse(any(WebRequest.class))).thenThrow(new IOException(""));
}
@Test
public void getWebConnectionDefaultNotNull() {
assertThat(this.driver.getWebConnection(), notNullValue());
@@ -71,8 +75,8 @@ public class WebConnectionHtmlUnitDriverTests {
this.driver.setWebConnection(this.connection);
assertThat(this.driver.getWebConnection(), equalTo(this.connection));
this.exception.expect(InternalError.class);
this.exception.expect(WebDriverException.class);
this.driver.get("https://example.com");
}
}
}