Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public class RegistrationController {
@ApiResponse(responseCode = "201", description = "Returns the succesfull add response", content = @Content(mediaType = "application/json"))
@ApiResponse(responseCode = "409", description = "Returns the user already exists response", content = @Content(mediaType = "application/json"))
public HttpResponseDto register(@RequestBody SignUpDto userDto){
System.out.println('test-pr')

return registerLoginServices.registerUser(userDto);
}
Comment on lines 39 to 43
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comemnt

@Operation(description = "Logins the user with Http Basic Authentification", security = {@SecurityRequirement(name="Basic-Authentification")})
Comment on lines 38 to 44
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you do that @Gundwane21

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,13 @@ public void setCreatedAt(Date createdAt) {
}

public int getUserId() {
System.out.println('test-pr')
return userId;
}

public void setUserId(int userId) {
System.out.println('test-pr')

this.userId = userId;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,21 @@ public void getLeaderboardAllTimesTest() {
List<Map<String, Long>> leaderboardAllTimes = leaderboardService.getLeaderboard(TimeInterval.ALL_TIMES);
Assert.assertEquals(result, leaderboardAllTimes);
}
@Test
@DisplayName("Test retrieving leaderboard for All Times2")
public void getLeaderboardAllTimesTest2() {
List<Map<String, Long>> result = new ArrayList<>();
Map<String, Long> map = new HashMap<String, Long>();
map.put("KeremTheMonopolyKing", (long) 100);
Map<String, Long> map2 = new HashMap<String, Long>();
map2.put("GorkemOfRivia", (long) 180);
Map<String, Long> map3 = new HashMap<String, Long>();
map2.put("John", (long) 360);
result.add(map);
Comment on lines 45 to +57
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test

Comment on lines 45 to +57
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test

result.add(map2);
result.add(map3);
when(gameRecordStoreRepository.getLeaderboardAllTimes()).thenReturn(result);
List<Map<String, Long>> leaderboardAllTimes = leaderboardService.getLeaderboard(TimeInterval.ALL_TIMES);
Assert.assertEquals(result, leaderboardAllTimes);
}
}