Skip to content

Commit

Permalink
run formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
nevio18324 committed Jan 14, 2025
1 parent b9d41c8 commit 9c0a6a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ public ResponseEntity<ObjectiveDto> createObjective(@io.swagger.v3.oas.annotatio
@ApiResponses(value = { @ApiResponse(responseCode = "201", description = "Duplicated a given Objective", content = {
@Content(mediaType = "application/json", schema = @Schema(implementation = ObjectiveDto.class)) }) })
@PostMapping("/duplicate")
public ResponseEntity<ObjectiveDto> duplicateObjective(@io.swagger.v3.oas.annotations.parameters.RequestBody(description = "The Objective which should be duplicated as JSON", required = true) @RequestBody DuplicateObjectiveDto duplicateObjectiveDto) {
public ResponseEntity<ObjectiveDto> duplicateObjective(@io.swagger.v3.oas.annotations.parameters.RequestBody(description = "The Objective which should be duplicated as JSON", required = true)
@RequestBody DuplicateObjectiveDto duplicateObjectiveDto) {
Objective objective = objectiveMapper.toObjective(duplicateObjectiveDto.objective());
List<Long> keyResultIds = duplicateObjectiveDto.keyResultIds();
ObjectiveDto duplicatedObjectiveDto = objectiveMapper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,7 @@ void shouldThrowExceptionWhenNotAuthorizedToDuplicateObjective() {

ResponseStatusException exception = assertThrows(ResponseStatusException.class,
() -> objectiveAuthorizationService
.duplicateEntity(objective,
new ArrayList<>()));
.duplicateEntity(objective, new ArrayList<>()));

assertEquals(UNAUTHORIZED, exception.getStatusCode());
assertEquals(reason, exception.getReason());
Expand Down Expand Up @@ -203,8 +202,7 @@ void shouldReturnDuplicatedObjectiveWhenAuthorized() {
.thenReturn(newObjectiveWithKeyResults);

Objective objective = objectiveAuthorizationService
.duplicateEntity(newObjectiveWithoutKeyResults,
keyResults.stream().map(KeyResult::getId).toList());
.duplicateEntity(newObjectiveWithoutKeyResults, keyResults.stream().map(KeyResult::getId).toList());

assertEquals(newObjectiveWithKeyResults, objective);
}
Expand Down

0 comments on commit 9c0a6a1

Please sign in to comment.