1
2
3
4
5 package com.jcabi.http.wire;
6
7 import com.jcabi.http.request.JdkRequest;
8 import com.jcabi.http.response.RestResponse;
9 import java.net.HttpURLConnection;
10 import org.junit.jupiter.params.ParameterizedTest;
11 import org.junit.jupiter.params.provider.CsvSource;
12
13
14
15
16
17
18 final class TrustedWireITCase {
19
20
21
22
23
24
25 @ParameterizedTest
26 @CsvSource({
27 "https://expired.badssl.com/",
28 "https://self-signed.badssl.com/",
29 "https://untrusted-root.badssl.com/"
30 })
31 void ignoresSslCertProblems(final String url) throws Exception {
32 new JdkRequest(url)
33 .through(TrustedWire.class)
34 .fetch()
35 .as(RestResponse.class)
36 .assertStatus(HttpURLConnection.HTTP_OK);
37 }
38
39 }