bug5165: fixed tests

This commit is contained in:
Axel Uhl committed 2020-01-18 00:09:09 +01:00
1 parent 34f2503c56
commit 3196241f03
2 files changed
+3 -3

No files matched your search

@@ -268,7 +268,7 @@ public class CourseConfigurationTest extends AbstractSeleniumTest {
public void testReconstructionOfLapsForCourseBasedOnTemplate() {
final CourseTemplateDataFactory ctdf = new CourseTemplateDataFactory(sharedServerCtx);
final CourseTemplate createdCourseTemplate = courseTemplateApi.createCourseTemplate(sharedServerCtx,
ctdf.constructCourseTemplate(new Pair<>(1, 3), null, Collections.emptyMap()));
ctdf.constructCourseTemplate(new Pair<>(1, 3), null));
final String regattaName = "test";
eventApi.createEvent(ctx, regattaName, "", CompetitorRegistrationType.CLOSED, "");
final RaceColumn race = regattaApi.addRaceColumn(ctx, regattaName, /* prefix */ null, 1)[0];
@@ -341,7 +341,7 @@ public class CourseAndMarkConfigurationFactoryImpl implements CourseAndMarkConfi
}
}
allMarkTemplatesInNewCourseTemplate.add(effectiveMarkTemplate);
MarkRole effectiveMarkRole = courseConfiguration.getAssociatedRoles().get(markConfiguration);
MarkRole effectiveMarkRole = courseConfigurationAfterInventory.getAssociatedRoles().get(markConfiguration);
if (effectiveMarkRole == null) {
// no existing MarkRole specified for the mark configuration; we now need to look for a MarkRoleCreationRequest annotation:
final MarkRoleCreationRequest optionalMarkRoleCreationRequest = markConfiguration.getAnnotationInfo().getOptionalMarkRoleCreationRequest();
@@ -1144,7 +1144,7 @@ public class CourseAndMarkConfigurationFactoryImpl implements CourseAndMarkConfi
private M mapMarkConfiguration(MarkConfiguration<P> markConfiguration) {
final M mark = getOrCreateMarkReplacement(markConfiguration);
if (mark == null) {
throw new IllegalStateException("Non declared mark found in waypoint sequence");
throw new IllegalStateException("Non declared mark "+markConfiguration.getName()+" found in waypoint sequence");
}
// If an explicit role mapping isn't given -> default to the mark's name
allAssociatedRoles.computeIfAbsent(mark, m -> existingRoleMapping.get(markConfiguration));