diff options
author | jbion <joffrey.bion@amadeus.com> | 2016-12-20 20:10:58 +0100 |
---|---|---|
committer | jbion <joffrey.bion@amadeus.com> | 2016-12-21 01:29:28 +0100 |
commit | 221579f0c899a180de5a39346d738a32211b00a3 (patch) | |
tree | fb8dfbd56aff2e3fb09043e0254caa6dd3eb302e /src/main/java/org | |
parent | Fix json not parsing errors (diff) | |
download | seven-wonders-221579f0c899a180de5a39346d738a32211b00a3.tar.gz seven-wonders-221579f0c899a180de5a39346d738a32211b00a3.tar.bz2 seven-wonders-221579f0c899a180de5a39346d738a32211b00a3.zip |
Add missing tests to DestinationAccessValidatorTest
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/luxons/sevenwonders/repositories/GameRepository.java | 2 | ||||
-rw-r--r-- | src/main/java/org/luxons/sevenwonders/validation/DestinationAccessValidator.java | 3 |
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); } } |