View Javadoc
1   /*
2    * ====================================================================
3    * Licensed to the Apache Software Foundation (ASF) under one
4    * or more contributor license agreements.  See the NOTICE file
5    * distributed with this work for additional information
6    * regarding copyright ownership.  The ASF licenses this file
7    * to you under the Apache License, Version 2.0 (the
8    * "License"); you may not use this file except in compliance
9    * with the License.  You may obtain a copy of the License at
10   *
11   *   http://www.apache.org/licenses/LICENSE-2.0
12   *
13   * Unless required by applicable law or agreed to in writing,
14   * software distributed under the License is distributed on an
15   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16   * KIND, either express or implied.  See the License for the
17   * specific language governing permissions and limitations
18   * under the License.
19   * ====================================================================
20   *
21   * This software consists of voluntary contributions made by many
22   * individuals on behalf of the Apache Software Foundation.  For more
23   * information on the Apache Software Foundation, please see
24   * <http://www.apache.org/>.
25   *
26   */
27  package org.apache.hc.client5.testing.async;
28  
29  import org.apache.hc.core5.http.HttpVersion;
30  import org.apache.hc.core5.http.URIScheme;
31  import org.junit.jupiter.api.DisplayName;
32  import org.junit.jupiter.api.Nested;
33  
34  public class HttpIntegrationTests {
35  
36      @Nested
37      @DisplayName("Fundamentals (HTTP/1.1)")
38      public class Http1 extends TestHttp1Async {
39  
40          public Http1() throws Exception {
41              super(URIScheme.HTTP);
42          }
43  
44      }
45  
46      @Nested
47      @DisplayName("Fundamentals (HTTP/1.1, TLS)")
48      public class Http1Tls extends TestHttp1Async {
49  
50          public Http1Tls() throws Exception {
51              super(URIScheme.HTTPS);
52          }
53  
54      }
55  
56      @Nested
57      @DisplayName("Fundamentals (HTTP/2)")
58      public class H2 extends TestH2Async {
59  
60          public H2() throws Exception {
61              super(URIScheme.HTTP);
62          }
63  
64      }
65  
66      @Nested
67      @DisplayName("Fundamentals (HTTP/2, TLS)")
68      public class H2Tls extends TestH2Async {
69  
70          public H2Tls() throws Exception {
71              super(URIScheme.HTTPS);
72          }
73  
74      }
75  
76      @Nested
77      @DisplayName("Request re-execution (HTTP/1.1)")
78      public class Http1RequestReExecution extends TestHttp1RequestReExecution {
79  
80          public Http1RequestReExecution() throws Exception {
81              super(URIScheme.HTTP);
82          }
83  
84      }
85  
86      @Nested
87      @DisplayName("Request re-execution (HTTP/1.1, TLS)")
88      public class Http1RequestReExecutionTls extends TestHttp1RequestReExecution {
89  
90          public Http1RequestReExecutionTls() throws Exception {
91              super(URIScheme.HTTPS);
92          }
93  
94      }
95  
96      @Nested
97      @DisplayName("HTTP protocol policy (HTTP/1.1)")
98      public class Http1ProtocolPolicy extends TestHttpAsyncProtocolPolicy {
99  
100         public Http1ProtocolPolicy() throws Exception {
101             super(URIScheme.HTTP, HttpVersion.HTTP_1_1);
102         }
103 
104     }
105 
106     @Nested
107     @DisplayName("HTTP protocol policy (HTTP/1.1, TLS)")
108     public class Http1ProtocolPolicyTls extends TestHttpAsyncProtocolPolicy {
109 
110         public Http1ProtocolPolicyTls() throws Exception {
111             super(URIScheme.HTTPS, HttpVersion.HTTP_1_1);
112         }
113 
114     }
115 
116     @Nested
117     @DisplayName("HTTP protocol policy (HTTP/2)")
118     public class H2ProtocolPolicy extends TestHttpAsyncProtocolPolicy {
119 
120         public H2ProtocolPolicy() throws Exception {
121             super(URIScheme.HTTP, HttpVersion.HTTP_2);
122         }
123 
124     }
125 
126     @Nested
127     @DisplayName("HTTP protocol policy (HTTP/2, TLS)")
128     public class H2ProtocolPolicyTls extends TestHttpAsyncProtocolPolicy {
129 
130         public H2ProtocolPolicyTls() throws Exception {
131             super(URIScheme.HTTPS, HttpVersion.HTTP_2);
132         }
133 
134     }
135 
136     @Nested
137     @DisplayName("Redirects (HTTP/1.1)")
138     public class RedirectsHttp1 extends TestHttp1AsyncRedirects {
139 
140         public RedirectsHttp1() throws Exception {
141             super(URIScheme.HTTP);
142         }
143 
144     }
145 
146     @Nested
147     @DisplayName("Redirects (HTTP/1.1, TLS)")
148     public class RedirectsHttp1Tls extends TestHttp1AsyncRedirects {
149 
150         public RedirectsHttp1Tls() throws Exception {
151             super(URIScheme.HTTPS);
152         }
153 
154     }
155 
156     @Nested
157     @DisplayName("Redirects (HTTP/2)")
158     public class RedirectsH2 extends TestH2AsyncRedirect {
159 
160         public RedirectsH2() throws Exception {
161             super(URIScheme.HTTP);
162         }
163 
164     }
165 
166     @Nested
167     @DisplayName("Redirects (HTTP/2, TLS)")
168     public class RedirectsH2Tls extends TestH2AsyncRedirect {
169 
170         public RedirectsH2Tls() throws Exception {
171             super(URIScheme.HTTPS);
172         }
173 
174     }
175 
176 //    @Nested
177 //    @DisplayName("Client authentication (HTTP/1.1)")
178 //    public class AuthenticationHttp1 extends TestHttp1ClientAuthentication {
179 //
180 //        public AuthenticationHttp1() throws Exception {
181 //            super(URIScheme.HTTP);
182 //        }
183 //
184 //    }
185 //
186 //    @Nested
187 //    @DisplayName("Client authentication (HTTP/1.1, TLS)")
188 //    public class AuthenticationHttp1Tls extends TestHttp1ClientAuthentication {
189 //
190 //        public AuthenticationHttp1Tls() throws Exception {
191 //            super(URIScheme.HTTPS);
192 //        }
193 //
194 //    }
195 
196 //    @Nested
197 //    @DisplayName("Client authentication (HTTP/2)")
198 //    public class AuthenticationH2 extends TestH2ClientAuthentication {
199 //
200 //        public AuthenticationH2() throws Exception {
201 //            super(URIScheme.HTTP);
202 //        }
203 //
204 //    }
205 //
206 //    @Nested
207 //    @DisplayName("Client authentication (HTTP/2, TLS)")
208 //    public class AuthenticationH2Tls extends TestH2ClientAuthentication {
209 //
210 //        public AuthenticationH2Tls() throws Exception {
211 //            super(URIScheme.HTTPS);
212 //        }
213 //
214 //    }
215 //
216 }