summaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorjbion <joffrey.bion@amadeus.com>2016-12-20 20:10:58 +0100
committerjbion <joffrey.bion@amadeus.com>2016-12-21 01:29:28 +0100
commit221579f0c899a180de5a39346d738a32211b00a3 (patch)
treefb8dfbd56aff2e3fb09043e0254caa6dd3eb302e /src/main
parentFix json not parsing errors (diff)
downloadseven-wonders-221579f0c899a180de5a39346d738a32211b00a3.tar.gz
seven-wonders-221579f0c899a180de5a39346d738a32211b00a3.tar.bz2
seven-wonders-221579f0c899a180de5a39346d738a32211b00a3.zip
Add missing tests to DestinationAccessValidatorTest
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/luxons/sevenwonders/repositories/GameRepository.java2
-rw-r--r--src/main/java/org/luxons/sevenwonders/validation/DestinationAccessValidator.java3
2 files changed, 1 insertions, 4 deletions
diff --git a/src/main/java/org/luxons/sevenwonders/repositories/GameRepository.java b/src/main/java/org/luxons/sevenwonders/repositories/GameRepository.java
index 0e0f6db8..59e984af 100644
--- a/src/main/java/org/luxons/sevenwonders/repositories/GameRepository.java
+++ b/src/main/java/org/luxons/sevenwonders/repositories/GameRepository.java
@@ -27,7 +27,7 @@ public class GameRepository {
return game;
}
- private static class GameNotFoundException extends ApiMisuseException {
+ public static class GameNotFoundException extends ApiMisuseException {
GameNotFoundException(long id) {
super("Game " + id + " doesn't exist");
}
diff --git a/src/main/java/org/luxons/sevenwonders/validation/DestinationAccessValidator.java b/src/main/java/org/luxons/sevenwonders/validation/DestinationAccessValidator.java
index bc7e52ce..64f14dee 100644
--- a/src/main/java/org/luxons/sevenwonders/validation/DestinationAccessValidator.java
+++ b/src/main/java/org/luxons/sevenwonders/validation/DestinationAccessValidator.java
@@ -71,9 +71,6 @@ public class DestinationAccessValidator {
private static int extractId(Matcher matcher) {
String id = matcher.group("id");
- if (id == null) {
- throw new IllegalArgumentException("No id matched in the destination");
- }
return Integer.parseInt(id);
}
}
bgstack15