Skip to content
Snippets Groups Projects
Commit 7e19f447 authored by Tomas Madeja's avatar Tomas Madeja Committed by Ján Dovjak
Browse files

refactor: idea auto reformat

parent afb7f23f
No related branches found
No related tags found
No related merge requests found
package cz.muni.fi.pa165.icehockeymanager.config;
import com.github.dozermapper.core.DozerBeanMapper;
import com.github.dozermapper.core.DozerBeanMapperBuilder;
import com.github.dozermapper.core.Mapper;
import com.github.dozermapper.core.loader.api.BeanMappingBuilder;
......
......@@ -11,30 +11,36 @@ import java.util.Objects;
public class GameDTO {
@NotNull
@Getter @Setter
@Getter
@Setter
private Long id;
@NotNull
@Getter @Setter
@Getter
@Setter
private TeamDTO homeTeam;
@NotNull
@Getter @Setter
@Getter
@Setter
private TeamDTO awayTeam;
// @Getter @Setter
// private TeamDTO winner;
@PositiveOrZero
@Getter @Setter
@Getter
@Setter
private int homeTeamScore;
@PositiveOrZero
@Getter @Setter
@Getter
@Setter
private int awayTeamScore;
@NotNull
@Getter @Setter
@Getter
@Setter
private ZonedDateTime gameDateTime;
@Override
......
package cz.muni.fi.pa165.icehockeymanager.exceptions;
import java.util.function.Supplier;
public class UnknownTeamException extends RuntimeException {
public UnknownTeamException() {
}
......
......@@ -6,7 +6,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.transaction.Transactional;
import java.util.ArrayList;
import java.util.Collection;
@Service
......
......@@ -303,14 +303,14 @@ class UserFacadeImplTest {
}
private Team addHomeGames(Team team, Game... games) {
for (Game game: games)
for (Game game : games)
when(game.getHomeTeam()).thenReturn(team);
when(team.getHomeGames()).thenReturn(new HashSet<>(Arrays.asList(games)));
return team;
}
private Team addAwayGames(Team team, Game... games) {
for (Game game: games)
for (Game game : games)
when(game.getAwayTeam()).thenReturn(team);
when(team.getAwayGames()).thenReturn(new HashSet<>(Arrays.asList(games)));
return team;
......
......@@ -2,7 +2,6 @@ package cz.muni.fi.pa165.icehockeymanager.services;
import cz.muni.fi.pa165.icehockeymanager.config.ApplicationConfig;
import cz.muni.fi.pa165.icehockeymanager.dao.GameDao;
import cz.muni.fi.pa165.icehockeymanager.dao.PlayerDao;
import cz.muni.fi.pa165.icehockeymanager.model.Game;
import cz.muni.fi.pa165.icehockeymanager.model.Team;
import org.junit.jupiter.api.Test;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment