Skip to content

Commit b0b965a

Browse files
committed
fixup! Improve readability of unit tests
1 parent 8eed211 commit b0b965a

File tree

1 file changed

+37
-38
lines changed

1 file changed

+37
-38
lines changed

solid/src/test/java/com/inrupt/client/solid/SolidClientTest.java

Lines changed: 37 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -493,76 +493,75 @@ public int statusCode() {
493493
}
494494

495495
private static ProblemDetails mockProblemDetails(final String title, final String details, final int status) {
496-
return new ProblemDetails(
497-
URI.create("https://example.org/type"),
498-
title,
499-
details,
500-
status,
501-
URI.create("https://example.org/instance")
496+
return new ProblemDetails(URI.create("https://example.org/type"),
497+
title,
498+
details,
499+
status,
500+
URI.create("https://example.org/instance")
502501
);
503502
}
504503

505504
private static Stream<Arguments> testRfc9457Exceptions() {
506505
return Stream.of(
507506
arguments(
508-
BadRequestException.class,
509-
mockProblemDetails("Bad Request", "Some details", 400)
507+
BadRequestException.class,
508+
mockProblemDetails("Bad Request", "Some details", 400)
510509
),
511510
arguments(
512-
UnauthorizedException.class,
513-
mockProblemDetails("Unauthorized", "Some details", 401)
511+
UnauthorizedException.class,
512+
mockProblemDetails("Unauthorized", "Some details", 401)
514513
),
515514
arguments(
516-
ForbiddenException.class,
517-
mockProblemDetails("Forbidden", "Some details", 403)
515+
ForbiddenException.class,
516+
mockProblemDetails("Forbidden", "Some details", 403)
518517
),
519518
arguments(
520-
NotFoundException.class,
521-
mockProblemDetails("Not Found", "Some details", 404)
519+
NotFoundException.class,
520+
mockProblemDetails("Not Found", "Some details", 404)
522521
),
523522
arguments(
524-
MethodNotAllowedException.class,
525-
mockProblemDetails("Method Not Allowed", "Some details", 405)
523+
MethodNotAllowedException.class,
524+
mockProblemDetails("Method Not Allowed", "Some details", 405)
526525
),
527526
arguments(
528-
NotAcceptableException.class,
529-
mockProblemDetails("Not Acceptable", "Some details", 406)
527+
NotAcceptableException.class,
528+
mockProblemDetails("Not Acceptable", "Some details", 406)
530529
),
531530
arguments(
532-
ConflictException.class,
533-
mockProblemDetails("Conflict", "Some details", 409)
531+
ConflictException.class,
532+
mockProblemDetails("Conflict", "Some details", 409)
534533
),
535534
arguments(
536-
GoneException.class,
537-
mockProblemDetails("Gone", "Some details", 410)
535+
GoneException.class,
536+
mockProblemDetails("Gone", "Some details", 410)
538537
),
539538
arguments(
540-
PreconditionFailedException.class,
541-
mockProblemDetails("Precondition Failed", "Some details", 412)
539+
PreconditionFailedException.class,
540+
mockProblemDetails("Precondition Failed", "Some details", 412)
542541
),
543542
arguments(
544-
UnsupportedMediaTypeException.class,
545-
mockProblemDetails("Unsupported Media Type", "Some details", 415)
543+
UnsupportedMediaTypeException.class,
544+
mockProblemDetails("Unsupported Media Type", "Some details", 415)
546545
),
547546
arguments(
548-
TooManyRequestsException.class,
549-
mockProblemDetails("Too Many Requests", "Some details", 429)
547+
TooManyRequestsException.class,
548+
mockProblemDetails("Too Many Requests", "Some details", 429)
550549
),
551550
arguments(
552-
InternalServerErrorException.class,
553-
mockProblemDetails("Internal Server Error", "Some details", 500)
551+
InternalServerErrorException.class,
552+
mockProblemDetails("Internal Server Error", "Some details", 500)
554553
),
555554
arguments(
556-
// Custom errors that do not map to a predefined Exception class
557-
// default to the generic SolidClientException
558-
SolidClientException.class,
559-
mockProblemDetails("I'm a Teapot", "Some details", 418)
555+
// Custom errors that do not map to a predefined Exception class
556+
// default to the generic SolidClientException
557+
SolidClientException.class,
558+
mockProblemDetails("I'm a Teapot", "Some details", 418)
560559
),
561560
arguments(
562-
// Custom errors that do not map to a predefined Exception class
563-
// default to the generic SolidClientException.
564-
SolidClientException.class,
565-
mockProblemDetails("Custom server error", "Some details", 599)
561+
// Custom errors that do not map to a predefined Exception class
562+
// default to the generic SolidClientException.
563+
SolidClientException.class,
564+
mockProblemDetails("Custom server error", "Some details", 599)
566565
)
567566
);
568567
}

0 commit comments

Comments
 (0)