(Game game)
| 19 | private final SessionModel sessionModel = new SessionModel(); |
| 20 | |
| 21 | public void saveGame(Game game) throws SessionNotFoundException { |
| 22 | // check session |
| 23 | String sessionId = game.getSession(); |
| 24 | if (sessionModel.loadSession(sessionId) == null ) { |
| 25 | throw new SessionNotFoundException(sessionId); |
| 26 | } |
| 27 | mapper.save(game); |
| 28 | } |
| 29 | |
| 30 | public Game loadGame(String gameId) throws GameNotFoundException { |
| 31 | Game game = mapper.load(Game.class, gameId); |
no test coverage detected