Skip to content
Merged
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 @@ -8,7 +8,7 @@
@Repository
public class GuestUserRepository implements UserRepository {

private final Map<String, User> guestUsers = new HashMap<>();
public final Map<String, User> guestUsers = new HashMap<>();

@Override
@NonNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler;
import tools.jackson.databind.exc.InvalidTypeIdException;

@Order(Ordered.HIGHEST_PRECEDENCE)
@ControllerAdvice
Expand All @@ -29,11 +28,6 @@ public class ControllerExceptionHandler extends ResponseEntityExceptionHandler {
return responseOf(HttpServletResponse.SC_BAD_REQUEST, exception);
}

@ExceptionHandler(InvalidTypeIdException.class)
public ResponseEntity<@NonNull String> handleInvalidType(InvalidTypeIdException exception) {
return ResponseEntity.badRequest().body("Unknown DTO type.");
}

private ResponseEntity<@NonNull ErrorResponse> responseOf(int status, Exception exception) {
return ResponseEntity
.status(status)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class GameController {
private final GameManager gameManager;

@GetMapping("/{gameUUID}/lobby")
private LobbyCodeResponse lobby(@PathVariable UUID gameUUID) throws MatchNotFoundException {
public LobbyCodeResponse lobby(@PathVariable UUID gameUUID) throws MatchNotFoundException {
return new LobbyCodeResponse(lobbyManager.findLobbyByMatch(gameUUID));
}

Expand Down Expand Up @@ -73,7 +73,7 @@ public Map<ResourceType, Integer> grantedResources(@PathVariable UUID gameUUID,
}

@PostMapping("/{gameUUID}/makeMove")
private void playerAction(@PathVariable UUID gameUUID,
public void playerAction(@PathVariable UUID gameUUID,
@RequestBody PlayerActionDTO request
) throws InvalidBuildRequestException, MoveHasntBeenImplementedException {
gameManager.handlePlayerAction(gameUUID, AuthUtils.getAuthenticatedUser(), request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static void randomlyBuildInitialStructures(Match match, BuildingABuilding
Set<List<AxialPosition>> corners = Set.copyOf(validator.getCorners());
for (PlayerRepresentation player: match.getPlayers().getPlayers()){
for (int i = 0; i < 2; i++){ // Place for each player two "SETTLEMENT", each with a "STREET"
if (attempts >= 100) throw new TooLittleSpaceException();
if (attempts >= 500) throw new TooLittleSpaceException();
int rand = new SecureRandom().nextInt(corners.size());
List<AxialPosition> settlementPos = new ArrayList<>(corners).get(rand);
BuildActionDTO settlement = new BuildActionDTO(StructureType.SETTLEMENT, settlementPos);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import de.hexfieldsstudio.hexfieldsdominion.game.types.StructureType;

public class MissingAxialPositionsException extends InvalidDtoException {
public MissingAxialPositionsException(StructureType type, int recievedAxialPositions) {
super("Structure type '%s' with '%s' Axial Positions is invalid, expected: '%s'".formatted(type.name(), type.getPosAmount(), recievedAxialPositions));
public MissingAxialPositionsException(StructureType type, int receivedAxialPositions) {
super("Structure type '%s' with '%s' Axial Positions is invalid, expected: '%s'".formatted(type.name(), type.getPosAmount(), receivedAxialPositions));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ public GamePlayers(Lobby lobby) {
}

private List<PlayerRepresentation> createPlayerRepresentationsForLobby(Lobby lobby) {
return lobby.getPlayers().stream()
// new ArrayList to prevent ConcurrentModificationException
return new ArrayList<>(lobby.getPlayers()).stream()
.map(PlayerRepresentation::new)
.toList();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ public class PlayerHueFactory {
public int generateHueFromHash(String username) {
String saltedUsername = username + "@hexfields"; // Add a salt to ensure more variability
int hash = saltedUsername.hashCode();
return hash % 360; // Extract hue component (0-360)
return Math.abs(hash % 360); // Extract hue component (0-360)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

public class TradingHandler {

private static final int GIVE_GET_RATIO = 4; // (e.g. give:get 4:1 -> 4 / 1)
public static final int GIVE_GET_RATIO = 4; // (e.g. give:get 4:1 -> 4 / 1)

@Getter
private final Map<Integer, PlayerTrade> playerTrades = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
public class Lobby implements NoHeartbeatListener {

private final HeartbeatHandler heartbeatHandler;
private final List<Player> players = new ArrayList<>();
private final List<Player> players = Collections.synchronizedList(new ArrayList<>());
private boolean hasAccountPlayer = false;
private int nextPlayerId = 0;
@Setter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
@RequiredArgsConstructor
public class LobbyController {

public static final int BOARD_RADIUS = 3; // TODO: load boardRadius from configuration in the future

Check warning on line 29 in src/main/java/de/hexfieldsstudio/hexfieldsdominion/lobby/LobbyController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Complete the task associated to this TODO comment.

See more on https://sonarcloud.io/project/issues?id=Hexfields-Studio_HexfieldsDominion-Backend&issues=AZ-ogDkZ2MKX3snDQ4Hl&open=AZ-ogDkZ2MKX3snDQ4Hl&pullRequest=65

private final LobbyManager lobbyManager;

@PatchMapping(produces = "application/json")
Expand Down Expand Up @@ -60,9 +62,11 @@
}

@PostMapping("/{lobbyCode}/heartbeat")
public void heartbeat(@PathVariable String lobbyCode, @RequestBody HeartbeatDTO dto) throws LobbyNotFoundException {
public void heartbeat(@PathVariable String lobbyCode, @RequestBody HeartbeatDTO dto, HttpServletResponse response) throws LobbyNotFoundException {
Lobby lobby = lobbyManager.findOccupiedLobbyOrThrow(lobbyCode);
lobby.getHeartbeatHandler().resetTimer(dto.playerId());

response.setStatus(HttpServletResponse.SC_OK);
}

@GetMapping("/{lobbyCode}/events")
Expand All @@ -75,7 +79,7 @@
@PostMapping("/{lobbyCode}/match")
public LobbyManager.CreatedMatchResponse match(@PathVariable String lobbyCode) throws LobbyNotFoundException, NotOwnerOfLobbyException, TooLittleSpaceException {
Lobby lobby = lobbyManager.findOccupiedLobbyOrThrow(lobbyCode);
Match match = lobbyManager.createMatchForLobby(lobby, AuthUtils.getAuthenticatedUser());
Match match = lobbyManager.createMatchForLobby(lobby, AuthUtils.getAuthenticatedUser(), BOARD_RADIUS);
return new LobbyManager.CreatedMatchResponse(match);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,11 @@ private void notifyLobbyUpdate(Lobby lobby) {
sendEvent(allEmitters(lobbyCode), "lobbyUpdate", players, lobbyCode);
}

public Match createMatchForLobby(Lobby lobby, User user) throws TooLittleSpaceException, InvalidRadiusException, NotOwnerOfLobbyException {
public Match createMatchForLobby(Lobby lobby, User user, int boardRadius) throws TooLittleSpaceException, InvalidRadiusException, NotOwnerOfLobbyException {
if (!lobby.isOwner(user.getUsername())) {
throw new NotOwnerOfLobbyException();
}

int boardRadius = 3; // TODO: load boardRadius from configuration in the future
if (!(3 <= boardRadius && boardRadius <= 6)) throw new InvalidRadiusException(boardRadius);

// random uuid could be replaced in the future to ensure uniqueness
Expand Down Expand Up @@ -160,7 +159,7 @@ public JoinedLobbyResponse(Player player, Lobby lobby) {
this(new CreatedPlayer(player), lobby.isOwner(player.getUsername()));
}

private record CreatedPlayer(String username, int id, boolean isAccount) {
public record CreatedPlayer(String username, int id, boolean isAccount) {
public CreatedPlayer(Player player) {
this(player.getUsername(), player.getId(), player.isAccount());
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package de.hexfieldsstudio.hexfieldsdominion;

import de.hexfieldsstudio.hexfieldsdominion.account.*;

Check warning on line 3 in src/test/java/de/hexfieldsstudio/hexfieldsdominion/RootControllerTest.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this unused import 'de.hexfieldsstudio.hexfieldsdominion.account'.

See more on https://sonarcloud.io/project/issues?id=Hexfields-Studio_HexfieldsDominion-Backend&issues=AZ-ogDo52MKX3snDQ4H6&open=AZ-ogDo52MKX3snDQ4H6&pullRequest=65
import de.hexfieldsstudio.hexfieldsdominion.account.dto.LoginDTO;

Check warning on line 4 in src/test/java/de/hexfieldsstudio/hexfieldsdominion/RootControllerTest.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this unused import 'de.hexfieldsstudio.hexfieldsdominion.account.dto.LoginDTO'.

See more on https://sonarcloud.io/project/issues?id=Hexfields-Studio_HexfieldsDominion-Backend&issues=AZ-ogDo52MKX3snDQ4H7&open=AZ-ogDo52MKX3snDQ4H7&pullRequest=65
import de.hexfieldsstudio.hexfieldsdominion.account.dto.RegisterDTO;

Check warning on line 5 in src/test/java/de/hexfieldsstudio/hexfieldsdominion/RootControllerTest.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this unused import 'de.hexfieldsstudio.hexfieldsdominion.account.dto.RegisterDTO'.

See more on https://sonarcloud.io/project/issues?id=Hexfields-Studio_HexfieldsDominion-Backend&issues=AZ-ogDo52MKX3snDQ4H8&open=AZ-ogDo52MKX3snDQ4H8&pullRequest=65
import de.hexfieldsstudio.hexfieldsdominion.account.token.SseTokenService;

Check warning on line 6 in src/test/java/de/hexfieldsstudio/hexfieldsdominion/RootControllerTest.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this unused import 'de.hexfieldsstudio.hexfieldsdominion.account.token.SseTokenService'.

See more on https://sonarcloud.io/project/issues?id=Hexfields-Studio_HexfieldsDominion-Backend&issues=AZ-ogDo52MKX3snDQ4H9&open=AZ-ogDo52MKX3snDQ4H9&pullRequest=65
import de.hexfieldsstudio.hexfieldsdominion.account.user.User;

Check warning on line 7 in src/test/java/de/hexfieldsstudio/hexfieldsdominion/RootControllerTest.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this unused import 'de.hexfieldsstudio.hexfieldsdominion.account.user.User'.

See more on https://sonarcloud.io/project/issues?id=Hexfields-Studio_HexfieldsDominion-Backend&issues=AZ-ogDo52MKX3snDQ4H-&open=AZ-ogDo52MKX3snDQ4H-&pullRequest=65
import jakarta.servlet.http.Cookie;

Check warning on line 8 in src/test/java/de/hexfieldsstudio/hexfieldsdominion/RootControllerTest.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this unused import 'jakarta.servlet.http.Cookie'.

See more on https://sonarcloud.io/project/issues?id=Hexfields-Studio_HexfieldsDominion-Backend&issues=AZ-ogDo52MKX3snDQ4H_&open=AZ-ogDo52MKX3snDQ4H_&pullRequest=65
import jakarta.servlet.http.HttpServletResponse;

Check warning on line 9 in src/test/java/de/hexfieldsstudio/hexfieldsdominion/RootControllerTest.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this unused import 'jakarta.servlet.http.HttpServletResponse'.

See more on https://sonarcloud.io/project/issues?id=Hexfields-Studio_HexfieldsDominion-Backend&issues=AZ-ogDo52MKX3snDQ4IA&open=AZ-ogDo52MKX3snDQ4IA&pullRequest=65
import org.jspecify.annotations.NonNull;

Check warning on line 10 in src/test/java/de/hexfieldsstudio/hexfieldsdominion/RootControllerTest.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this unused import 'org.jspecify.annotations.NonNull'.

See more on https://sonarcloud.io/project/issues?id=Hexfields-Studio_HexfieldsDominion-Backend&issues=AZ-ogDo52MKX3snDQ4IB&open=AZ-ogDo52MKX3snDQ4IB&pullRequest=65
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;

Check warning on line 14 in src/test/java/de/hexfieldsstudio/hexfieldsdominion/RootControllerTest.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this unused import 'org.mockito.Mock'.

See more on https://sonarcloud.io/project/issues?id=Hexfields-Studio_HexfieldsDominion-Backend&issues=AZ-ogDo52MKX3snDQ4IC&open=AZ-ogDo52MKX3snDQ4IC&pullRequest=65
import org.mockito.MockedStatic;

Check warning on line 15 in src/test/java/de/hexfieldsstudio/hexfieldsdominion/RootControllerTest.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this unused import 'org.mockito.MockedStatic'.

See more on https://sonarcloud.io/project/issues?id=Hexfields-Studio_HexfieldsDominion-Backend&issues=AZ-ogDo52MKX3snDQ4ID&open=AZ-ogDo52MKX3snDQ4ID&pullRequest=65
import org.mockito.junit.jupiter.MockitoExtension;
import org.springframework.http.ResponseEntity;

Check warning on line 17 in src/test/java/de/hexfieldsstudio/hexfieldsdominion/RootControllerTest.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this unused import 'org.springframework.http.ResponseEntity'.

See more on https://sonarcloud.io/project/issues?id=Hexfields-Studio_HexfieldsDominion-Backend&issues=AZ-ogDo52MKX3snDQ4IE&open=AZ-ogDo52MKX3snDQ4IE&pullRequest=65

import java.util.Optional;

Check warning on line 19 in src/test/java/de/hexfieldsstudio/hexfieldsdominion/RootControllerTest.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this unused import 'java.util.Optional'.

See more on https://sonarcloud.io/project/issues?id=Hexfields-Studio_HexfieldsDominion-Backend&issues=AZ-ogDo52MKX3snDQ4IF&open=AZ-ogDo52MKX3snDQ4IF&pullRequest=65
import java.util.function.Function;

Check warning on line 20 in src/test/java/de/hexfieldsstudio/hexfieldsdominion/RootControllerTest.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this unused import 'java.util.function.Function'.

See more on https://sonarcloud.io/project/issues?id=Hexfields-Studio_HexfieldsDominion-Backend&issues=AZ-ogDo52MKX3snDQ4IG&open=AZ-ogDo52MKX3snDQ4IG&pullRequest=65

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockito.Mockito.*;

Check warning on line 23 in src/test/java/de/hexfieldsstudio/hexfieldsdominion/RootControllerTest.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this unused import 'org.mockito.Mockito'.

See more on https://sonarcloud.io/project/issues?id=Hexfields-Studio_HexfieldsDominion-Backend&issues=AZ-ogDo52MKX3snDQ4IH&open=AZ-ogDo52MKX3snDQ4IH&pullRequest=65

@ExtendWith(MockitoExtension.class)
class RootControllerTest {

@InjectMocks
private RootController rootController;

@Test
void testRoot() {
assertEquals("OK", rootController.root());
}

}
13 changes: 13 additions & 0 deletions src/test/java/de/hexfieldsstudio/hexfieldsdominion/TestUtils.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package de.hexfieldsstudio.hexfieldsdominion;

import static org.junit.jupiter.api.Assertions.*;

public class TestUtils {

public static void assertLobbyCodeValid(String lobbyCode) {
assertNotNull(lobbyCode);
assertEquals(7, lobbyCode.length());
assertTrue(lobbyCode.matches("^[A-Z0-9]+$"));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.*;

@SpringBootTest
class AuthUtilsIT {
Expand All @@ -31,14 +30,14 @@ void testGetAuthenticatedUserSuccess() {
void testGetAuthenticatedUserFailNoAuthentication() {
SecurityContextHolder.getContext().setAuthentication(null);

assertThrows(RuntimeException.class, AuthUtils::getAuthenticatedUser);
assertThrowsExactly(RuntimeException.class, AuthUtils::getAuthenticatedUser);
}

@Test
void testGetAuthenticatedUserFailNotUser() {
SecurityContextHolder.getContext().setAuthentication(new UsernamePasswordAuthenticationToken("invalid", null));

assertThrows(RuntimeException.class, AuthUtils::getAuthenticatedUser);
assertThrowsExactly(RuntimeException.class, AuthUtils::getAuthenticatedUser);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.security.crypto.password.PasswordEncoder;

import java.util.Arrays;
import java.util.Optional;
import java.util.stream.Stream;

Expand Down Expand Up @@ -108,7 +109,7 @@ void testRegisterSuccess() {
void testRegisterFailInvalidCredentials(String username, String password) {
RegisterDTO registerDTO = new RegisterDTO(username, password);

assertThrows(InvalidCharactersException.class, () -> authenticationService.register(registerDTO));
assertThrowsExactly(InvalidCharactersException.class, () -> authenticationService.register(registerDTO));

assertFalse(allUserRepository.findByUsername(username).isPresent());
}
Expand All @@ -118,7 +119,7 @@ void testRegisterFailUserAlreadyExists() {
RegisterDTO registerDTO = new RegisterDTO("testuser", "somePw");
authenticationService.register(registerDTO);

assertThrows(UserAlreadyExistsException.class, () -> authenticationService.register(registerDTO));
assertThrowsExactly(UserAlreadyExistsException.class, () -> authenticationService.register(registerDTO));
}

@Test
Expand Down Expand Up @@ -151,7 +152,7 @@ void testLoginSuccess() {
void testLoginFailUnknownUser() {
LoginDTO loginDTO = new LoginDTO("testuser", "testpw");

assertThrows(InvalidCredentialsException.class, () -> authenticationService.login(loginDTO));
assertThrowsExactly(InvalidCredentialsException.class, () -> authenticationService.login(loginDTO));
}

@Test
Expand All @@ -169,7 +170,7 @@ void testLoginFailInvalidPassword() {

LoginDTO loginDTO = new LoginDTO(username, "otherPw");

assertThrows(InvalidCredentialsException.class, () -> authenticationService.login(loginDTO));
assertThrowsExactly(InvalidCredentialsException.class, () -> authenticationService.login(loginDTO));
}

@ParameterizedTest
Expand Down Expand Up @@ -315,10 +316,8 @@ static class RolesProvider implements ArgumentsProvider {
@Override
@NullMarked
public Stream<? extends Arguments> provideArguments(ParameterDeclarations parameters, ExtensionContext context) {
return Stream.of(
Arguments.of(Role.GUEST),
Arguments.of(Role.PLAYER)
);
return Arrays.stream(Role.values())
.map(Arguments::of);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void testRegisterSuccess() {
void testRegisterFailInvalidCharacters(String username, String password) {
RegisterDTO registerDTO = new RegisterDTO(username, password);

assertThrows(InvalidCharactersException.class, () -> authenticationService.register(registerDTO));
assertThrowsExactly(InvalidCharactersException.class, () -> authenticationService.register(registerDTO));
}

@Test
Expand All @@ -99,7 +99,7 @@ void testRegisterFailUserAlreadyExists() {

when(userRepository.findByUsernameIgnoreCase(username)).thenReturn(Optional.of(user));

assertThrows(UserAlreadyExistsException.class, () -> authenticationService.register(registerDTO));
assertThrowsExactly(UserAlreadyExistsException.class, () -> authenticationService.register(registerDTO));
}

@Test
Expand Down Expand Up @@ -132,7 +132,7 @@ void testLoginFailUnknownUser() {

when(userRepository.findByUsername(anyString())).thenReturn(Optional.empty());

assertThrows(InvalidCredentialsException.class, () -> authenticationService.login(loginDTO));
assertThrowsExactly(InvalidCredentialsException.class, () -> authenticationService.login(loginDTO));
}

@Test
Expand All @@ -152,7 +152,7 @@ void testLoginFailInvalidPassword() {
when(userRepository.findByUsername(username)).thenReturn(Optional.of(user));
when(passwordEncoder.matches(anyString(), anyString())).thenReturn(false);

assertThrows(InvalidCredentialsException.class, () -> authenticationService.login(loginDTO));
assertThrowsExactly(InvalidCredentialsException.class, () -> authenticationService.login(loginDTO));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

import de.hexfieldsstudio.hexfieldsdominion.account.error.InvalidCharactersException;
import de.hexfieldsstudio.hexfieldsdominion.account.error.UserAlreadyExistsException;
import de.hexfieldsstudio.hexfieldsdominion.game.error.MatchNotFoundException;
import de.hexfieldsstudio.hexfieldsdominion.game.error.NotPlayersTurnException;
import de.hexfieldsstudio.hexfieldsdominion.game.error.*;
import de.hexfieldsstudio.hexfieldsdominion.game.error.NotEnoughResourcesException;
import de.hexfieldsstudio.hexfieldsdominion.game.types.PlayerActionType;
import de.hexfieldsstudio.hexfieldsdominion.game.types.StructureType;
import de.hexfieldsstudio.hexfieldsdominion.lobby.error.InvalidRadiusException;
import de.hexfieldsstudio.hexfieldsdominion.lobby.error.LobbyNotFoundException;
import de.hexfieldsstudio.hexfieldsdominion.lobby.error.NotOwnerOfLobbyException;
Expand Down Expand Up @@ -89,7 +91,13 @@ public Stream<? extends Arguments> provideArguments(ParameterDeclarations parame
Arguments.of(new InvalidCharactersException()),
Arguments.of(new InvalidCharactersException()),
Arguments.of(new UserAlreadyExistsException()),
Arguments.of(new InvalidRadiusException(0))
Arguments.of(new InvalidRadiusException(0)),
Arguments.of(new InvalidBuildRequestException()),
Arguments.of(new TooLittleSpaceException()),
Arguments.of(new NotEnoughResourcesException()),
Arguments.of(new MoveHasntBeenImplementedException(PlayerActionType.BUILD)),
Arguments.of(new MissingAxialPositionsException(StructureType.SETTLEMENT, 1)),
Arguments.of(new InvalidDtoException(""))
);
}
}
Expand Down
Loading
Loading