@@ -108,31 +108,31 @@ public Response send(RequestSender requestSender) {
108
108
109
109
@ Override
110
110
public Response next (FilterableRequestSpecification requestSpecification ,
111
- FilterableResponseSpecification responseSpecification ) {
111
+ FilterableResponseSpecification responseSpecification ) {
112
112
return response ;
113
113
}
114
114
};
115
115
}
116
116
117
117
public static Iterable <Object []> requestData () {
118
118
return Arrays .asList (
119
- new Object [] { JSON_TYPE , "{\" object\" : {\" key\" : \" value\" }}" , "{\" object\" : {\" key\" : \" value\" }}" , JsonPrettier . INSTANCE ,
120
- null , null },
121
- new Object [] { "application/xml" , "<test><key><value>value</value></key></test>" ,
122
- "<test><key><value>value</value></key></test>" , XmlPrettier .INSTANCE , null , null }
119
+ new Object []{ JSON_TYPE , "{\" object\" : {\" key\" : \" value\" }}" , "{\" object\" : {\" key\" : \" value\" }}" ,
120
+ JsonPrettier . INSTANCE , null , null },
121
+ new Object []{ "application/xml" , "<test><key><value>value</value></key></test>" ,
122
+ "<test><key><value>value</value></key></test>" , XmlPrettier .INSTANCE , null , null }
123
123
);
124
124
}
125
125
126
126
private void runFilter (FilterableRequestSpecification requestSpecification , Response responseObject ,
127
- Consumer <MockedStatic <ReportPortal >> mocks , OrderedFilter filter ) {
127
+ Consumer <MockedStatic <ReportPortal >> mocks , OrderedFilter filter ) {
128
128
try (MockedStatic <ReportPortal > utilities = Mockito .mockStatic (ReportPortal .class )) {
129
129
mocks .accept (utilities );
130
130
filter .filter (requestSpecification , null , getFilterContext (responseObject ));
131
131
}
132
132
}
133
133
134
134
private void runFilter (FilterableRequestSpecification requestSpecification , Response responseObject ,
135
- Consumer <MockedStatic <ReportPortal >> mocks ) {
135
+ Consumer <MockedStatic <ReportPortal >> mocks ) {
136
136
runFilter (requestSpecification , responseObject , mocks , new ReportPortalRestAssuredLoggingFilter (42 , LogLevel .INFO ));
137
137
}
138
138
@@ -147,7 +147,7 @@ private List<String> runFilterTextMessageCapture(FilterableRequestSpecification
147
147
}
148
148
149
149
private List <ReportPortalMessage > runFilterBinaryMessageCapture (FilterableRequestSpecification requestSpecification ,
150
- Response responseObject ) {
150
+ Response responseObject ) {
151
151
ArgumentCaptor <ReportPortalMessage > logCapture = ArgumentCaptor .forClass (ReportPortalMessage .class );
152
152
runFilter (
153
153
requestSpecification ,
@@ -222,7 +222,7 @@ public void test_rest_assured_logger_null_values() {
222
222
@ MethodSource ("requestData" )
223
223
@ SuppressWarnings ("rawtypes" )
224
224
public void test_rest_assured_logger_text_body (String mimeType , Object requestBody , Object responseBody ,
225
- Function <String , String > prettier ) {
225
+ Function <String , String > prettier ) {
226
226
FilterableRequestSpecification requestSpecification = mockBasicRequest (mimeType );
227
227
when (requestSpecification .getBody ()).thenReturn (requestBody );
228
228
@@ -244,7 +244,7 @@ public void test_rest_assured_logger_text_body(String mimeType, Object requestBo
244
244
}
245
245
246
246
public static Iterable <Object []> testTypes () {
247
- return Arrays .asList (new Object [] { HTML_TYPE }, new Object [] { null });
247
+ return Arrays .asList (new Object []{ HTML_TYPE }, new Object []{ null });
248
248
}
249
249
250
250
@ ParameterizedTest
@@ -361,7 +361,7 @@ private byte[] getResource(String imagePath) {
361
361
private static final String WILDCARD_TYPE = "*/*" ;
362
362
363
363
@ ParameterizedTest
364
- @ ValueSource (strings = { IMAGE_TYPE , WILDCARD_TYPE })
364
+ @ ValueSource (strings = {IMAGE_TYPE , WILDCARD_TYPE })
365
365
@ SuppressWarnings ("rawtypes" )
366
366
public void test_rest_assured_logger_image_body (String mimeType ) throws IOException {
367
367
FilterableRequestSpecification requestSpecification = mockBasicRequest (mimeType );
@@ -461,7 +461,7 @@ private MultiPartSpecification getBinaryPart(String mimeType, String filePath, b
461
461
}
462
462
463
463
@ ParameterizedTest
464
- @ ValueSource (booleans = { true , false })
464
+ @ ValueSource (booleans = {true , false })
465
465
public void test_rest_assured_logger_image_multipart (boolean isFile ) throws IOException {
466
466
byte [] image = getResource (IMAGE );
467
467
String imageType = ContentType .IMAGE_JPEG .getMimeType ();
@@ -557,13 +557,13 @@ public void test_rest_assured_logger_text_and_image_multipart() throws IOExcepti
557
557
558
558
public static Iterable <Object []> invalidContentTypes () {
559
559
return Arrays .asList (
560
- new Object [] { "" , ContentType .APPLICATION_OCTET_STREAM .getMimeType () },
561
- new Object [] { null , ContentType .APPLICATION_OCTET_STREAM .getMimeType () },
562
- new Object [] { "*/*" , "*/*" },
563
- new Object [] { "something invalid" , "something invalid" },
564
- new Object [] { "/" , "/" },
565
- new Object [] { "#*'\\ `%^!@/\" $;" , "#*'\\ `%^!@/\" $" },
566
- new Object [] { "a/a;F#%235f\\ =f324$%^&" , "a/a" }
560
+ new Object []{ "" , ContentType .APPLICATION_OCTET_STREAM .getMimeType ()},
561
+ new Object []{ null , ContentType .APPLICATION_OCTET_STREAM .getMimeType ()},
562
+ new Object []{ "*/*" , "*/*" },
563
+ new Object []{ "something invalid" , "something invalid" },
564
+ new Object []{ "/" , "/" },
565
+ new Object []{ "#*'\\ `%^!@/\" $;" , "#*'\\ `%^!@/\" $" },
566
+ new Object []{ "a/a;F#%235f\\ =f324$%^&" , "a/a" }
567
567
);
568
568
}
569
569
0 commit comments