Skip to content

Commit ca8c20b

Browse files
Vadzim HushchanskouVadzim Hushchanskou
Vadzim Hushchanskou
authored and
Vadzim Hushchanskou
committed
Format fixes
1 parent 8ce1de9 commit ca8c20b

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

src/test/java/com/epam/reportportal/restassured/ReportPortalRestAssuredLoggingFilterTest.java

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -108,31 +108,31 @@ public Response send(RequestSender requestSender) {
108108

109109
@Override
110110
public Response next(FilterableRequestSpecification requestSpecification,
111-
FilterableResponseSpecification responseSpecification) {
111+
FilterableResponseSpecification responseSpecification) {
112112
return response;
113113
}
114114
};
115115
}
116116

117117
public static Iterable<Object[]> requestData() {
118118
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}
123123
);
124124
}
125125

126126
private void runFilter(FilterableRequestSpecification requestSpecification, Response responseObject,
127-
Consumer<MockedStatic<ReportPortal>> mocks, OrderedFilter filter) {
127+
Consumer<MockedStatic<ReportPortal>> mocks, OrderedFilter filter) {
128128
try (MockedStatic<ReportPortal> utilities = Mockito.mockStatic(ReportPortal.class)) {
129129
mocks.accept(utilities);
130130
filter.filter(requestSpecification, null, getFilterContext(responseObject));
131131
}
132132
}
133133

134134
private void runFilter(FilterableRequestSpecification requestSpecification, Response responseObject,
135-
Consumer<MockedStatic<ReportPortal>> mocks) {
135+
Consumer<MockedStatic<ReportPortal>> mocks) {
136136
runFilter(requestSpecification, responseObject, mocks, new ReportPortalRestAssuredLoggingFilter(42, LogLevel.INFO));
137137
}
138138

@@ -147,7 +147,7 @@ private List<String> runFilterTextMessageCapture(FilterableRequestSpecification
147147
}
148148

149149
private List<ReportPortalMessage> runFilterBinaryMessageCapture(FilterableRequestSpecification requestSpecification,
150-
Response responseObject) {
150+
Response responseObject) {
151151
ArgumentCaptor<ReportPortalMessage> logCapture = ArgumentCaptor.forClass(ReportPortalMessage.class);
152152
runFilter(
153153
requestSpecification,
@@ -222,7 +222,7 @@ public void test_rest_assured_logger_null_values() {
222222
@MethodSource("requestData")
223223
@SuppressWarnings("rawtypes")
224224
public void test_rest_assured_logger_text_body(String mimeType, Object requestBody, Object responseBody,
225-
Function<String, String> prettier) {
225+
Function<String, String> prettier) {
226226
FilterableRequestSpecification requestSpecification = mockBasicRequest(mimeType);
227227
when(requestSpecification.getBody()).thenReturn(requestBody);
228228

@@ -244,7 +244,7 @@ public void test_rest_assured_logger_text_body(String mimeType, Object requestBo
244244
}
245245

246246
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});
248248
}
249249

250250
@ParameterizedTest
@@ -361,7 +361,7 @@ private byte[] getResource(String imagePath) {
361361
private static final String WILDCARD_TYPE = "*/*";
362362

363363
@ParameterizedTest
364-
@ValueSource(strings = { IMAGE_TYPE, WILDCARD_TYPE })
364+
@ValueSource(strings = {IMAGE_TYPE, WILDCARD_TYPE})
365365
@SuppressWarnings("rawtypes")
366366
public void test_rest_assured_logger_image_body(String mimeType) throws IOException {
367367
FilterableRequestSpecification requestSpecification = mockBasicRequest(mimeType);
@@ -461,7 +461,7 @@ private MultiPartSpecification getBinaryPart(String mimeType, String filePath, b
461461
}
462462

463463
@ParameterizedTest
464-
@ValueSource(booleans = { true, false })
464+
@ValueSource(booleans = {true, false})
465465
public void test_rest_assured_logger_image_multipart(boolean isFile) throws IOException {
466466
byte[] image = getResource(IMAGE);
467467
String imageType = ContentType.IMAGE_JPEG.getMimeType();
@@ -557,13 +557,13 @@ public void test_rest_assured_logger_text_and_image_multipart() throws IOExcepti
557557

558558
public static Iterable<Object[]> invalidContentTypes() {
559559
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"}
567567
);
568568
}
569569

0 commit comments

Comments
 (0)