mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-13 15:50:59 +00:00
Persist the identifier for a racelog - not using racelogidentifier directly because it would mean adding com.sap.sailing.domain as a dependency to shared android - also a racelog identifier is too tightly bound with the notion of a race column and such - a racelog should never know about being coupled with a column or fleet
This commit is contained in:
1 parent
782c7c1b33
commit
0bd30d0942
17 files changed
+78
-23
No files matched your search
+3
-1
@@ -4,6 +4,8 @@ import static org.junit.Assert.assertNotSame;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertSame;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -27,7 +29,7 @@ public class RaceLogAttachOnTrackedRaceTest {
|
||||
private RaceLog raceLog;
|
||||
|
||||
@Override
|
||||
public void detachRaceLog() {
|
||||
public void detachRaceLog(Serializable identifier) {
|
||||
this.raceLog = null;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ public class RaceLogTest {
|
||||
public void testAddingTwoEventsOfDifferentPassesButSameTimestamps() {
|
||||
TimePoint t1 = MillisecondsTimePoint.now();
|
||||
int passId = 0;
|
||||
RaceLog raceLog = new RaceLogImpl("RaceLogTest");
|
||||
RaceLog raceLog = new RaceLogImpl("RaceLogTest", "test-identifier");
|
||||
|
||||
RaceLogFlagEvent rcEvent1 = RaceLogEventFactory.INSTANCE.createFlagEvent(t1, UUID.randomUUID(), new ArrayList<Competitor>(), passId, Flags.CLASS, Flags.NONE, false);
|
||||
RaceLogFlagEvent rcEvent2 = RaceLogEventFactory.INSTANCE.createFlagEvent(t1, UUID.randomUUID(), new ArrayList<Competitor>(), ++passId, Flags.CLASS, Flags.NONE, false);
|
||||
@@ -48,7 +48,7 @@ public class RaceLogTest {
|
||||
|
||||
@Test
|
||||
public void testAddOfEvent() {
|
||||
RaceLog rcEventTrack = new RaceLogImpl("RaceLogTest");
|
||||
RaceLog rcEventTrack = new RaceLogImpl("RaceLogTest", "test-identifier");
|
||||
TimePoint t1 = MillisecondsTimePoint.now();
|
||||
int passId = 0;
|
||||
boolean isDisplayed = true;
|
||||
@@ -75,7 +75,7 @@ public class RaceLogTest {
|
||||
|
||||
@Test
|
||||
public void testTrackAPIForEventLogUsage() {
|
||||
RaceLog rcEventTrack = new RaceLogImpl("RaceLog");
|
||||
RaceLog rcEventTrack = new RaceLogImpl("RaceLog", "test-identifier");
|
||||
List<RaceLogEvent> expectedOrderingList = new ArrayList<RaceLogEvent>();
|
||||
TimePoint t1 = MillisecondsTimePoint.now();
|
||||
TimePoint t2 = new MillisecondsTimePoint(t1.asMillis() - 1000);
|
||||
|
||||
+7
-1
@@ -741,7 +741,7 @@ public class MockedTrackedRace implements DynamicTrackedRace {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detachRaceLog() {
|
||||
public void detachRaceLog(Serializable identifier) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
@@ -781,4 +781,10 @@ public class MockedTrackedRace implements DynamicTrackedRace {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detachAllRaceLogs() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
||||
+8
-1
@@ -1,5 +1,6 @@
|
||||
package com.sap.sailing.domain.test.mock;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
@@ -477,7 +478,7 @@ public class MockedTrackedRaceWithStartTimeAndRanks implements TrackedRace {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detachRaceLog() {
|
||||
public void detachRaceLog(Serializable identifier) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
@@ -512,4 +513,10 @@ public class MockedTrackedRaceWithStartTimeAndRanks implements TrackedRace {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detachAllRaceLogs() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user