mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-22 21:55:39 +00:00
bug3465: fixed more course area related problems in tests
This commit is contained in:
+3
-1
@@ -129,7 +129,9 @@ public class AutomaticRetrackUponCompetitorSetChangeTest {
|
||||
CompetitorRegistrationType.CLOSED, /* registrationLinkSecret */ null,
|
||||
/* startDate */ null, /* endDate */ null, UUID.randomUUID(),
|
||||
/* start with no series */ Collections.emptySet(),
|
||||
/* persistent */ true, new LowPoint(), /* defaultCourseAreaId */ UUID.randomUUID(),
|
||||
/* persistent */ true, new LowPoint(),
|
||||
/* defaultCourseAreaId */ service.getBaseDomainFactory()
|
||||
.getOrCreateCourseArea(UUID.randomUUID(), "Course Area").getId(),
|
||||
/* buoyZoneRadiusInHullLengths */ 2., /* useStartTimeInference */ false, /* controlTrackingFromStartAndFinishTimes */ false,
|
||||
/* autoRestartTrackingUponCompetitorSetChange */ true, /* rankingMetricConstructor */ OneDesignRankingMetric::new);
|
||||
regattaIdentifier = new RegattaName(regatta.getName());
|
||||
|
||||
+6
-4
@@ -4,6 +4,8 @@ import static org.junit.Assert.assertArrayEquals;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -41,7 +43,7 @@ public class LeaderboardDiscardingRulesTest {
|
||||
@Test
|
||||
public void testDiscardingRules() {
|
||||
racingEventService.removeLeaderboard(LEADERBOARDNAME);
|
||||
racingEventService.addFlexibleLeaderboard(LEADERBOARDNAME, null, new int[] { 1, 4 }, new LowPoint(), null);
|
||||
racingEventService.addFlexibleLeaderboard(LEADERBOARDNAME, null, new int[] { 1, 4 }, new LowPoint(), Collections.emptySet());
|
||||
FlexibleLeaderboard leaderboard = (FlexibleLeaderboard) racingEventService.getLeaderboardByName(LEADERBOARDNAME);
|
||||
assertNotNull(leaderboard);
|
||||
int[] discardingRulesNew = new int[] { 1, 5 };
|
||||
@@ -61,7 +63,7 @@ public class LeaderboardDiscardingRulesTest {
|
||||
@Test
|
||||
public void testDiscardingRulesForMultipleEquallyBadRaces() throws NoWindException {
|
||||
racingEventService.removeLeaderboard(LEADERBOARDNAME);
|
||||
racingEventService.addFlexibleLeaderboard(LEADERBOARDNAME, null, new int[] { 1, 2 }, new LowPoint(), null);
|
||||
racingEventService.addFlexibleLeaderboard(LEADERBOARDNAME, null, new int[] { 1, 2 }, new LowPoint(), Collections.emptySet());
|
||||
FlexibleLeaderboard leaderboard = (FlexibleLeaderboard) racingEventService.getLeaderboardByName(LEADERBOARDNAME);
|
||||
assertNotNull(leaderboard);
|
||||
BoatClass boatClass = DomainFactory.INSTANCE.getOrCreateBoatClass("29erXX", /* typicallyStartsUpwind */ true);
|
||||
@@ -100,7 +102,7 @@ public class LeaderboardDiscardingRulesTest {
|
||||
@Test
|
||||
public void testDiscardingRulesForMultipleEquallyBadRacesWithHighPointScoringScheme() throws NoWindException {
|
||||
racingEventService.removeLeaderboard(LEADERBOARDNAME);
|
||||
racingEventService.addFlexibleLeaderboard(LEADERBOARDNAME, null, new int[] { 1, 2 }, new HighPoint(), null);
|
||||
racingEventService.addFlexibleLeaderboard(LEADERBOARDNAME, null, new int[] { 1, 2 }, new HighPoint(), Collections.emptySet());
|
||||
FlexibleLeaderboard leaderboard = (FlexibleLeaderboard) racingEventService.getLeaderboardByName(LEADERBOARDNAME);
|
||||
assertNotNull(leaderboard);
|
||||
BoatClass boatClass = DomainFactory.INSTANCE.getOrCreateBoatClass("ESS40", /* typicallyStartsUpwind */ true);
|
||||
@@ -144,7 +146,7 @@ public class LeaderboardDiscardingRulesTest {
|
||||
@Test
|
||||
public void testDiscardingRulesForMultipleEquallyBadRacesWithNonDiscardableDisqualification() throws NoWindException {
|
||||
racingEventService.removeLeaderboard(LEADERBOARDNAME);
|
||||
racingEventService.addFlexibleLeaderboard(LEADERBOARDNAME, null, new int[] { 1, 2 }, new LowPoint(), null);
|
||||
racingEventService.addFlexibleLeaderboard(LEADERBOARDNAME, null, new int[] { 1, 2 }, new LowPoint(), Collections.emptySet());
|
||||
FlexibleLeaderboard leaderboard = (FlexibleLeaderboard) racingEventService.getLeaderboardByName(LEADERBOARDNAME);
|
||||
assertNotNull(leaderboard);
|
||||
BoatClass boatClass = DomainFactory.INSTANCE.getOrCreateBoatClass("29erXX", /* typicallyStartsUpwind */ true);
|
||||
|
||||
+2
-1
@@ -4,6 +4,7 @@ import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.bson.Document;
|
||||
import org.junit.Test;
|
||||
@@ -51,7 +52,7 @@ public class LeaderboardStorageTest extends TestCase {
|
||||
RacingEventService service = new RacingEventServiceImpl();
|
||||
int[] dicardingThresholds = {};
|
||||
Leaderboard leaderboard = service.addFlexibleLeaderboard(LEADERBOARD_NAME, "testIt", dicardingThresholds,
|
||||
new LowPoint(), Collections.singleton("maaap"));
|
||||
new LowPoint(), Collections.singleton(service.getBaseDomainFactory().getOrCreateCourseArea(UUID.randomUUID(), "maaap").getId()));
|
||||
List<DynamicPerson> sailorList = new ArrayList<DynamicPerson>();
|
||||
sailorList.add(new PersonImpl("sailor", new NationalityImpl("GER"), null, ""));
|
||||
DynamicTeam team = new TeamImpl("team", sailorList, null);
|
||||
|
||||
Reference in New Issue
Block a user