Skip to content

Commit

Permalink
Setting saotori shiai to true by default
Browse files Browse the repository at this point in the history
  • Loading branch information
softwaremagico committed Jul 3, 2024
1 parent 9c78dae commit ac6c8c2
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 23 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[![GitHub commit activity](https://img.shields.io/github/commit-activity/y/softwaremagico/KendoTournamentManager)](https://github.com/softwaremagico/KendoTournamentManager)
[![GitHub last commit](https://img.shields.io/github/last-commit/softwaremagico/KendoTournamentManager)](https://github.com/softwaremagico/KendoTournamentManager)
[![CircleCI](https://circleci.com/gh/softwaremagico/KendoTournamentManager.svg?style=shield)](https://circleci.com/gh/softwaremagico/KendoTournamentManager)
[![Time](https://img.shields.io/badge/development-637.5h-blueviolet.svg)]()
[![Time](https://img.shields.io/badge/development-639h-blueviolet.svg)]()

[![Powered by](https://img.shields.io/badge/powered%20by%20java-orange.svg?logo=OpenJDK&logoColor=white)]()
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=kendo-tournament-backend&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=kendo-tournament-backend)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ private boolean getMaxGroupFights(Tournament tournament) {

}
}
return false;
return true;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import com.softwaremagico.kt.core.controller.models.RoleDTO;
import com.softwaremagico.kt.core.controller.models.TeamDTO;
import com.softwaremagico.kt.core.controller.models.TournamentDTO;
import com.softwaremagico.kt.core.controller.models.TournamentExtraPropertyDTO;
import com.softwaremagico.kt.core.converters.FightConverter;
import com.softwaremagico.kt.core.converters.TournamentConverter;
import com.softwaremagico.kt.core.converters.models.FightConverterRequest;
Expand Down Expand Up @@ -132,6 +133,7 @@ public void addTournament() {
TournamentDTO newTournament = new TournamentDTO(TOURNAMENT_NAME, 1, MEMBERS, TournamentType.TREE);
tournamentDTO = tournamentController.create(newTournament, null);
tournamentExtraPropertyProvider.save(new TournamentExtraProperty(tournamentConverter.reverse(tournamentDTO), TournamentExtraPropertyKey.ODD_FIGHTS_RESOLVED_ASAP, "false"));
tournamentExtraPropertyProvider.save(new TournamentExtraProperty(tournamentConverter.reverse(tournamentDTO), TournamentExtraPropertyKey.MAXIMIZE_FIGHTS, "false"));
Assert.assertEquals(tournamentController.count(), 1);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ public void addTournament() {
TournamentDTO newTournament = new TournamentDTO(TOURNAMENT_NAME, 1, MEMBERS, TournamentType.TREE);
tournamentDTO = tournamentController.create(newTournament, null);
tournamentExtraPropertyProvider.save(new TournamentExtraProperty(tournamentConverter.reverse(tournamentDTO), TournamentExtraPropertyKey.ODD_FIGHTS_RESOLVED_ASAP, "false"));
tournamentExtraPropertyProvider.save(new TournamentExtraProperty(tournamentConverter.reverse(tournamentDTO), TournamentExtraPropertyKey.MAXIMIZE_FIGHTS, "false"));
Assert.assertEquals(tournamentController.count(), 1);

tournamentExtraPropertyController.create(new TournamentExtraPropertyDTO(tournamentDTO, TournamentExtraPropertyKey.NUMBER_OF_WINNERS, "2"), null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,20 @@
import com.softwaremagico.kt.core.controller.ClubController;
import com.softwaremagico.kt.core.controller.DuelController;
import com.softwaremagico.kt.core.controller.FightController;
import com.softwaremagico.kt.core.controller.FightStatisticsController;
import com.softwaremagico.kt.core.controller.GroupController;
import com.softwaremagico.kt.core.controller.ParticipantController;
import com.softwaremagico.kt.core.controller.RoleController;
import com.softwaremagico.kt.core.controller.TeamController;
import com.softwaremagico.kt.core.controller.TournamentController;
import com.softwaremagico.kt.core.controller.TournamentExtraPropertyController;
import com.softwaremagico.kt.core.controller.models.ClubDTO;
import com.softwaremagico.kt.core.controller.models.GroupDTO;
import com.softwaremagico.kt.core.controller.models.ParticipantDTO;
import com.softwaremagico.kt.core.controller.models.RoleDTO;
import com.softwaremagico.kt.core.controller.models.TeamDTO;
import com.softwaremagico.kt.core.controller.models.TournamentDTO;
import com.softwaremagico.kt.core.controller.models.TournamentExtraPropertyDTO;
import com.softwaremagico.kt.core.converters.FightConverter;
import com.softwaremagico.kt.core.converters.GroupConverter;
import com.softwaremagico.kt.core.converters.TeamConverter;
import com.softwaremagico.kt.core.converters.TournamentConverter;
import com.softwaremagico.kt.core.converters.models.FightConverterRequest;
import com.softwaremagico.kt.core.exceptions.LevelNotFinishedException;
Expand All @@ -49,6 +48,7 @@
import com.softwaremagico.kt.persistence.entities.Group;
import com.softwaremagico.kt.persistence.values.RoleType;
import com.softwaremagico.kt.persistence.values.Score;
import com.softwaremagico.kt.persistence.values.TournamentExtraPropertyKey;
import com.softwaremagico.kt.persistence.values.TournamentType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
Expand Down Expand Up @@ -93,18 +93,9 @@ public class TournamentLevelNotFinishedTest extends AbstractTestNGSpringContextT
@Autowired
private ClubController clubController;

@Autowired
private GroupConverter groupConverter;

@Autowired
private TeamConverter teamConverter;

@Autowired
private RankingProvider rankingProvider;

@Autowired
private FightStatisticsController fightStatisticsController;

@Autowired
private GroupController groupController;

Expand All @@ -117,6 +108,9 @@ public class TournamentLevelNotFinishedTest extends AbstractTestNGSpringContextT
@Autowired
private FightConverter fightConverter;

@Autowired
private TournamentExtraPropertyController tournamentExtraPropertyController;

private ClubDTO clubDTO;


Expand All @@ -137,6 +131,8 @@ public void addTournament() {
Assert.assertEquals(tournamentController.count(), 0);
TournamentDTO newTournament = new TournamentDTO(TOURNAMENT_NAME, 1, MEMBERS, TournamentType.TREE);
tournamentDTO = tournamentController.create(newTournament, null);
tournamentExtraPropertyController.create(new TournamentExtraPropertyDTO(tournamentDTO,
TournamentExtraPropertyKey.MAXIMIZE_FIGHTS, "false"), null);
Assert.assertEquals(tournamentController.count(), 1);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ public void addTournament() {
TournamentDTO newTournament = new TournamentDTO(TOURNAMENT_NAME, 1, MEMBERS, TournamentType.TREE);
tournamentDTO = tournamentController.create(newTournament, null);
tournamentExtraPropertyProvider.save(new TournamentExtraProperty(tournamentConverter.reverse(tournamentDTO), TournamentExtraPropertyKey.ODD_FIGHTS_RESOLVED_ASAP, "false"));
tournamentExtraPropertyProvider.save(new TournamentExtraProperty(tournamentConverter.reverse(tournamentDTO), TournamentExtraPropertyKey.MAXIMIZE_FIGHTS, "false"));
Assert.assertEquals(tournamentController.count(), 1);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,9 @@ public class TournamentTwoWinnersTest extends AbstractTestNGSpringContextTests {
@Autowired
private ClubController clubController;

@Autowired
private GroupConverter groupConverter;

@Autowired
private TeamConverter teamConverter;

@Autowired
private RankingProvider rankingProvider;

@Autowired
private FightStatisticsController fightStatisticsController;

@Autowired
private GroupController groupController;

Expand Down Expand Up @@ -143,6 +134,8 @@ public void addTournament() {
Assert.assertEquals(tournamentController.count(), 0);
TournamentDTO newTournament = new TournamentDTO(TOURNAMENT_NAME, 1, MEMBERS, TournamentType.TREE);
tournamentDTO = tournamentController.create(newTournament, null);
tournamentExtraPropertyController.create(new TournamentExtraPropertyDTO(tournamentDTO,
TournamentExtraPropertyKey.MAXIMIZE_FIGHTS, "false"), null);
Assert.assertEquals(tournamentController.count(), 1);

tournamentExtraPropertyController.create(new TournamentExtraPropertyDTO(tournamentDTO, TournamentExtraPropertyKey.NUMBER_OF_WINNERS, "2"), null);
Expand Down

0 comments on commit ac6c8c2

Please sign in to comment.