mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-15 06:49:56 +00:00
added test case for fuzzy boat class matcher for new iQFOil alias names
This commit is contained in:
1 parent
b3651aca29
commit
bf7dc83fd4
2 files changed
+15
-1
No files matched your search
+14
@@ -41,6 +41,20 @@ public class FuzzyBoatClassNameMatcherTest {
|
||||
assertEquals("FK, Men", results.get(0).getB().getA());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIQFWomen() {
|
||||
final List<Pair<String, Pair<String, Date>>> results = Arrays.asList(
|
||||
r("Kieler Woche 2023", "ILCA7", TimePoint.now().asDate()),
|
||||
r("Kieler Woche 2023", "470, Mixed", TimePoint.now().asDate()),
|
||||
r("Kieler Woche 2023", "FK, Women", TimePoint.now().asDate()),
|
||||
r("Kieler Woche 2023", "IQF, Women", TimePoint.now().asDate()),
|
||||
r("Kieler Woche 2023", "IQF, Men", TimePoint.now().asDate()),
|
||||
r("Kieler Woche 2023", "FK, Men", TimePoint.now().asDate()),
|
||||
r("Kieler Woche 2023", "ILCA6", TimePoint.now().asDate()));
|
||||
matcher.sortOfficialResultsByRelevance(bc("iQFOil Women"), results, /* leaderboardName */ "Women's Windsurfing");
|
||||
assertEquals("IQF, Women", results.get(0).getB().getA());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void simpleFullMatchTest() {
|
||||
final List<Pair<String, Pair<String, Date>>> results = Arrays.asList(
|
||||
|
||||
@@ -2322,7 +2322,7 @@ implements ReplicableSecurityService, ClearStateTestSupport {
|
||||
boolean setServerGroupAsOwner, final String displayName) {
|
||||
boolean wasNecessaryToMigrate = false;
|
||||
final OwnershipAnnotation owner = this.getOwnership(identifier);
|
||||
// initialize ownerships on migration and fix objects that were orphaned by e.g. deleting the owning user/group
|
||||
// initialize ownerships on migration and fix objects that were orphaned by setting the owning user/group
|
||||
if (owner == null
|
||||
|| owner.getAnnotation().getTenantOwner() == null && owner.getAnnotation().getUserOwner() == null) {
|
||||
final UserGroup tenantOwnerToSet = setServerGroupAsOwner ? this.getServerGroup() : null;
|
||||
|
||||
Reference in new issue
Block a user