From 221579f0c899a180de5a39346d738a32211b00a3 Mon Sep 17 00:00:00 2001 From: jbion Date: Tue, 20 Dec 2016 20:10:58 +0100 Subject: Add missing tests to DestinationAccessValidatorTest --- src/main/java/org/luxons/sevenwonders/repositories/GameRepository.java | 2 +- .../org/luxons/sevenwonders/validation/DestinationAccessValidator.java | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) (limited to 'src/main/java/org') 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); } } -- cgit