@@ -137,26 +137,24 @@ public void tearDownStripeMockUsage() {
137
137
}
138
138
139
139
/**
140
- * {@code params}, {@code requestType} and {@code options} defaults to {@code null}.
140
+ * {@code params} and {@code options} defaults to {@code null}.
141
141
*
142
- * @see BaseStripeTest#verifyRequest(ApiResource.RequestMethod, String, Map,
143
- * ApiResource.RequestType, RequestOptions)
142
+ * @see BaseStripeTest#verifyRequest(ApiResource.RequestMethod, String, Map, RequestOptions)
144
143
*/
145
144
public static <T > void verifyRequest (ApiResource .RequestMethod method , String path )
146
145
throws StripeException {
147
- verifyRequest (method , path , null , null , null );
146
+ verifyRequest (method , path , null , null );
148
147
}
149
148
150
149
/**
151
- * {@code requestType} and {@code options} defaults to {@code null}.
150
+ * {@code options} defaults to {@code null}.
152
151
*
153
- * @see BaseStripeTest#verifyRequest(ApiResource.RequestMethod, String, Map,
154
- * ApiResource.RequestType, RequestOptions)
152
+ * @see BaseStripeTest#verifyRequest(ApiResource.RequestMethod, String, Map, RequestOptions)
155
153
*/
156
154
public static <T > void verifyRequest (
157
155
ApiResource .RequestMethod method , String path , Map <String , Object > params )
158
156
throws StripeException {
159
- verifyRequest (method , path , params , null , null );
157
+ verifyRequest (method , path , params , null );
160
158
}
161
159
162
160
/**
@@ -165,15 +163,12 @@ public static <T> void verifyRequest(
165
163
* @param method HTTP method (GET, POST or DELETE)
166
164
* @param path request path (e.g. "/v1/charges"). Can also be an abolute URL.
167
165
* @param params map containing the parameters. If null, the parameters are not checked.
168
- * @param requestType request type (NORMAL or MULTIPART). If null, the request type is not
169
- * checked.
170
166
* @param options request options. If null, the options are not checked.
171
167
*/
172
168
public static <T > void verifyRequest (
173
169
ApiResource .RequestMethod method ,
174
170
String path ,
175
171
Map <String , Object > params ,
176
- ApiResource .RequestType requestType ,
177
172
RequestOptions options )
178
173
throws StripeException {
179
174
String url ;
@@ -191,9 +186,6 @@ public static <T> void verifyRequest(
191
186
? Mockito .argThat (new ParamMapMatcher (params ))
192
187
: Mockito .<Map <String , Object >>any (),
193
188
Mockito .<Class <T >>any (),
194
- (requestType != null )
195
- ? Mockito .eq (requestType )
196
- : Mockito .any (ApiResource .RequestType .class ),
197
189
(options != null )
198
190
? Mockito .argThat (new RequestOptionsMatcher (options ))
199
191
: Mockito .<RequestOptions >any ());
@@ -210,22 +202,22 @@ public static <T> void verifyNoMoreRequests() {
210
202
}
211
203
212
204
/**
213
- * {@code params}, {@code requestType} and {@code options} defaults to {@code null}.
205
+ * {@code params} and {@code options} defaults to {@code null}.
214
206
*
215
- * @see BaseStripeTest#stubRequest(ApiResource.RequestMethod, String, Map,
216
- * ApiResource.RequestType, RequestOptions, Class, String)
207
+ * @see BaseStripeTest#stubRequest(ApiResource.RequestMethod, String, Map, RequestOptions, Class,
208
+ * String)
217
209
*/
218
210
public static <T > void stubRequest (
219
211
ApiResource .RequestMethod method , String path , Class <T > clazz , String response )
220
212
throws StripeException {
221
- stubRequest (method , path , null , null , null , clazz , response );
213
+ stubRequest (method , path , null , null , clazz , response );
222
214
}
223
215
224
216
/**
225
- * {@code requestType} and {@code options} defaults to {@code null}.
217
+ * {@code options} defaults to {@code null}.
226
218
*
227
- * @see BaseStripeTest#stubRequest(ApiResource.RequestMethod, String, Map,
228
- * ApiResource.RequestType, RequestOptions, Class, String)
219
+ * @see BaseStripeTest#stubRequest(ApiResource.RequestMethod, String, Map, RequestOptions, Class,
220
+ * String)
229
221
*/
230
222
public static <T > void stubRequest (
231
223
ApiResource .RequestMethod method ,
@@ -234,7 +226,7 @@ public static <T> void stubRequest(
234
226
Class <T > clazz ,
235
227
String response )
236
228
throws StripeException {
237
- stubRequest (method , path , params , null , null , clazz , response );
229
+ stubRequest (method , path , params , null , clazz , response );
238
230
}
239
231
240
232
/**
@@ -244,8 +236,6 @@ public static <T> void stubRequest(
244
236
* @param method HTTP method (GET, POST or DELETE)
245
237
* @param path request path (e.g. "/v1/charges"). Can also be an abolute URL.
246
238
* @param params map containing the parameters. If null, the parameters are not checked.
247
- * @param requestType request type (NORMAL or MULTIPART). If null, the request type is not
248
- * checked.
249
239
* @param options request options. If null, the options are not checked.
250
240
* @param clazz Class of the API resource that will be returned for the stubbed request.
251
241
* @param response JSON payload of the API resource that will be returned for the stubbed request.
@@ -254,7 +244,6 @@ public static <T> void stubRequest(
254
244
ApiResource .RequestMethod method ,
255
245
String path ,
256
246
Map <String , Object > params ,
257
- ApiResource .RequestType requestType ,
258
247
RequestOptions options ,
259
248
Class <T > clazz ,
260
249
String response )
@@ -275,9 +264,6 @@ public static <T> void stubRequest(
275
264
? Mockito .argThat (new ParamMapMatcher (params ))
276
265
: Mockito .<Map <String , Object >>any (),
277
266
Mockito .<Class <T >>any (),
278
- (requestType != null )
279
- ? Mockito .eq (requestType )
280
- : Mockito .any (ApiResource .RequestType .class ),
281
267
(options != null )
282
268
? Mockito .argThat (new RequestOptionsMatcher (options ))
283
269
: Mockito .<RequestOptions >any ());
@@ -292,7 +278,6 @@ public static <T> void stubOAuthRequest(Class<T> clazz, String response) throws
292
278
Mockito .anyString (),
293
279
Mockito .<Map <String , Object >>any (),
294
280
Mockito .<Class <T >>any (),
295
- Mockito .any (ApiResource .RequestType .class ),
296
281
Mockito .<RequestOptions >any ());
297
282
}
298
283
0 commit comments