Skip to content

Commit

Permalink
Merge pull request #935 from puzzle/renovate/net.revelc.code.formatte…
Browse files Browse the repository at this point in the history
…r-formatter-maven-plugin-2.x

Update dependency net.revelc.code.formatter:formatter-maven-plugin to v2.24.1
  • Loading branch information
peggimann authored Oct 21, 2024
2 parents b9d81e0 + 3075c7d commit 3382551
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 16 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/format-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Format backend
run: mvn formatter:format -f backend/pom.xml

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
Expand All @@ -57,6 +54,9 @@ jobs:
server-id: github
settings-path: ${{github.workspace}}

- name: Format backend
run: mvn formatter:format -f backend/pom.xml

- name: Commit and Push formated backend
shell: bash
env:
Expand Down
2 changes: 1 addition & 1 deletion backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@
<plugin>
<groupId>net.revelc.code.formatter</groupId>
<artifactId>formatter-maven-plugin</artifactId>
<version>2.23.0</version>
<version>2.24.1</version>
<configuration>
<compilerSource>${maven.compiler.source}</compilerSource>
<compilerCompliance>${maven.compiler.source}</compilerCompliance>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ void getFilteredOverviewShouldSetWritableProperlyToFalse() {
@Test
void getFilteredOverviewShouldReturnEmptyListWhenNotAuthorized() {
when(authorizationService.updateOrAddAuthorizationUser()).thenReturn(authorizationUser);
when(overviewBusinessService.getFilteredOverview(1L, List.of(adminTeamId), "", authorizationUser)).thenReturn(List.of());
when(overviewBusinessService.getFilteredOverview(1L, List.of(adminTeamId), "", authorizationUser))
.thenReturn(List.of());

List<Overview> overviews = overviewAuthorizationService.getFilteredOverview(1L, List.of(adminTeamId), "");
assertThat(List.of()).hasSameElementsAs(overviews);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ class TeamAuthorizationServiceTest {

@Test
void createEntityShouldReturnTeam() {
when(teamBusinessService.createTeam(teamUnderTest, authorizationService.updateOrAddAuthorizationUser())).thenReturn(teamUnderTest);
when(teamBusinessService.createTeam(teamUnderTest, authorizationService.updateOrAddAuthorizationUser()))
.thenReturn(teamUnderTest);

Team team = teamAuthorizationService.createEntity(teamUnderTest);
assertEquals(teamUnderTest, team);
Expand Down Expand Up @@ -140,9 +141,8 @@ void getAllTeamsShouldReturnAllTeams(boolean isWriteable) {

@Test
void addUsersToTeam_shouldThrowExceptionIfUserNotAuthorized() {
when(authorizationService.updateOrAddAuthorizationUser()).thenReturn(
new AuthorizationUser(defaultUserWithTeams(1L, List.of(), List.of()))
);
when(authorizationService.updateOrAddAuthorizationUser())
.thenReturn(new AuthorizationUser(defaultUserWithTeams(1L, List.of(), List.of())));
assertThrows(OkrResponseStatusException.class, () -> teamAuthorizationService.addUsersToTeam(1L, List.of()));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,11 @@ private static AlignmentSelection createAlignmentSelection() {

@Test
void getAlignmentSelectionByQuarterIdAndTeamIdNotShouldReturnListOfAlignmentSelections() {
when(alignmentSelectionPersistenceService.getAlignmentSelectionByQuarterIdAndTeamIdNot(2L,
4L)).thenReturn(List.of(
createAlignmentSelection()));
when(alignmentSelectionPersistenceService.getAlignmentSelectionByQuarterIdAndTeamIdNot(2L, 4L))
.thenReturn(List.of(createAlignmentSelection()));

List<AlignmentSelection> alignmentSelections = alignmentSelectionBusinessService.getAlignmentSelectionByQuarterIdAndTeamIdNot(
2L,
4L);
List<AlignmentSelection> alignmentSelections = alignmentSelectionBusinessService
.getAlignmentSelectionByQuarterIdAndTeamIdNot(2L, 4L);

assertEquals(1, alignmentSelections.size());
verify(alignmentSelectionPersistenceService, times(1)).getAlignmentSelectionByQuarterIdAndTeamIdNot(2L, 4L);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void setUp() {
when(keyResultPersistenceService.getModelName()).thenReturn("KeyResult");
doThrow(new ResponseStatusException(HttpStatus.NOT_FOUND,
String.format("%s with id %s not found", keyResultPersistenceService.getModelName(), 2L)))
.when(keyResultPersistenceService).findById(2L);
.when(keyResultPersistenceService).findById(2L);
}

@Spy
Expand Down

0 comments on commit 3382551

Please sign in to comment.